chiark / gitweb /
9 years agosystemctl: Don't give re-activation warning if unit is masked
Jan Janssen [Fri, 15 Feb 2013 15:10:36 +0000 (16:10 +0100)]
systemctl: Don't give re-activation warning if unit is masked

9 years agosystemctl: allow status with no units
Zbigniew Jędrzejewski-Szmek [Thu, 14 Feb 2013 21:55:24 +0000 (16:55 -0500)]
systemctl: allow status with no units

This makes 'status' behave like 'list-units':
systemctl status -> status of all units
systemctl -t error status -> status of error units
systemctl -t mount status -> etc.

9 years agounit: don't Require systemd-journald.socket from units
Michal Schmidt [Fri, 15 Feb 2013 21:42:26 +0000 (22:42 +0100)]
unit: don't Require systemd-journald.socket from units

It is not really necessary to have a hard requirement dependency on
systemd-journald.socket in almost every unit. The socket gets pulled
into boot via at least two ways: -> systemd-journald.socket -> systemd-journald.service -> systemd-journald.socket

So just assume something pulled the socket in and drop the automatic
requirement dependencies on it.

"systemctl stop systemd-journald.socket" will now not take the whole
system down with it.

9 years agoexecute: increase severity of journal connect failure message
Michal Schmidt [Fri, 15 Feb 2013 23:34:12 +0000 (00:34 +0100)]
execute: increase severity of journal connect failure message

journald is supposed to work. Failure to connect to its socket implies
losing messages. It should be a very unusual event. Log the failure with

Just because this unit's stdout/stderr failed to connect to the journal
does not necessarily mean that we shouldn't try to log the failure using
a structured entry, so let's use log_struct_unit.

9 years agoexecute: unify setup_{output,error}
Michal Schmidt [Fri, 15 Feb 2013 22:36:23 +0000 (23:36 +0100)]
execute: unify setup_{output,error}

The functions are quite similar. Unify them into one.

The source gets shorter, the binary gets slightly smaller.

9 years agoexecute: robustness against journald failures
Michal Schmidt [Fri, 15 Feb 2013 21:43:23 +0000 (22:43 +0100)]
execute: robustness against journald failures

Almost every unit logs to the journal. If journald gets a permanent
failure, units would not be able to start (exit code 209/STDOUT).

Add a fallback to /dev/null to avoid making the system entirely
unusable in such a case.

9 years agolog: fix fallbacks to kmsg
Michal Schmidt [Fri, 15 Feb 2013 21:41:19 +0000 (22:41 +0100)]
log: fix fallbacks to kmsg

write_to_journal() returns 0 if journal_fd is closed and nothing is
written. We need to make sure we'll try log_open_kmsg() then to make the
fallback work for "journal-or-kmsg".

9 years agoman: Update bootchart.conf(5)
William Giokas [Thu, 14 Feb 2013 22:59:48 +0000 (16:59 -0600)]
man: Update bootchart.conf(5)

Recent changes in config options makes almost eveny variable in the man
page obsolete.

9 years agobootchart: if "root=/dev" is not matched, don't try to read /sys
Harald Hoyer [Thu, 14 Feb 2013 10:26:06 +0000 (11:26 +0100)]
bootchart: if "root=/dev" is not matched, don't try to read /sys

9 years agoupdate TODO
Thomas Hindoe Paaboel Andersen [Thu, 14 Feb 2013 21:16:58 +0000 (22:16 +0100)]
update TODO

9 years agobootchart: stricter checks of cli input
Thomas Hindoe Paaboel Andersen [Thu, 14 Feb 2013 21:03:40 +0000 (22:03 +0100)]
bootchart: stricter checks of cli input

9 years agobootchart: use conf-parser & CamelCase names in .conf
Thomas Hindoe Paaboel Andersen [Thu, 14 Feb 2013 20:32:49 +0000 (21:32 +0100)]
bootchart: use conf-parser & CamelCase names in .conf

9 years agocore: do not overwrite existing units source
Umut Tezduyar [Thu, 7 Feb 2013 08:06:20 +0000 (09:06 +0100)]
core: do not overwrite existing units source

Only set source for freshly created .mounts coming from
mountinfo file.

9 years agosystemctl: print wall message only if successful
Zbigniew Jędrzejewski-Szmek [Thu, 14 Feb 2013 19:08:09 +0000 (14:08 -0500)]
systemctl: print wall message only if successful

systemctl would write to the wall even if unsuccessful.

9 years agosystemctl: use automatic cleanup
Zbigniew Jędrzejewski-Szmek [Thu, 14 Feb 2013 18:32:19 +0000 (13:32 -0500)]
systemctl: use automatic cleanup

9 years agonspawn: fail if unable to close pipe
Zbigniew Jędrzejewski-Szmek [Thu, 14 Feb 2013 16:02:02 +0000 (11:02 -0500)]
nspawn: fail if unable to close pipe

9 years agoman: Add even more to the bootchart man page
William Giokas [Thu, 14 Feb 2013 06:13:54 +0000 (00:13 -0600)]
man: Add even more to the bootchart man page

Essentially transfer the 'README' file in src/bootchart to the man page
for easier reading by users.

Moved the 'History' section to the bottom, before the 'See Also' section.

 man/systemd-bootchart.xml | 100 ++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 83 insertions(+), 17 deletions(-)

9 years agobootchart: parse /etc/os-release rather than system-release
Harald Hoyer [Thu, 14 Feb 2013 10:26:07 +0000 (11:26 +0100)]
bootchart: parse /etc/os-release rather than system-release

Also parse it early, so that we can get it in the initramfs.

9 years agobootchart: more fixes for bootchart in the initramfs
Harald Hoyer [Thu, 14 Feb 2013 10:26:05 +0000 (11:26 +0100)]
bootchart: more fixes for bootchart in the initramfs

9 years agonspawn: print PID and show how to enter the namespace
Zbigniew Jędrzejewski-Szmek [Sat, 12 Jan 2013 21:55:04 +0000 (16:55 -0500)]
nspawn: print PID and show how to enter the namespace

systemd-nspawn will now print the PID of the child.
An example showing how to enter the container is added
to the man page.

Support for nsenter without an explicit command was
added in
(post v2.22.2). So this example requires both a new kernel
and the latest util-linux.

9 years agoadded some missing include for a5c32cff1f56afe6f0c6c70d91a88a7a8238b2d7
Harald Hoyer [Thu, 14 Feb 2013 15:37:31 +0000 (16:37 +0100)]
added some missing include for a5c32cff1f56afe6f0c6c70d91a88a7a8238b2d7

9 years agohonor SELinux labels, when creating and writing config files
Harald Hoyer [Thu, 14 Feb 2013 11:26:13 +0000 (12:26 +0100)]
honor SELinux labels, when creating and writing config files

Also split out some fileio functions to fileio.c and provide a SELinux
aware pendant in fileio-label.c


9 years agobootchart items
Auke Kok [Thu, 14 Feb 2013 04:22:12 +0000 (20:22 -0800)]
bootchart items

9 years agoman: use <replaceable> in various places
Zbigniew Jędrzejewski-Szmek [Thu, 14 Feb 2013 03:46:37 +0000 (22:46 -0500)]
man: use <replaceable> in various places

9 years agoman: add filenames to the index
Zbigniew Jędrzejewski-Szmek [Thu, 14 Feb 2013 02:51:31 +0000 (21:51 -0500)]
man: add filenames to the index

Limiting the addition to filenames from <refsynopsis>
seems to give a good enough S/N ratio.

9 years agoman: bootchart: change /var/log to /run/log
William Giokas [Wed, 13 Feb 2013 20:49:24 +0000 (14:49 -0600)]
man: bootchart: change /var/log to /run/log

As of [1], bootchart stores files in /run/log, not /var/log, by default.

[1] f2f85884caac671da84256acb44148df9a4dca70

9 years agoAdd systemd-analyze to .gitignore
Auke Kok [Wed, 13 Feb 2013 22:51:12 +0000 (14:51 -0800)]
Add systemd-analyze to .gitignore

9 years agoMove systemctl dot to systemd-analyze dot
Simon Peeters [Wed, 13 Feb 2013 22:17:28 +0000 (14:17 -0800)]
Move systemctl dot to systemd-analyze dot

9 years agosystemd-analyze: rewrite in C.
Simon Peeters [Wed, 6 Feb 2013 14:21:03 +0000 (15:21 +0100)]
systemd-analyze: rewrite in C.

Written by Peeters Simon <>.
Makefile stuff and cleaned up a bit by Auke Kok <>.
Some code inspired by Marc-Antoine Perennou <>.

9 years agosystemctl: use parse_unit_info
Marc-Antoine Perennou [Thu, 31 Jan 2013 08:57:25 +0000 (09:57 +0100)]
systemctl: use parse_unit_info

Signed-off-by: Marc-Antoine Perennou <>
9 years agodbus: introduce parse_unit_info
Marc-Antoine Perennou [Thu, 31 Jan 2013 08:50:21 +0000 (09:50 +0100)]
dbus: introduce parse_unit_info

Signed-off-by: Marc-Antoine Perennou <>
9 years agodbus: import struct unit_info from systemctl
Marc-Antoine Perennou [Thu, 31 Jan 2013 08:49:35 +0000 (09:49 +0100)]
dbus: import struct unit_info from systemctl

Signed-off-by: Marc-Antoine Perennou <>
9 years agoupdate TODO
Lennart Poettering [Wed, 13 Feb 2013 22:08:52 +0000 (23:08 +0100)]
update TODO

9 years agobuild-sys: make EFI support build-time optional
Lennart Poettering [Wed, 13 Feb 2013 22:07:59 +0000 (23:07 +0100)]
build-sys: make EFI support build-time optional

9 years agobuild-sys: make PolicyKit support compile-time optional (was runtime-optional already)
Lennart Poettering [Wed, 13 Feb 2013 21:56:43 +0000 (22:56 +0100)]
build-sys: make PolicyKit support compile-time optional (was runtime-optional already)

9 years agobuild-sys: fix build without -Wl,--gc-sections
Zbigniew Jędrzejewski-Szmek [Wed, 13 Feb 2013 21:13:56 +0000 (16:13 -0500)]
build-sys: fix build without -Wl,--gc-sections

bootctl needs too.

9 years agoefi: efi_get_boot_options() should already sort the entries, the random order in...
Lennart Poettering [Wed, 13 Feb 2013 21:02:40 +0000 (22:02 +0100)]
efi: efi_get_boot_options() should already sort the entries, the random order in the efivars fs is probably not useful

This also introduces a new FOREACH_DIRENT macro and makes use of it.

9 years agoefi: use efi_get_variable_string() instead of efi_get_variable() where we can
Lennart Poettering [Wed, 13 Feb 2013 20:24:10 +0000 (21:24 +0100)]
efi: use efi_get_variable_string() instead of efi_get_variable() where we can

9 years agoupdate TODO
Lennart Poettering [Wed, 13 Feb 2013 20:20:42 +0000 (21:20 +0100)]
update TODO

9 years agotest-strv.c: Changed assert() to assert_se()
Daniel Buch [Wed, 13 Feb 2013 15:13:39 +0000 (16:13 +0100)]
test-strv.c: Changed assert() to assert_se()

test-strv.c: Indent fix

9 years agotest-strv.c: added strv_append test
Daniel Buch [Wed, 13 Feb 2013 15:13:38 +0000 (16:13 +0100)]
test-strv.c: added strv_append test

9 years agotest-strv.c: added strv_merge_concat test
Daniel Buch [Wed, 13 Feb 2013 15:13:37 +0000 (16:13 +0100)]
test-strv.c: added strv_merge_concat test

9 years agotest-strv.c: added strv_merge test
Daniel Buch [Wed, 13 Feb 2013 15:13:36 +0000 (16:13 +0100)]
test-strv.c: added strv_merge test

9 years agoTODO
Lennart Poettering [Wed, 13 Feb 2013 18:35:28 +0000 (19:35 +0100)]

9 years agoselinux: use a dynamically sized string when generating audit messages
Lennart Poettering [Wed, 13 Feb 2013 18:35:08 +0000 (19:35 +0100)]
selinux: use a dynamically sized string when generating audit messages

9 years agouse streq instead of strcmp
Thomas Hindoe Paaboel Andersen [Wed, 13 Feb 2013 17:13:22 +0000 (18:13 +0100)]
use streq instead of strcmp

9 years agobootctl: always show slashes not backslashes
Kay Sievers [Wed, 13 Feb 2013 16:49:48 +0000 (17:49 +0100)]
bootctl: always show slashes not backslashes

9 years agoefi: unify BootXXXX reading
Kay Sievers [Wed, 13 Feb 2013 16:34:57 +0000 (17:34 +0100)]
efi: unify BootXXXX reading

9 years agoRevert "log_error() if inotify_add_watch() fails"
Lennart Poettering [Wed, 13 Feb 2013 15:25:33 +0000 (16:25 +0100)]
Revert "log_error() if inotify_add_watch() fails"

This reverts commit 2826d14091e43ed3397d862dee79d09d0115c84e.

We never should generate log messages from a library.

9 years agolog_error() if inotify_add_watch() fails
Harald Hoyer [Wed, 13 Feb 2013 14:09:36 +0000 (15:09 +0100)]
log_error() if inotify_add_watch() fails

[zj: Reworded message s/to watch/to add watch on/ to make it clear
     that it was the watch init action that failed, and not the
     "process of watching". I think this way it'll be clearer to
     people who don't know what inotify does.]

9 years agosysctl: fix uninitalized memory access in error path
Zbigniew Jędrzejewski-Szmek [Wed, 13 Feb 2013 14:55:32 +0000 (09:55 -0500)]
sysctl: fix uninitalized memory access in error path

src/sysctl/sysctl.c: In function ‘parse_file’:
src/sysctl/sysctl.c:172:41: warning: ‘property’ may be used uninitialized in this function [-Wmaybe-uninitialized]

9 years agoman: rename systemd.conf to systemd-system.conf
Zbigniew Jędrzejewski-Szmek [Mon, 11 Feb 2013 19:42:24 +0000 (14:42 -0500)]
man: rename systemd.conf to systemd-system.conf

Alias as systemd-user.conf is also provided. This should help
users running systemd in session mode.

9 years agoman: Make options consistent
William Giokas [Wed, 13 Feb 2013 09:39:22 +0000 (03:39 -0600)]
man: Make options consistent

Option listings seemed to be pretty much random, some were short opt,
long opt, others were long opt, short opt. This just makes every option
with a short and long opt that I could find in the order short opt, long
opt, for formatting's sake.

9 years agoman: Write man page for systemd-bootchart(1)
William Giokas [Wed, 13 Feb 2013 09:38:49 +0000 (03:38 -0600)]
man: Write man page for systemd-bootchart(1)

Mostly coppied from bootchart.conf(5)

9 years agotest-udev: include missing.h
Aleksander Morgado [Wed, 13 Feb 2013 07:50:15 +0000 (08:50 +0100)]
test-udev: include missing.h

We need MS_REC and MS_SHARED defined for a proper compilation, so get them from
'missing.h' if not defined already.

9 years agoratelimit: fix off-by-one
Michael Olbrich [Wed, 13 Feb 2013 07:00:46 +0000 (08:00 +0100)]
ratelimit: fix off-by-one

The current code might make sense during startup for service restart
With burst=1 after starting num is 1, so the next ('first') restart is
still accepted ( 1 <= 1). However, once interval has expired, num is 1
after the first restart, so the second restart is also accepted.

This change is also useful in combination with watchdogs:
With burst=1 and a very large interval the system can be restarted on
the first failure.

9 years agotests: add test for continuation lines with comments
Zbigniew Jędrzejewski-Szmek [Wed, 13 Feb 2013 04:28:48 +0000 (23:28 -0500)]
tests: add test for continuation lines with comments

9 years agobuild-sys: disable tests in po/, docs/ with separate build dir
Zbigniew Jędrzejewski-Szmek [Thu, 7 Feb 2013 02:11:27 +0000 (21:11 -0500)]
build-sys: disable tests in po/, docs/ with separate build dir

Both gtk-doc and intltoolize have problems with VPATH builds.
"Creatively" disable tests when configuring from outside the
source directory.

This more-or-less reverts 9795da43c.

9 years agobootchart: Fix typos and some English
William Giokas [Wed, 13 Feb 2013 01:08:26 +0000 (19:08 -0600)]
bootchart: Fix typos and some English

bootchart.conf: direct users to `bootchart.conf(5)`, not a nonexistent
man page.

svg.c: Fix some English in the svg comment header.
  * Chrome/Chromium => Chrome, Chromium
  * firefox => Firefox
  * much more slow => more slowly

9 years agoman: typo fix
Lennart Poettering [Wed, 13 Feb 2013 03:57:36 +0000 (04:57 +0100)]
man: typo fix

9 years agoupdate TODO
Lennart Poettering [Wed, 13 Feb 2013 03:57:30 +0000 (04:57 +0100)]
update TODO

9 years agoutil: *DO NOT* loop for EINTR handling with close_nointr()
Colin Walters [Fri, 25 Jan 2013 16:21:20 +0000 (11:21 -0500)]
util: *DO NOT* loop for EINTR handling with close_nointr()

See the linked references for why we should not do this.

9 years agoboot: add stub Makefile symlink
Lennart Poettering [Wed, 13 Feb 2013 00:03:26 +0000 (01:03 +0100)]
boot: add stub Makefile symlink

9 years agoTODO: bootchart items
Auke Kok [Wed, 13 Feb 2013 00:58:00 +0000 (16:58 -0800)]
TODO: bootchart items

9 years agobootchart: make bootchart work from within the initrd
Harald Hoyer [Tue, 12 Feb 2013 23:36:29 +0000 (15:36 -0800)]
bootchart: make bootchart work from within the initrd

With this patch, bootchart can be started from within the initramfs via
the kernel command line "rdinit=/usr/lib/systemd/systemd-bootchart"


9 years agojournal: Don't use loginuid if it's not valid
Colin Walters [Tue, 12 Feb 2013 17:24:30 +0000 (12:24 -0500)]
journal: Don't use loginuid if it's not valid

Code above this attempted to load loginuid, if this failed for
whatever reason, we'd still end up using that value (0) in place of
realuid.  Fix this by setting a bool when we know the loginuid is

This fixes journal messages showing up in per-user journals in
gnome-ostree (not configured with loginuid, but I'll shortly fix

9 years agoutil: introduce strcaseeq/strncaseeq
Thomas Hindoe Paaboel Andersen [Tue, 12 Feb 2013 20:47:37 +0000 (21:47 +0100)]
util: introduce strcaseeq/strncaseeq

9 years agouse strneq instead of strncmp
Thomas Hindoe Paaboel Andersen [Tue, 12 Feb 2013 20:47:36 +0000 (21:47 +0100)]
use strneq instead of strncmp

9 years agoMerge branch 'master' of ssh:// into work
Auke Kok [Tue, 12 Feb 2013 23:28:00 +0000 (15:28 -0800)]
Merge branch 'master' of ssh:// into work

9 years agoefi: add missing #include
Lennart Poettering [Tue, 12 Feb 2013 23:18:29 +0000 (00:18 +0100)]
efi: add missing #include

9 years agomanager: pass environment over daemon-reexec
Oleksii Shevchuk [Mon, 11 Feb 2013 23:14:39 +0000 (01:14 +0200)]
manager: pass environment over daemon-reexec

Fixes this bug:
alxchk > systemctl --user set-environment A=B
alxchk > systemctl --user show-environment | grep ^A=
alxchk > systemctl --user daemon-reexec
alxchk > systemctl --user show-environment | grep ^A=
alxchk >

9 years agosystemd-bootchart: relicense to LGPLv2.1+
Auke Kok [Tue, 12 Feb 2013 23:14:15 +0000 (15:14 -0800)]
systemd-bootchart: relicense to LGPLv2.1+

When we merged systemd-bootchart we omitted relicensing this
to LGPL. Now that code is being used for other purposes we
need to make sure the code is shareable within systemd
without further problems.

The original committers and contributors of bootchart before it
was merged all have agreed with the relicensing.

9 years agoupdate TODO
Lennart Poettering [Tue, 12 Feb 2013 23:12:40 +0000 (00:12 +0100)]
update TODO

9 years agoefi: various cleanups
Lennart Poettering [Tue, 12 Feb 2013 23:07:55 +0000 (00:07 +0100)]
efi: various cleanups

9 years agomissing: define MS_REC and MS_SHARED if not defined already
Aleksander Morgado [Tue, 12 Feb 2013 13:26:17 +0000 (14:26 +0100)]
missing: define MS_REC and MS_SHARED if not defined already

9 years agoudev: use unique names for temporary files created in /dev
Kay Sievers [Tue, 12 Feb 2013 15:03:45 +0000 (16:03 +0100)]
udev: use unique names for temporary files created in /dev

On Tue, Feb 12, 2013 at 2:18 PM, Robert Milasan <> wrote:
> Under some circumstances udev mixed with multipath fails:
> udevd-work[1376]:
> symlink(../../sdk, /dev/disk/by-id/scsi-36005076305ffc0670000000000002842.udev-tmp)
> failed: File exists udevd-work[1432]:
> rename(/dev/disk/by-id/scsi-36005076305ffc0850000000000000a88.udev-tmp, /dev/disk/by-id/scsi-36005076305ffc0850000000000000a88)
> failed: No such file or directory
> This is non-fatal, but there is no point of created the symlink or
> renaming the symlink if it already exists.
> Reference:

It looke like this now:
  stat("/dev/disk/by-id", {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
  symlink("../../sda", "/dev/disk/by-id/ata-INTEL...N.tmp-b8:0") = 0
  rename("/dev/disk/by-id/ata-INTEL...N.tmp-b8:0", "/dev/disk/by-id/ata-INTEL...N") = 0

9 years agocdrom_id: add data track count for bad virtual drive implementations
Harald Hoyer [Tue, 12 Feb 2013 14:19:38 +0000 (15:19 +0100)]
cdrom_id: add data track count for bad virtual drive implementations

/# /lib/udev/cdrom_id --debug /dev/sr0
probing: '/dev/sr0'
INQUIRY: [AMI     ][Virtual CDROM   ][1.00]
GET CONFIGURATION failed with SK=5h/ASC=20h/ACQ=00h
drive is pre-MMC2 and does not support 46h get configuration command
trying to work around the problem
READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h
no current profile, but disc is present; assuming CD-ROM
READ TOC: len: 12, start track: 1, end track: 1
last track 1 starts at block 0
READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h

What is missing here is ID_CDROM_MEDIA_TRACK_COUNT_DATA to trigger
blkid in /lib/udev/rules.d/60-persistent-storage.rules

  IMPORT{builtin}="blkid --noraid"

9 years agolocalectl: fix --help text
Lennart Poettering [Mon, 11 Feb 2013 23:34:39 +0000 (00:34 +0100)]
localectl: fix --help text

9 years agojournalctl: allow both "-n 55" and "-n55" on the command line, as equivalent syntaxes
Lennart Poettering [Mon, 11 Feb 2013 23:31:13 +0000 (00:31 +0100)]
journalctl: allow both "-n 55" and "-n55" on the command line, as equivalent syntaxes

9 years agomanager: clean environment before passing it on to others
Lennart Poettering [Mon, 11 Feb 2013 22:53:14 +0000 (23:53 +0100)]
manager: clean environment before passing it on to others

9 years agobinfmt,tmpfiles,modules-load,sysctl: rework the various early-boot services that...
Lennart Poettering [Mon, 11 Feb 2013 22:48:36 +0000 (23:48 +0100)]
binfmt,tmpfiles,modules-load,sysctl: rework the various early-boot services that work on .d/ directories

This unifies much of the logic behind them:

- All four will now ofllow the rule that the earlier file and earlier
  assignment in the .d/ directories wins. Before, sysctl was the only
  outlier, where the later setting always won.

- All four now support getopt() and --help on the command line.

- All four can now handle specification of configuration file names on
  the command line to apply. The tools will automatically find them, and
  apply them. Previously only tmpfiles could do that. This is useful for
  %post scripts in RPMs and suchlike.

- This fixes various error path issues in conf_files_list()

9 years agocore: properly validate environment data from Environment= lines in unit files
Lennart Poettering [Mon, 11 Feb 2013 22:45:59 +0000 (23:45 +0100)]
core: properly validate environment data from Environment= lines in unit files

9 years agomanager: validate environment parameters for SetEnvironment(), UnsetEnvironment(...
Lennart Poettering [Mon, 11 Feb 2013 22:41:15 +0000 (23:41 +0100)]
manager: validate environment parameters for SetEnvironment(), UnsetEnvironment() bus calls

9 years agobootctl: print partition uuids as /dev/disk/by-partuuid/...
Kay Sievers [Mon, 11 Feb 2013 22:19:31 +0000 (23:19 +0100)]
bootctl: print partition uuids as /dev/disk/by-partuuid/...

9 years agocore: don't accept invalid environment assignments from the kernel cmdline
Lennart Poettering [Mon, 11 Feb 2013 04:51:14 +0000 (05:51 +0100)]
core: don't accept invalid environment assignments from the kernel cmdline

9 years agotests: more tests
Thomas Hindoe Paaboel Andersen [Mon, 11 Feb 2013 20:40:59 +0000 (21:40 +0100)]
tests: more tests

tests for:

Also convert assert to assert_se to make sure they are run even with
optimization. (see commit 9b5d6bd909855543cba75a4469bff6f82845cf0d)

9 years agologind: Allow active sessions to always shutdown by default
Adel Gadllah [Wed, 6 Feb 2013 13:24:56 +0000 (14:24 +0100)]
logind: Allow active sessions to always shutdown by default

Currently local user are being asked for an admin  password when another
user is logged into the system. This does not make sense as the user has
the power to shut down the system anyway regardless if he/she knows the
password or not (by pulling the plug, battery or whatever).

So only require the admin authentification for remote sessions.

9 years agobootctl: add boot loader and firmware interface tool
Kay Sievers [Fri, 8 Feb 2013 16:24:43 +0000 (17:24 +0100)]
bootctl: add boot loader and firmware interface tool

9 years agobuild-sys: add -U_FORTIFY_SOURCE to $PYTHON_CFLAGS when necessary
Zbigniew Jędrzejewski-Szmek [Mon, 11 Feb 2013 06:08:30 +0000 (01:08 -0500)]
build-sys: add -U_FORTIFY_SOURCE to $PYTHON_CFLAGS when necessary

This patch only adds one line, but moves python detection
after cflags detection, so the result of the latter can
be used in the former.

$PYTHON_CFLAGS usually includes -D_FORTIFY_SOURCE, which will generate
a warning when compiling without optimization. Avoid by undefining

9 years agoefi: fix returned length of efi_get_variable()
Lennart Poettering [Mon, 11 Feb 2013 05:20:55 +0000 (06:20 +0100)]
efi: fix returned length of efi_get_variable()

9 years agoutil: rework load_env_file()
Lennart Poettering [Mon, 11 Feb 2013 04:36:54 +0000 (05:36 +0100)]
util: rework load_env_file()

Inner library calls should not invoke log_oom(), that's something for
main programs, not library calls.

Don't read through uninitialized memory if a file ends in a continuation

Add comments for the non-obvious bits.

Don't choke on comment lines that are continuation lines.

Simplify some things.

9 years agopath-util: fix memory leak
Lennart Poettering [Mon, 11 Feb 2013 04:10:23 +0000 (05:10 +0100)]
path-util: fix memory leak

9 years agoutil: introduce FOREACH_LINE for iterating through files
Lennart Poettering [Mon, 11 Feb 2013 04:09:29 +0000 (05:09 +0100)]
util: introduce FOREACH_LINE for iterating through files

9 years agotest-env-replace: better user assert_se() everywhere
Lennart Poettering [Mon, 11 Feb 2013 02:52:32 +0000 (03:52 +0100)]
test-env-replace: better user assert_se() everywhere

For test tools it's better to use assert_se() rather than assert(),
since the former is not optimized away, even if -DNDEBUG is used. That
means the test program now retains its usefulness even if -DNDEBUG is

This also adds in some OOM checks, to be extra anal...

9 years agoenv: considerably beef up environment cleaning logic
Lennart Poettering [Mon, 11 Feb 2013 02:46:08 +0000 (03:46 +0100)]
env: considerably beef up environment cleaning logic

Now, actually check if the environment variable names and values used
are valid, before accepting them. With this in place are at some places
more rigid than POSIX, and less rigid at others. For example, this code
allows lower-case environment variables (which POSIX suggests not to
use), but it will not allow non-UTF8 variable values.

All in all this should be a good middle ground of what to allow and what
not to allow as environment variables.

(This also splits out all environment related calls into env-util.[ch])

9 years agotests: add tests of strxcpyx
Thomas Hindoe Paaboel Andersen [Sun, 10 Feb 2013 20:56:03 +0000 (21:56 +0100)]
tests: add tests of strxcpyx

also fix a bad indentation in test-strbug.c

9 years agoman: typo fix in systemd.socket
Michael Biebl [Sat, 9 Feb 2013 13:09:05 +0000 (14:09 +0100)]
man: typo fix in systemd.socket

9 years agoupdate TODO
Lennart Poettering [Sat, 9 Feb 2013 01:47:42 +0000 (02:47 +0100)]
update TODO

9 years agovconsole-setup: don't set the kbd mode to unicode if is is currently in raw/off mode
Lennart Poettering [Sat, 9 Feb 2013 01:40:57 +0000 (02:40 +0100)]
vconsole-setup: don't set the kbd mode to unicode if is is currently in raw/off mode

Let's not confuse X11

9 years agoshutdown: issue a sync() as soon as is queued
Lennart Poettering [Fri, 25 Jan 2013 21:33:33 +0000 (22:33 +0100)]
shutdown: issue a sync() as soon as is queued