chiark / gitweb /
elogind.git
10 years agounit: rework stop pending logic
Lennart Poettering [Fri, 26 Apr 2013 00:57:41 +0000 (21:57 -0300)]
unit: rework stop pending logic

When a trigger unit wants to know if a stop is queued for it, we should
just check precisely that and do not check whether it is actually
stopped already. This is because we use these checks usually from state
change calls where the state variables are not updated yet.

This change splits unit_pending_inactive() into two calls
unit_inactive_or_pending() and unit_stop_pending(). The former checks
state and pending jobs, the latter only pending jobs.

10 years agoalways unconditionally create /dev/rtc and use it internally
Kay Sievers [Thu, 25 Apr 2013 00:02:40 +0000 (02:02 +0200)]
always unconditionally create /dev/rtc and use it internally

Partially revert 2b3c81b02fa5dd47b19558c7684e113f36a48486, which
tried to avoid inconsistent rules about when and how to create the
/dev/rtc symlink.

Instead of conditionally or not creating the /dev/rtc link at all,
now always create it with additional and more reliable udev rules.

First try to find the "system rtc" with the hctosys flag, if this
is not found, fall back to create the link for /dev/rtc0.

Our code now never actively searches for the "system rtc" it can
always use /dev/rtc.

10 years agosystemd: record the timestamps as early as possible
Harald Hoyer [Wed, 24 Apr 2013 15:15:47 +0000 (17:15 +0200)]
systemd: record the timestamps as early as possible

The time for systemd initialization and selinux policy loading
is accounted to the initrd or the kernel, which is wrong.

Instead of:

Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) +
975ms (initrd) + 1.410s (userspace) = 8.647s

the more correct output is:

Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) +
475ms (initrd) + 1.910s (userspace) = 8.647s

10 years agoutil: rework safe_atod() to be locale-independent
Lennart Poettering [Thu, 25 Apr 2013 03:04:02 +0000 (00:04 -0300)]
util: rework safe_atod() to be locale-independent

This adds some syntactic sugar with a macro RUN_WITH_LOCALE() that reset
the thread-specific locale temporarily.

10 years agoconf-parser: restrict .include usage
Lennart Poettering [Wed, 24 Apr 2013 22:53:16 +0000 (19:53 -0300)]
conf-parser: restrict .include usage

Disallow recursive .include, and make it unavailable in anything but
unit files.

10 years agokdbus: update kdbus.h from upstream
Kay Sievers [Thu, 25 Apr 2013 00:18:32 +0000 (02:18 +0200)]
kdbus: update kdbus.h from upstream

10 years agojournal: remove build warning when SELinux is disabled
Greg Kroah-Hartman [Wed, 24 Apr 2013 20:04:27 +0000 (13:04 -0700)]
journal: remove build warning when SELinux is disabled

A small patch to remove a build warnining when SELinux is disabled.

10 years agocgroup: always validate cgroup controller names
Lennart Poettering [Wed, 24 Apr 2013 22:01:29 +0000 (19:01 -0300)]
cgroup: always validate cgroup controller names

Let's better be safe than sorry.

10 years agologin: allow watching virtual machines with sd_get_machine_names()
Lennart Poettering [Wed, 24 Apr 2013 20:54:55 +0000 (17:54 -0300)]
login: allow watching virtual machines with sd_get_machine_names()

10 years agologin: add new call sd_get_machine_names() to get a list of current virtual machines...
Lennart Poettering [Wed, 24 Apr 2013 20:54:17 +0000 (17:54 -0300)]
login: add new call sd_get_machine_names() to get a list of current virtual machines and containers

10 years agonss-myhostname: resolve 'localhost' so that /etc/hosts becomes optional
Lennart Poettering [Wed, 24 Apr 2013 20:18:01 +0000 (17:18 -0300)]
nss-myhostname: resolve 'localhost' so that /etc/hosts becomes optional

This makes sure nss-myhostname not only resolves the local host name to
127.0.0.2/::1 but also the host name 'localhost: to 127.0.0.1/::1. This
makes installation of /etc/passwd optional, as it usually only includes
a mapping for 'localhost'.

This change also resolves ::1 to the local hostname (as before), but
also lists 'localhost' as an alias. This means look-ups are now fully
reversible, even though they are 1:n mappings.

Finally, the module will no longer erroneously claim that local IP
addresses which aren't on the loopback device were.

10 years agofileio: unify how we chop off whitespace from key and value in parse_env_file_internal()
Lennart Poettering [Wed, 24 Apr 2013 18:44:28 +0000 (15:44 -0300)]
fileio: unify how we chop off whitespace from key and value in parse_env_file_internal()

10 years agologind: don't busy loop if a job is still running but the delay timeout expires
Lennart Poettering [Wed, 24 Apr 2013 18:23:01 +0000 (15:23 -0300)]
logind: don't busy loop if a job is still running but the delay timeout expires

10 years agoinhbit: show comm field of inhibiting processes
Lennart Poettering [Wed, 24 Apr 2013 15:56:47 +0000 (12:56 -0300)]
inhbit: show comm field of inhibiting processes

10 years agobus: add monitoring facility to busctl
Lennart Poettering [Wed, 24 Apr 2013 15:56:28 +0000 (12:56 -0300)]
bus: add monitoring facility to busctl

10 years agodo not create /dev/rtc symlink, let systemd search for it if needed
Kay Sievers [Wed, 24 Apr 2013 17:12:44 +0000 (19:12 +0200)]
do not create /dev/rtc symlink, let systemd search for it if needed

The export of the RTCs hctosys flag is uneccesary, the kernel takes care
of the persistemt clock management itself, without any need for:
  CONFIG_RTC_HCTOSYS=y
  CONFIG_RTC_HCTOSYS_DEVICE="rtc0"

"Chaotic hardware platforms" without native kernel persistent clock
support will find the proper RTC with the logic rtc_open() without
the need for a custom symlink.

10 years agoadd bash completion for systemd-analyze
Harald Hoyer [Wed, 24 Apr 2013 14:44:44 +0000 (16:44 +0200)]
add bash completion for systemd-analyze

10 years agologind: properly enumerate user/session cgroups under their new suffixed names
Lennart Poettering [Wed, 24 Apr 2013 13:30:40 +0000 (10:30 -0300)]
logind: properly enumerate user/session cgroups under their new suffixed names

10 years agosystemctl: show reverse dependencies or before/after ordering
Zbigniew Jędrzejewski-Szmek [Wed, 24 Apr 2013 03:49:46 +0000 (23:49 -0400)]
systemctl: show reverse dependencies or before/after ordering

Also update completion scripts a bit.

10 years agoSmall cleanup
Zbigniew Jędrzejewski-Szmek [Tue, 23 Apr 2013 12:28:10 +0000 (08:28 -0400)]
Small cleanup

10 years agoreadahead: be more verbose about creation failures
Zbigniew Jędrzejewski-Szmek [Tue, 23 Apr 2013 23:05:43 +0000 (19:05 -0400)]
readahead: be more verbose about creation failures

systemd-readahead reports "Failed to create shared memory segment:
No such file or directory", but it's unclear how it can happen. Be
more verbose about failures.

10 years agoAdd set_consume which always takes ownership
Zbigniew Jędrzejewski-Szmek [Tue, 23 Apr 2013 03:12:15 +0000 (23:12 -0400)]
Add set_consume which always takes ownership

Freeing in error path is the common pattern with set_put().

10 years agoStandarize on one spelling of symlink error message
Zbigniew Jędrzejewski-Szmek [Tue, 23 Apr 2013 00:51:29 +0000 (20:51 -0400)]
Standarize on one spelling of symlink error message

It's polite to print the name of the link that wasn't created,
and it makes little sense to print the target.

10 years agotest: make it easier to override kernel version
Zbigniew Jędrzejewski-Szmek [Tue, 23 Apr 2013 00:39:40 +0000 (20:39 -0400)]
test: make it easier to override kernel version

10 years agosystemd: fall back to mounting /sys/fs/cgroup sans xattr
Zbigniew Jędrzejewski-Szmek [Tue, 23 Apr 2013 00:39:03 +0000 (20:39 -0400)]
systemd: fall back to mounting /sys/fs/cgroup sans xattr

xattrs on cgroup fs were added back in v3.6-rc3-3-g03b1cde. But we
support kernels >= 2.6.39, and we should also support kernels compiled
w/o xattr support, even if systemd is compiled with xattr support.
Fall back to mounting without xattr support.

Tested-by: Colin Walters <walters@verbum.org>
10 years agokdbus: update kdbus.h from upstream
Kay Sievers [Wed, 24 Apr 2013 03:19:50 +0000 (05:19 +0200)]
kdbus: update kdbus.h from upstream

10 years agotimer: make sure we restart timers even if units are still running or if one of their...
Lennart Poettering [Tue, 23 Apr 2013 20:42:31 +0000 (17:42 -0300)]
timer: make sure we restart timers even if units are still running or if one of their conditions fails

10 years agoupdate TODO
Lennart Poettering [Tue, 23 Apr 2013 18:55:41 +0000 (15:55 -0300)]
update TODO

10 years agounit: rework trigger dependency logic
Lennart Poettering [Tue, 23 Apr 2013 18:53:16 +0000 (15:53 -0300)]
unit: rework trigger dependency logic

Instead of having explicit type-specific callbacks that inform the
triggering unit when a triggered unit changes state, make this generic
so that state changes are forwarded betwee any triggered and triggering
unit.

Also, get rid of UnitRef references from automount, timer, path units,
to the units they trigger and rely exclsuively on UNIT_TRIGGER type
dendencies.

10 years agounits: update user@.service to reflect new user cgroup paths
Lennart Poettering [Tue, 23 Apr 2013 14:21:14 +0000 (11:21 -0300)]
units: update user@.service to reflect new user cgroup paths

10 years agobus: add cal to determine machine id of an owner of a service
Lennart Poettering [Tue, 23 Apr 2013 14:18:17 +0000 (11:18 -0300)]
bus: add cal to determine machine id of an owner of a service

10 years agoman: link systemd-tmpfiles-setup-dev.service
Umut Tezduyar [Tue, 23 Apr 2013 07:56:32 +0000 (09:56 +0200)]
man: link systemd-tmpfiles-setup-dev.service

10 years agobus: parse capability kdbus meta data of messages
Lennart Poettering [Tue, 23 Apr 2013 03:14:30 +0000 (00:14 -0300)]
bus: parse capability kdbus meta data of messages

10 years agobus: parse audit metadata from kdbus messages
Lennart Poettering [Tue, 23 Apr 2013 02:38:38 +0000 (23:38 -0300)]
bus: parse audit metadata from kdbus messages

10 years agobus: parse owner uid from cgroup path, too
Lennart Poettering [Tue, 23 Apr 2013 02:27:38 +0000 (23:27 -0300)]
bus: parse owner uid from cgroup path, too

10 years agocgroup: make sure all our cgroup objects have a suffix and are properly escaped
Lennart Poettering [Tue, 23 Apr 2013 02:10:13 +0000 (23:10 -0300)]
cgroup: make sure all our cgroup objects have a suffix and are properly escaped

Session objects will now get the .session suffix, user objects the .user
suffix, nspawn containers the .nspawn suffix.

This also changes the user cgroups to be named after the numeric UID
rather than the username, since this allows us the parse these paths
standalone without requiring access to the cgroup file system.

This also changes the mapping of instanced units to cgroups. Instead of
mapping foo@bar.service to the cgroup path /user/foo@.service/bar we
will now map it to /user/foo@.service/foo@bar.service, in order to
ensure that all our objects are properly suffixed in the tree.

10 years agocore: there's no point to complain so loudly about non-isolatable boot targets
Lennart Poettering [Tue, 23 Apr 2013 02:09:02 +0000 (23:09 -0300)]
core: there's no point to complain so loudly about non-isolatable boot targets

10 years agonspawn: suffix the nspawn cgroups with ".nspawn"
Lennart Poettering [Mon, 22 Apr 2013 20:26:06 +0000 (17:26 -0300)]
nspawn: suffix the nspawn cgroups with ".nspawn"

As discussed with Dan Berrange it's a good idea to suffix all objects in
the cgroup tree with ".something", so that when the system is
partitioned using a resource management tool we can drop objects of
different types into the same partition directory without generate
namespace conflicts.

We'l add this to the Pax Control Group document as soon as write access
to the fdo wiki is restored.

10 years agonspawn: always use cg_get_path() to determine fs path for a cgroup
Lennart Poettering [Mon, 22 Apr 2013 20:11:05 +0000 (17:11 -0300)]
nspawn: always use cg_get_path() to determine fs path for a cgroup

10 years agoupdate TODO
Lennart Poettering [Mon, 22 Apr 2013 20:03:59 +0000 (17:03 -0300)]
update TODO

11 years agounits: rename systemd-static-nodes -> systemd-tmpfiles-setup-dev
Tom Gundersen [Mon, 22 Apr 2013 19:57:39 +0000 (21:57 +0200)]
units: rename systemd-static-nodes -> systemd-tmpfiles-setup-dev

This is really just a special case of systemd-tmpfiles-setup, moreover it could easily create more than static nodes.

11 years agoshell-completion: add shell completion for "systemctl help"
Harald Hoyer [Mon, 22 Apr 2013 09:38:40 +0000 (11:38 +0200)]
shell-completion: add shell completion for "systemctl help"

11 years agosystemd,nspawn: use extended attributes to store metadata
Zbigniew Jędrzejewski-Szmek [Mon, 22 Apr 2013 00:25:01 +0000 (20:25 -0400)]
systemd,nspawn: use extended attributes to store metadata

All attributes are stored as text, since root_directory is already
text, and it seems easier to have all of them in text format.

Attributes are written in the trusted. namespace, because the kernel
currently does not allow user. attributes on cgroups. This is a PITA,
and CAP_SYS_ADMIN is required to *read* the attributes. Alas.

A second pipe is opened for the child to signal the parent that the
cgroup hierarchy has been set up.

11 years agobus: implement client logic for fd passing
Lennart Poettering [Mon, 22 Apr 2013 01:24:50 +0000 (22:24 -0300)]
bus: implement client logic for fd passing

11 years agoTODO: remove dbus items which we will not touch anymore
Kay Sievers [Sat, 20 Apr 2013 17:26:28 +0000 (19:26 +0200)]
TODO: remove dbus items which we will not touch anymore

11 years agoTODO: journal enhancements
Josh Triplett [Fri, 19 Apr 2013 21:13:42 +0000 (14:13 -0700)]
TODO: journal enhancements

11 years agohwdb: update
Kay Sievers [Sat, 20 Apr 2013 16:41:57 +0000 (18:41 +0200)]
hwdb: update

11 years agobuild-sys: prevent library underlinking
Evangelos Foutras [Fri, 19 Apr 2013 21:17:08 +0000 (00:17 +0300)]
build-sys: prevent library underlinking

Underlinking can cause subtle bugs like the recent issue with
libnss_myhostname (which was fixed in commit 1e335af7).

11 years agonss-myhostname: ensure that glibc's assert is used
Dave Reisner [Fri, 19 Apr 2013 20:31:25 +0000 (16:31 -0400)]
nss-myhostname: ensure that glibc's assert is used

11 years agologind-dbus: initialize result variable
Lukas Nykryn [Fri, 19 Apr 2013 11:58:58 +0000 (13:58 +0200)]
logind-dbus: initialize result variable

11 years agocrypt-setup-generator: correctly check return of strdup
Lukas Nykryn [Fri, 19 Apr 2013 11:58:57 +0000 (13:58 +0200)]
crypt-setup-generator: correctly check return of strdup

11 years agocore/killall: use procfs_file_alloca
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 21:19:38 +0000 (17:19 -0400)]
core/killall: use procfs_file_alloca

11 years agoReintroduce f_type comparison macro
Harald Hoyer [Fri, 19 Apr 2013 11:44:56 +0000 (13:44 +0200)]
Reintroduce f_type comparison macro

This reverts commit 4826f0b7b5c0aefa08b8cc7ef64d69027f84da2c.

Because statfs.t_type can be int on some architecures, we have to cast
the const magic to the type, otherwise the compiler warns about
signed/unsigned comparison, because the magic can be 32 bit unsigned.

statfs(2) man page is also wrong on some systems, because
f_type is not __SWORD_TYPE on some architecures.

The following program:

int main(int argc, char**argv)
{
        struct statfs s;
        statfs(argv[1], &s);

printf("sizeof(f_type) = %d\n", sizeof(s.f_type));
printf("sizeof(__SWORD_TYPE) = %d\n", sizeof(__SWORD_TYPE));
printf("sizeof(long) = %d\n", sizeof(long));
printf("sizeof(int) = %d\n", sizeof(int));
if (sizeof(s.f_type) == sizeof(int)) {
printf("f_type = 0x%x\n", s.f_type);
} else {
                printf("f_type = 0x%lx\n", s.f_type);
}
        return 0;
}

executed on s390x gives for a btrfs:

sizeof(f_type) = 4
sizeof(__SWORD_TYPE) = 8
sizeof(long) = 8
sizeof(int) = 4
f_type = 0x9123683e

11 years agoUpdate NEWS
Zbigniew Jędrzejewski-Szmek [Thu, 18 Apr 2013 23:59:12 +0000 (19:59 -0400)]
Update NEWS

11 years agosystemd-python: wrap sd_journal_add_conjunction
Zbigniew Jędrzejewski-Szmek [Thu, 18 Apr 2013 23:37:26 +0000 (19:37 -0400)]
systemd-python: wrap sd_journal_add_conjunction

11 years agonspawn: create empty /etc/resolv.conf if necessary
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 18:13:09 +0000 (14:13 -0400)]
nspawn: create empty /etc/resolv.conf if necessary

nspawn will overmount resolv.conf if it exists. Since e.g.
default install with yum doesn't create /etc/resolv.conf,
a container created with yum will not have network. This
seems undesirable, and since we overmount the file anyway,
let's create it too.

Also, mounting a read-write /etc/resolv.conf in the container
is treated as a failure, since it makes it possible to
modify hosts /etc/resolv.conf from inside the container.

11 years agobuild-sys: run 'make update-man-list' v202
Lennart Poettering [Thu, 18 Apr 2013 23:11:38 +0000 (01:11 +0200)]
build-sys: run 'make update-man-list'

11 years agobuild-sys: prepare release 202
Lennart Poettering [Thu, 18 Apr 2013 22:41:24 +0000 (00:41 +0200)]
build-sys: prepare release 202

11 years agojournal: when iterating through a file we might lose messages when changing direction.
Marius Vollmer [Thu, 18 Apr 2013 20:34:36 +0000 (22:34 +0200)]
journal: when iterating through a file we might lose messages when changing direction.

https://bugs.freedesktop.org/show_bug.cgi?id=63672

11 years agoman: document the new login class 'background'
Lennart Poettering [Thu, 18 Apr 2013 20:20:56 +0000 (22:20 +0200)]
man: document the new login class 'background'

11 years agoupdate TODO
Lennart Poettering [Thu, 18 Apr 2013 20:19:33 +0000 (22:19 +0200)]
update TODO

11 years agocryptsetup: ask for password, if key file cannot be accessed
Harald Hoyer [Thu, 18 Apr 2013 07:41:23 +0000 (09:41 +0200)]
cryptsetup: ask for password, if key file cannot be accessed

If the key file cannot be accessed, we can at least ask for the
password.

11 years agosystemd-logind: Fix linking by reordering libraries in LDADD
Josh Triplett [Thu, 18 Apr 2013 18:32:26 +0000 (11:32 -0700)]
systemd-logind: Fix linking by reordering libraries in LDADD

libsystemd-audit needs functions from libsystemd-shared, so
libsystemd-audit needs to appear first.  Otherwise:

  CCLD   systemd-logind
./.libs/libsystemd-audit.a(audit.o): In function `audit_session_from_pid':
/home/josh/src/systemd/src/shared/audit.c:50: undefined reference to `detect_container'

11 years agobus: test - add hack to receive messages
Kay Sievers [Thu, 18 Apr 2013 17:05:10 +0000 (19:05 +0200)]
bus: test - add hack to receive messages

11 years agobus: catch up with kernel changes
Kay Sievers [Thu, 18 Apr 2013 16:54:17 +0000 (18:54 +0200)]
bus: catch up with kernel changes

11 years agobuildsys: Add --disable-tests to avoid building tests
Henrik Grindal Bakken [Thu, 18 Apr 2013 12:40:24 +0000 (14:40 +0200)]
buildsys: Add --disable-tests to avoid building tests

This patch adds --disable-tests to configure.  It is based on a patch
posted by Thierry Reding in 2010.  The motivation for adding it is that
some tests fail link-time when cross-compiling.

The patch adds a new Makefile variable -- manual_tests -- and uses
that instead of noinst_PROGRAMS.  However, if ENABLE_TESTS is true,
the former is added to the latter.  It also renames noinst_tests to
simply tests.

11 years agoRevert f_type fixups
Harald Hoyer [Thu, 18 Apr 2013 12:50:42 +0000 (14:50 +0200)]
Revert f_type fixups

This reverts commit a858b64dddf79177e12ed30f5e8c47a1471c8bfe.
This reverts commit aea275c43194b6ac519ef907b62c5c995050fde0.
This reverts commit fc6e6d245ee3989c222a2a8cc82a33475f9922f3.
This reverts commit c4073a27c555aeceac87a3b02a83141cde641a1e.
This reverts commit cddf148028f525be8176e7f1cbbf4f862bd287f6.
This reverts commit 8c68a70170b31f93c287f29fd06c6c17edaf19ad.

The constants are now casted to __SWORD_TYPE, which should resolve the
compiler warnings about signed vs unsigned.

After talking to Kay, we concluded:

This should be fixed in the kernel, not worked around in userspace tools.

Architectures cannot use int and expect magic constants lager than INT_MAX
to work correctly. The kernel header needs to be fixed.

Even coreutils cannot handle it:
  #define RAMFS_MAGIC  0x858458f6
  # stat -f -c%t /
  ffffffff858458f6

  #define BTRFS_SUPER_MAGIC 0x9123683E
  # stat -f -c%t /mnt
  ffffffff9123683e

Although I found the perfect working macro to fix the thing :)

        __extension__ ({                                                \
                        bool _ret = false;                              \
                        switch(f) { case c: _ret=true; };               \
                        ( _ret );                                       \
                })

11 years agomacro.h: let F_TYPE_CMP() macro fail to compile, if second parameter is not const
Harald Hoyer [Thu, 18 Apr 2013 10:05:41 +0000 (12:05 +0200)]
macro.h: let F_TYPE_CMP() macro fail to compile, if second parameter is not const

If the magic parameter is not a const, then the macro does not work, so
better fail to compile, than be surprised afterwards.

11 years agofileio.c: do not parse comments after non-whitespace chars
Harald Hoyer [Thu, 18 Apr 2013 08:15:25 +0000 (10:15 +0200)]
fileio.c: do not parse comments after non-whitespace chars

systemd does not want to understand comments after the first
non-whitespace char occured.

key=foo #comment  will result into key == "foo #comment"
key="foo" #comment  will result into key == "foo#comment"
"key= #comment" will result into key == "#comment"
"key #comment" is an invalid line

11 years agosd-login.c: fixup for d70964d0
Harald Hoyer [Thu, 18 Apr 2013 08:16:17 +0000 (10:16 +0200)]
sd-login.c: fixup for d70964d0

p pointer is not _cleanup_free_

11 years agomove _cleanup_ attribute in front of the type
Harald Hoyer [Thu, 18 Apr 2013 07:11:22 +0000 (09:11 +0200)]
move _cleanup_ attribute in front of the type

http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html

11 years agologin/sd-login.c: make use of _cleanup_free_ and friends
Harald Hoyer [Wed, 17 Apr 2013 12:05:24 +0000 (14:05 +0200)]
login/sd-login.c: make use of _cleanup_free_ and friends

11 years agorename CMP_F_TYPE to F_TYPE_CMP
Harald Hoyer [Thu, 18 Apr 2013 06:06:55 +0000 (08:06 +0200)]
rename CMP_F_TYPE to F_TYPE_CMP

11 years agoAdd ugly CMP_F_TYPE() macro
Harald Hoyer [Thu, 18 Apr 2013 05:34:25 +0000 (07:34 +0200)]
Add ugly CMP_F_TYPE() macro

On some architectures (like s390x) the kernel has the type int for
f_type, but long in userspace.
Assigning the 32 bit magic constants from linux/magic.h to the 31 bit
signed f_type in the kernel, causes f_type to be negative for some
constants.
glibc extends the int to long for those architecures in 64 bit mode, so
the negative int becomes a negative long, which cannot be simply
compared to the original magic constant, because the compiler would
automatically cast the constant to long.
To workaround this issue, we also compare to the (int)MAGIC value in a
macro. Of course, we could do #ifdef with the architecure, but it has to
be maintained, and the magic constants are 32 bit anyway.

Someday, when the int is unsigned or long for all architectures, we can
remove this macro again. Until then, keep it as simple as it can be.

11 years agocore/execute: only clean the environment, if we have one
Harald Hoyer [Thu, 18 Apr 2013 05:15:03 +0000 (07:15 +0200)]
core/execute: only clean the environment, if we have one

11 years agobuild-sys: add sd_journal_add_conjunction() to symbol versioning file
Lennart Poettering [Thu, 18 Apr 2013 01:12:06 +0000 (03:12 +0200)]
build-sys: add sd_journal_add_conjunction() to symbol versioning file

11 years agoman: document the new sd_journal_add_conjunction() call
Lennart Poettering [Thu, 18 Apr 2013 01:11:44 +0000 (03:11 +0200)]
man: document the new sd_journal_add_conjunction() call

11 years agoupdate TODO
Lennart Poettering [Thu, 18 Apr 2013 00:54:52 +0000 (02:54 +0200)]
update TODO

11 years agoMove bus_error to dbus-common and remove bus_error_message_or_strerror
Simon Peeters [Wed, 10 Apr 2013 22:39:01 +0000 (00:39 +0200)]
Move bus_error to dbus-common and remove bus_error_message_or_strerror

bus_error and bus_error_message_or_strerror dit almost exactly the same,
so use only one of them and place it in dbus-common.

11 years agocryptsetup-generator: add support for rd.luks.key=
Harald Hoyer [Thu, 11 Apr 2013 13:44:33 +0000 (15:44 +0200)]
cryptsetup-generator: add support for rd.luks.key=

Also clarify rd.luks.uuid and luks.uuid in the manual.

https://bugzilla.redhat.com/show_bug.cgi?id=905683

11 years agoman: document that timeout=0 is the default for entries in crypttab
Lennart Poettering [Thu, 18 Apr 2013 00:21:01 +0000 (02:21 +0200)]
man: document that timeout=0 is the default for entries in crypttab

11 years agocryptsetup: set the timeout to 0 by default
Harald Hoyer [Fri, 12 Apr 2013 07:45:26 +0000 (09:45 +0200)]
cryptsetup: set the timeout to 0 by default

cryptsetup itself has no timeout as default from the beginning. So the
default timeout has been "0" from the beginning.

https://bugzilla.redhat.com/show_bug.cgi?id=949702

11 years agoexecute: always add in EXECUTABLE= field when we log something about execution
Lennart Poettering [Thu, 18 Apr 2013 00:18:33 +0000 (02:18 +0200)]
execute: always add in EXECUTABLE= field when we log something about execution

11 years agosystemctl: drop usage of "internally loaded modules"
Lennart Poettering [Thu, 18 Apr 2013 00:10:44 +0000 (02:10 +0200)]
systemctl: drop usage of "internally loaded modules"

I wouldn't know what "internally" is supposed to mean hear, and we use
this terminology in this context nowhere else, so let's drop this.

11 years agoreadahead: let readahead run for a little longer
Lennart Poettering [Wed, 17 Apr 2013 20:23:21 +0000 (22:23 +0200)]
readahead: let readahead run for a little longer

Especially slower systems need more than 10s for starting the session,
so let's bump this to 30s.

11 years agoupdate TODO
Lennart Poettering [Wed, 17 Apr 2013 20:23:18 +0000 (22:23 +0200)]
update TODO

11 years agofixup for cddf148028f52
Harald Hoyer [Wed, 17 Apr 2013 16:58:06 +0000 (18:58 +0200)]
fixup for cddf148028f52

Instead of making a type up, just use __SWORD_TYPE, after reading
statfs(2).

Too bad, this does not fix s390x because __SWORD_TYPE is (long int) and
the kernel uses (int) to fill in the field!!!!!!

11 years agobootchart: Fix errno usage.
Auke Kok [Wed, 17 Apr 2013 16:49:03 +0000 (09:49 -0700)]
bootchart: Fix errno usage.

11 years agoupdate TODO
Lennart Poettering [Wed, 17 Apr 2013 16:48:23 +0000 (18:48 +0200)]
update TODO

11 years agobus: replace aligned_alloc() with memalign() everywhere
Lennart Poettering [Wed, 17 Apr 2013 16:45:45 +0000 (18:45 +0200)]
bus: replace aligned_alloc() with memalign() everywhere

aligned_alloc() is C11 and not available everywhere. Also it would
require us to align the size value. So let's just invoke memalign()
instead, which is universally available and doesn't have any alignment
restrictions on the size parameter.

11 years agocore: Remove unnecessary typedef
Henrik Grindal Bakken [Wed, 17 Apr 2013 16:08:37 +0000 (18:08 +0200)]
core: Remove unnecessary typedef

ExecContext isn't used in this header file, and everything seems to
build just fine without this typedef.  The typedef doesn't really belong
here, and at least my gcc-4.4.6 gives an error on type redefined.

11 years agofixup 8c68a7017 and cast to (unsigned long)
Harald Hoyer [Wed, 17 Apr 2013 16:23:17 +0000 (18:23 +0200)]
fixup 8c68a7017 and cast to (unsigned long)

11 years agofixed statfs.f_type signed vs unsigned comparisons
Harald Hoyer [Wed, 17 Apr 2013 16:03:39 +0000 (18:03 +0200)]
fixed statfs.f_type signed vs unsigned comparisons

statfs.f_type is signed but the filesystem magics are unsigned.
Casting the magics to signed will not make the signed.

Problem seen on big-endian 64bit s390x with __fsword_t 8 bytes.

Casting statfs.f_type to unsigned on the other hand will get us what we
need.

https://bugzilla.redhat.com/show_bug.cgi?id=953217

11 years agoshell-completion: use -a to see "empty" properties
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 14:52:46 +0000 (10:52 -0400)]
shell-completion: use -a to see "empty" properties

11 years agoupdate TODO
Lennart Poettering [Wed, 17 Apr 2013 14:19:05 +0000 (16:19 +0200)]
update TODO

11 years agoTODO: add s.th. like "systemctl set-log-level debug"
Harald Hoyer [Wed, 17 Apr 2013 13:41:18 +0000 (15:41 +0200)]
TODO: add s.th. like "systemctl set-log-level debug"

11 years agocore/execute: report invalid environment variables from files
Harald Hoyer [Wed, 17 Apr 2013 13:25:02 +0000 (15:25 +0200)]
core/execute: report invalid environment variables from files

Because "export key=val" is not supported by systemd, an error is logged
where the invalid assignment is coming from.

Introduce strv_env_clean_log() to log invalid environment assignments,
where logging is possible and allowed.

parse_env_file_internal() is modified to allow WHITESPACE in keys, to
report the issues later on.

11 years agoRevert "man/systemd.xml: change the signal names to kill systemd"
Harald Hoyer [Wed, 17 Apr 2013 12:58:08 +0000 (14:58 +0200)]
Revert "man/systemd.xml: change the signal names to kill systemd"

This reverts commit 432c30d25fc2a7b4939d5ea6c29708e1323a2b9c.

Suggestion was to fix bash instead. :-/

11 years agosystemctl:enable_sysv_units() more _cleanup_free_
Harald Hoyer [Wed, 17 Apr 2013 10:03:20 +0000 (12:03 +0200)]
systemctl:enable_sysv_units() more _cleanup_free_

11 years agofileio:parse_env_file_internal() fix environment file parsing
Harald Hoyer [Wed, 17 Apr 2013 09:02:56 +0000 (11:02 +0200)]
fileio:parse_env_file_internal() fix environment file parsing

parse_env_file_internal() could not parse the following lines correctly:

export key="val"
key="val"#comment