Commit graph

146 commits

Author SHA1 Message Date
Lennart Poettering a247755d52 tmpfiles: ensure we do no follow symlinks when cleaning up dirs
Patch suggested by Miloslav Trmac.
2010-12-28 14:21:28 +01:00
Lennart Poettering c8bffa43fd util: properly handle OOM when allocating Debian version string 2010-12-21 14:35:20 +05:30
Michael Biebl 22927a3654 debian: Prefix welcome string with "Debian "
For stable releases /etc/debian_version only contains a version number,
so we add a prefix "Debian ".
2010-12-21 03:07:36 +01:00
Lennart Poettering 8e1bd70d4c sysctl: implement native sysctl tool to support Debian-style /etc/sysctl.d 2010-11-18 21:52:26 +01:00
Lennart Poettering 10aa703482 util: introduce /etc/os-release so that distros don't need to patch systemd to get a welcome message 2010-11-18 04:46:28 +01:00
Lennart Poettering e3aa71c38c exec: automatically determine right TERM= setting based on tty name 2010-11-15 23:49:02 +01:00
Lennart Poettering 9381a72403 util: always highlight distro name 2010-11-14 23:48:20 +01:00
Lennart Poettering 7f4e08056d cryptsetup: hook up tool with ask-password 2010-11-12 00:40:27 +01:00
Lennart Poettering e9ddabc246 manager: parse RD_TIMESTAMP passed from initrd 2010-11-10 22:38:44 +01:00
Lennart Poettering e23a0ce8ba cryptsetup: minimal cryptsetup unit generator 2010-11-10 22:38:43 +01:00
Lennart Poettering 799fd0fd23 service: unify tstamp serialization code 2010-10-28 03:16:03 +02:00
Lennart Poettering ade509ce73 main: move make_null_stdio() to util.c 2010-10-27 05:45:57 +02:00
Lennart Poettering 10717a1a8d unit: serialize active timestamps 2010-10-27 00:01:12 +02:00
Lennart Poettering e5ebf783cb ask-password: add minimal plymouth password agent 2010-10-26 04:35:25 +02:00
Andrew Edmunds 274914f991 util: Add welcome message for Ubuntu
The approved method for determining the installed release of
Ubuntu is to execute "lsb_release".  However, this is in /usr/bin and
is implemented in python so it is not safe to execute at this early
stage of booting.  This code parses /etc/lsb-release which is
where "lsb_release" looks for the information.
2010-10-25 21:10:05 +02:00
Lennart Poettering ec863ba65a ask-password: add basic tty agent 2010-10-25 20:36:01 +02:00
Lennart Poettering 8a0867d6c5 systemctl: introduce systemctl kill 2010-10-22 16:11:50 +02:00
Lennart Poettering e472d47628 util: ignore quota files by default 2010-10-18 22:39:17 +02:00
Lennart Poettering 3b63d2d31d tmpfiles: integrate kay's directory cleanup code and otherwise beef up tmpfiles quite a bit 2010-10-18 22:38:41 +02:00
Lennart Poettering f601daa701 inotify: properly handle multiple inotify events per read() 2010-10-13 02:34:00 +02:00
Lennart Poettering c8f26f42e2 util: don't specifically check for the /dev/null major/minor, just check whether something is a char or block device 2010-10-08 18:22:28 +02:00
Lennart Poettering 00dc5d769a unit: introduce 'banned' load state for units symlinked to /dev/null 2010-10-08 02:31:36 +02:00
Lennart Poettering 3c14d26c47 util: unify implementations of freeze() 2010-10-07 19:34:56 +02:00
Dave Reisner c899f8c61a fix typo: s/seperat/separat/g 2010-10-05 21:50:56 +02:00
Kay Sievers dd36de4d52 parse_env_file() - return empty value strings like FOO="" as NULL value 2010-09-28 23:41:09 +02:00
Lennart Poettering ce8a6aa1a0 locale: make sure we don't merge configuration settings from different sources 2010-09-21 01:51:23 +02:00
Lennart Poettering 1b39d4b9d2 ask-password: optionally ask questions on tty 2010-09-17 02:10:08 +02:00
Lennart Poettering e7db37dd19 util: fix handling of quotes in parse_env_file() 2010-09-16 01:57:59 +02:00
Lennart Poettering 97c4a07df9 vconsole: add new utility to initialize the virtual console 2010-09-16 00:36:41 +02:00
Lennart Poettering 8e12a6aed3 util: use waitid() instead of waitpid() everywhere to avoid confusion due to SIGSTOP 2010-09-15 14:48:59 +02:00
Lennart Poettering 2e78aa9988 util: introduce waitpid_loop() 2010-09-15 14:37:45 +02:00
Lennart Poettering f26ee0b931 util: SIGSTKFLT is unknown on Linux for SPARC 2010-09-14 13:56:08 +02:00
Tom Gundersen 17dbb83dee util: add Arch welcome message
Arch has no release name, so juts prints 'Welcome to Arch Linux!'.
The color is the same as used by Arch's native rc.sysinit.
2010-09-13 19:19:54 +02:00
Sedat Dilek 5a6225fd2e util: add Debian welcome message
Hi,

after talked with Michael on IRC, here is the patch to see a systemd
Welcome message on Debian systems.
FYI: I had to remove "quiet" from Kernel-command-line to see it.

"Stolen from Gentoo" :-) [1,2]?

Kind Regards,
- Sedat -

[1] http://lists.freedesktop.org/archives/systemd-devel/2010-September/000267.html
[2] http://cgit.freedesktop.org/systemd/commit/?id=0d37b36b2890fdf8149d12460ebb00822e555977

From 76d860ca774cb8724de25c3ed3c455ebe5d548e3 Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Sun, 12 Sep 2010 23:02:22 +0200
Subject: [PATCH] util: add Debian welcome message

Include the "Debian" string as /etc/debian_version contains only the Distribution name like "squeeze".
Use Light Red color for Debian.

Based on a proposal patch of Michael Biebl <biebl@debian.org>
2010-09-13 18:03:00 +02:00
Gustavo Sverzut Barbieri 0d37b36b28 util: add Gentoo welcome message. 2010-09-09 00:17:34 +02:00
Lennart Poettering eed1d0e33d util: leave locked terminal attributes untouched so that we don't interfere with plymouth
https://bugzilla.redhat.com/show_bug.cgi?id=628913
2010-09-01 00:10:41 +02:00
Lennart Poettering 9ed95f4336 util: look at STDOUT, not STDIN, when determining tty columns
https://bugzilla.redhat.com/show_bug.cgi?id=626891
2010-08-31 16:53:58 +02:00
Lennart Poettering 584be568b9 systemctl: show timestamps for state changes 2010-08-25 03:13:44 +02:00
Lennart Poettering 11ce342724 mount: properly handle LABEL="" in fstab 2010-08-20 02:46:15 +02:00
Lennart Poettering d06dacd002 service/systemctl: don't consider LSB exit codes 5 and 6 as failure, and decode exit codes in systemctl 2010-08-20 02:31:54 +02:00
Lennart Poettering 888c6216ca nss: don't disable nscd anymore, since it doesn't make sense to socket-activate nscd anyway 2010-08-17 18:13:46 +02:00
Lennart Poettering 618e02c7b7 util: properly detect ttyname_r() failing 2010-08-16 21:25:09 +02:00
Lennart Poettering f614480831 systemctl: add support for delayed shutdown, similar to sysv in style 2010-08-16 15:37:52 +02:00
Lennart Poettering d6c9574fb5 emacs: make sure nobody accidently adds tabs to our sources 2010-08-14 19:59:25 +02:00
Lennart Poettering afea26ad7d main: disable nscd properly, if possible 2010-08-11 23:31:07 +02:00
Lennart Poettering 1e59887dc9 gc: remove a lot of unused code 2010-08-11 23:19:04 +02:00
Lennart Poettering e51bc1a23e selinux: split off selinux calls into seperate file label.c 2010-08-11 22:58:34 +02:00
Lennart Poettering b95cf3629e util: when replacing env vars replace unset envvars by nothing
This makes it easier to support /etc/sysconfig/xxxx with command line
env vars in style of $OPTIONS which might or might not be set.
2010-08-11 01:44:38 +02:00
Lennart Poettering 4502d22cb8 util: when formatting timestamps return '0' for 0 timestamps instead of empty string 2010-08-06 21:34:11 +02:00
Lennart Poettering 95978cf8a6 selinux: minor error handling fix 2010-08-05 19:50:03 +02:00
Lennart Poettering 6319292f15 selinux: fix labels only when configured for it 2010-08-05 19:50:02 +02:00
Lennart Poettering 5b1fe56a8b selinux: rework selinux tests a little 2010-08-04 01:07:38 +02:00
Lennart Poettering f7f4cccb2a selinux: fix if vs. ifdef mixup 2010-08-04 00:40:19 +02:00
Daniel J Walsh 56cf987fe7 Systemd is causing mislabeled devices to be created and then attempting to read them.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/28/2010 05:57 AM, Kay Sievers wrote:
> On Wed, Jul 28, 2010 at 11:43, Lennart Poettering
> <lennart@poettering.net> wrote:
>> On Mon, 26.07.10 16:42, Daniel J Walsh (dwalsh@redhat.com) wrote:
>>> tcontext=system_u:object_r:device_t:s0 tclass=chr_file
>>> type=1400 audit(1280174589.476:7): avc:  denied  { read } for  pid=1
>>> comm="systemd" name="autofs" dev=devtmpfs ino=9482
>>> scontext=system_u:system_r:init_t:s0
>>> tcontext=system_u:object_r:device_t:s0 tclass=chr_file
>>> type=1400 audit(1280174589.476:8): avc:  denied  { read } for  pid=1
>>> comm="systemd" name="autofs" dev=devtmpfs ino=9482
>>> scontext=system_u:system_r:init_t:s0
>>> tcontext=system_u:object_r:device_t:s0 tclass=chr_file
>>>
>>> Lennart, we talked about this earlier.  I think this is caused by the
>>> modprobe calls to create /dev/autofs.  Since udev is not created at the
>>> point that init loads the kernel modules, the devices get created with
>>> the wrong label.  Once udev starts the labels get fixed.
>>>
>>> I can allow init_t to read device_t chr_files.
>>
>> Hmm, I think a cleaner fix would be to make systemd relabel this device
>> properly before accessing it? Given that this is only one device this
>> should not be a problem for us to maintain, I think? How would the
>> fixing of the label work? Would we have to spawn restorecon for this, or
>> can we actually do this in C without too much work?
>
> I guess we can just do what udev is doing, and call setfilecon(), with
> a context of an earlier matchpathcon().
>
> Kay
> _______________________________________________
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Here is the updated patch with a fix for the labeling of /dev/autofs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkxQMyoACgkQrlYvE4MpobNviACfWgxsjW2xzz1qznFex8RVAQHf
gIEAmwRmRcLvGqYtwQaZ3WKIg8wmrwNk
=pC2e
2010-08-03 23:45:22 +02:00
Lennart Poettering c24eb49e6a exec: extend variable substitution to support splitting variable values into seperate arguments 2010-07-21 02:57:35 +02:00
Lennart Poettering 8fe914ec81 device: do not merge devices
Don't try to merge devices that have been created via dependencies when
they appear in the system and can be recognized as the same.  Instead,
simply continue to maintain them independently of each other, however
with the same state cycle. Why? Because otherwise we'd have a hard time
to seperate the dependencies after the devices are unplugged again and
we hence cannot be sure anymore that next time the device is plugged in
it will carry the same names.

Example: if one depndency refers to dev-sda.device and another one to
dev-by-id-xxxyyy.device we only learn at time of plug in of the device
that it is actually the same device that was ment. In the moment the
device is unplugged again we won't know anymore their relation to each
other and the next time the harddisk is plugged it might even appear as
dev-by-id-xxxyyy.device and dev-sdb.service. To ensure the dependencies
continue to have the meaning they were intended to have let's hence keep
the .device objects seperate all the time, even when they are plugged
in.

This patch also introduces a new Following= property which points from
the various .device units of a specific device to the main .device unit
for it. This can be used by the client side to figure out the relation
of the .device units to each other and even filter units from display.
2010-07-20 20:33:24 +02:00
Lennart Poettering 4c633005ea cgroup: treat non-existing cgroups like empty ones, to deal with races 2010-07-13 19:00:01 +02:00
Lennart Poettering 3fe5e5d476 util: reset terminal even harder 2010-07-12 21:40:43 +02:00
Lennart Poettering 7bc0351dd8 util: fix error handling in acquire_terminal() 2010-07-12 20:35:14 +02:00
Lennart Poettering 35d2e7ec19 cgroup: reimplement the last bit of libcgroup functionality natively 2010-07-12 18:16:44 +02:00
Lennart Poettering c6c18be35b cgroup: kill processes, not tasks and other cgroup changes 2010-07-11 00:50:49 +02:00
Lennart Poettering 2e22afe909 execute: add ability to configure the kill signal 2010-07-10 04:49:37 +02:00
Lennart Poettering b4f10a5e89 install: various improvements
Rename --start to --realize, to make things less confusing when doing
"systemctl stop --realize foo.service".

Introduce --realize=reload.

Don't talk to systemd when run within a chroot, or when systemd isn't
running.
2010-07-08 21:39:01 +02:00
Lennart Poettering fa776d8e96 cgls: beef up control group dumping and introduce cgls tool 2010-07-08 21:01:42 +02:00
Lennart Poettering 301056b7a0 util: fix missing memory initialization 2010-07-08 05:23:34 +02:00
Lennart Poettering fab56fc541 execute: support minimal environment variable replacement when executing processes 2010-07-08 04:09:59 +02:00
Lennart Poettering e167fb86f6 util: handle \s escape as defined in the XDG spec properly in cunescape() 2010-07-07 22:28:51 +02:00
Lennart Poettering 6febfd0d4b util: introduce cunescape_length() 2010-07-07 20:58:02 +02:00
Lennart Poettering 0bab36f250 util: properly handle escaped quotes in words in split_quoted() 2010-07-07 20:57:47 +02:00
Lennart Poettering f3d4cc0148 util: fix handling of unknown escapes in cunescape() 2010-07-07 20:57:10 +02:00
Lennart Poettering 8f75a603ec util: implement safe_atolu based on safe_atolli/safe_atoi, depending on word size 2010-07-07 17:40:25 +02:00
Lennart Poettering 2e54424d83 util: minor simplification when printing welcome text 2010-07-07 04:13:20 +02:00
Lennart Poettering c846ff4798 main: show welcome message on boot 2010-07-07 00:25:41 +02:00
Lennart Poettering 9e58ff9c5c manager: optionally print status updates to console on boot 2010-07-07 00:00:59 +02:00
Lennart Poettering 057fbb5885 util: fix space calculation in get_process_cmdline() 2010-07-06 20:33:54 +02:00
Lennart Poettering c59760eeda systemctl: show cgroup contents in status 2010-07-05 03:06:02 +02:00
Lennart Poettering 82c121a475 dbus: complete exec coverage 2010-07-04 16:44:58 +02:00
Lennart Poettering 4fd5948e74 socket: make various socket/pipe options configurable 2010-07-01 00:29:17 +02:00
Lennart Poettering 6398320759 core: rename struct timestamp to dual_timestamp to avoid name clash with IP system headers 2010-07-01 00:26:44 +02:00
Lennart Poettering 8c6db83365 pam: implement systemd PAM module and generelize cgroup API for that a bit 2010-06-21 23:27:18 +02:00
Lennart Poettering bb00e60409 don't use 'long long' unless we have a really good reason to 2010-06-19 04:35:52 +02:00
Lennart Poettering f872ec3397 util: properly divide in 64bit in format_timestamp() 2010-06-19 00:14:12 +02:00
Lennart Poettering c32dd69b46 install: make systemd-install useful for installation of template instances 2010-06-18 21:33:15 +02:00
Lennart Poettering eb22ac37f3 systemctl: add /dev/initctl fallback 2010-06-18 04:44:53 +02:00
Lennart Poettering ef2f1067d0 systemctl: warn users via wall that the system goes down 2010-06-18 02:28:35 +02:00
Lennart Poettering 7d7936059f manager: expose a few special units via SIGRTMIN+x signals 2010-06-17 23:22:56 +02:00
Lennart Poettering 3ba686c107 util: implement parse_pid() function 2010-06-17 22:50:35 +02:00
Lennart Poettering 5b6319dcee service: optionally call into PAM when dropping priviliges 2010-06-16 21:54:17 +02:00
Lennart Poettering d3782d60cd util: introduce random_ull() 2010-06-16 05:05:36 +02:00
Lennart Poettering 2c7108c40a util: introduce readlink_and_make_absolute() 2010-06-16 01:56:00 +02:00
Lennart Poettering 01f78473b1 path: add .path unit type for monitoring files 2010-05-24 05:25:33 +02:00
Lennart Poettering 871d7de47c timer: fully implement timer units 2010-05-24 01:45:54 +02:00
Lennart Poettering c3f6d6757a manager: canonicalize search paths and filter out non-existing paths and those pointing to the same fs directory 2010-05-22 03:30:46 +02:00
Lennart Poettering 9a34ec5fbb execute: only reset those signals to the default we really need to reset to the default 2010-05-22 01:46:08 +02:00
Lennart Poettering 21de3988ab main: ignore EPERM in TIOCSTTY when opening terminal for crash shell 2010-05-18 03:40:19 +02:00
Lennart Poettering e99e38bbdc build-sys: move source files to subdirectory 2010-05-16 18:45:24 +02:00
Renamed from util.c (Browse further)