]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 years agounit: move unit_warn_if_dir_nonempty() and friend to unit.c
Lennart Poettering [Mon, 11 May 2015 20:28:52 +0000 (22:28 +0200)] 
unit: move unit_warn_if_dir_nonempty() and friend to unit.c

The call is only used by the mount and automount unit types, but that's
already enough to consider it generic unit functionality, hence move it
out of mount.c and into unit.c.

9 years agocore,network: major per-object logging rework
Lennart Poettering [Mon, 11 May 2015 18:38:21 +0000 (20:38 +0200)] 
core,network: major per-object logging rework

This changes log_unit_info() (and friends) to take a real Unit* object
insted of just a unit name as parameter. The call will now prefix all
logged messages with the unit name, thus allowing the unit name to be
dropped from the various passed romat strings, simplifying invocations
drastically, and unifying log output across messages. Also, UNIT= vs.
USER_UNIT= is now derived from the Manager object attached to the Unit
object, instead of getpid(). This has the benefit of correcting the
field for --test runs.

Also contains a couple of other logging improvements:

- Drops a couple of strerror() invocations in favour of using %m.

- Not only .mount units now warn if a symlinks exist for the mount
  point already, .automount units do that too, now.

- A few invocations of log_struct() that didn't actually pass any
  additional structured data have been replaced by simpler invocations
  of log_unit_info() and friends.

- For structured data a new LOG_UNIT_MESSAGE() macro has been added,
  that works like LOG_MESSAGE() but prefixes the message with the unit
  name. Similar, there's now LOG_LINK_MESSAGE() and
  LOG_NETDEV_MESSAGE().

- For structured data new LOG_UNIT_ID(), LOG_LINK_INTERFACE(),
  LOG_NETDEV_INTERFACE() macros have been added that generate the
  necessary per object fields. The old log_unit_struct() call has been
  removed in favour of these new macros used in raw log_struct()
  invocations. In addition to removing one more function call this
  allows generated structured log messages that contain two object
  fields, as necessary for example for network interfaces that are
  joined into another network interface, and whose messages shall be
  indexed by both.

- The LOG_ERRNO() macro has been removed, in favour of
  log_struct_errno(). The latter has the benefit of ensuring that %m in
  format strings is properly resolved to the specified error number.

- A number of logging messages have been converted to use
  log_unit_info() instead of log_info()

- The client code in sysv-generator no longer #includes core code from
  src/core/.

- log_unit_full_errno() has been removed, log_unit_full() instead takes
  an errno now, too.

- log_unit_info(), log_link_info(), log_netdev_info() and friends, now
  avoid double evaluation of their parameters

9 years agocore: always initialize ExecParamters.bus_endpoint_fd to -1
Lennart Poettering [Mon, 11 May 2015 18:13:37 +0000 (20:13 +0200)] 
core: always initialize ExecParamters.bus_endpoint_fd to -1

Otherwise it might be passed in as 0, which is a valid fd, but usually
does not refer to a real endpoint.

9 years agounits: order nspawn containers after network.target
Lennart Poettering [Mon, 11 May 2015 20:08:28 +0000 (22:08 +0200)] 
units: order nspawn containers after network.target

This way we know that any bridges and other user-created network devices
are in place, and can be properly added to the container.

In the long run this should be dropped, and replaced by direct calls
inside nspawn that cause the devices to be created when necessary.

9 years agoutil: optimize free_and_strdup() if NOP
Lennart Poettering [Mon, 11 May 2015 18:09:58 +0000 (20:09 +0200)] 
util: optimize free_and_strdup() if NOP

Under the assumption that strcmp() is cheaper than memory allocation,
let's avoid the allocation, if the new value is identical to the old.

9 years agonspawn: pass on kill signal setting to contaner scope
Lennart Poettering [Thu, 7 May 2015 21:37:32 +0000 (14:37 -0700)] 
nspawn: pass on kill signal setting to contaner scope

Let's just pass on what the user set for us.

9 years agoupdate TODO
Lennart Poettering [Thu, 7 May 2015 21:33:12 +0000 (14:33 -0700)] 
update TODO

9 years agotest-libudev: fix leak in error case
Thomas Hindoe Paaboel Andersen [Mon, 11 May 2015 19:41:31 +0000 (21:41 +0200)] 
test-libudev: fix leak in error case

CID# 1297428

9 years agoswap: avoid null pointer dereference
Thomas Hindoe Paaboel Andersen [Mon, 11 May 2015 19:01:51 +0000 (21:01 +0200)] 
swap: avoid null pointer dereference

CID#1297436

9 years agotreewide: Correct typos and spell plural of bus consistent
Torstein Husebø [Mon, 11 May 2015 11:49:29 +0000 (13:49 +0200)] 
treewide: Correct typos and spell plural of bus consistent

9 years agoGenerate systemd-fsck-root.service in the initramfs
Zbigniew Jędrzejewski-Szmek [Wed, 6 May 2015 05:09:53 +0000 (01:09 -0400)] 
Generate systemd-fsck-root.service in the initramfs

In the initrafms, generate a systemd-fsck-root.service to replace
systemd-fsck@<sysroot-device>.service. This way, after we transition
to the real root, systemd-fsck-root.service is marked as already done.

This introduces an unnecessary synchronization point, because
systemd-fsck@* is ordered after systemd-fsck-root also in the
initramfs. In practice this shouldn't be a problem.

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

C.f. 956eaf2b8d6c9999024705ddadc7393bc707de02.

9 years agoman: fix typos in previous comimt
Zbigniew Jędrzejewski-Szmek [Sat, 9 May 2015 23:46:15 +0000 (19:46 -0400)] 
man: fix typos in previous comimt

9 years agoman: document forwarding to syslog better
Zbigniew Jędrzejewski-Szmek [Sat, 9 May 2015 21:20:51 +0000 (16:20 -0500)] 
man: document forwarding to syslog better

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

9 years agobuildsys: *_la_CPPFLAGS takes $(AM_CPPFLAGS) not $(AM_CFLAGS)
Cristian Rodríguez [Sat, 9 May 2015 17:08:43 +0000 (14:08 -0300)] 
buildsys: *_la_CPPFLAGS takes $(AM_CPPFLAGS) not $(AM_CFLAGS)

9 years agoudevd: remove unused function
Thomas Hindoe Paaboel Andersen [Thu, 7 May 2015 05:26:34 +0000 (07:26 +0200)] 
udevd: remove unused function

9 years agoudevd: don't explicitly count the number of workers
Tom Gundersen [Wed, 6 May 2015 21:36:36 +0000 (23:36 +0200)] 
udevd: don't explicitly count the number of workers

Simply query the size of the hashmap keeping all the worker contexts instead.

9 years agoudevd: keep workers in a hashmap rather than a list
Tom Gundersen [Wed, 6 May 2015 21:26:25 +0000 (23:26 +0200)] 
udevd: keep workers in a hashmap rather than a list

This makes the code somewhat more readable.

9 years agoudevd: worker - drop reference counting
Tom Gundersen [Mon, 27 Apr 2015 09:43:31 +0000 (11:43 +0200)] 
udevd: worker - drop reference counting

Make the worker context have the same life-span as the worker process. It is created on fork()
and free'd on SIGCHLD.

The change means that we can get worker_returned() for a worker context that is no longer around,
this is not a problem and we can just drop the message. The only use for worker_returned() is to
know to reschedule events to workers that are still around, so if the worker has already exited
it is not important to keep track of. We still print a debug statement in this case to be on the
safe side.

9 years agodevice: avoid null pointer dereference
Thomas Hindoe Paaboel Andersen [Wed, 6 May 2015 17:56:29 +0000 (19:56 +0200)] 
device: avoid null pointer dereference

9 years agoudev: fix weird coding-style
David Herrmann [Wed, 6 May 2015 16:59:03 +0000 (18:59 +0200)] 
udev: fix weird coding-style

Eeeew!

9 years agotest-libudev: add error handling
Thomas Hindoe Paaboel Andersen [Wed, 6 May 2015 16:37:06 +0000 (18:37 +0200)] 
test-libudev: add error handling

CID#1296244

9 years agoudevd: worker - allow passing NULL to worker_unref()
Tom Gundersen [Wed, 6 May 2015 15:36:39 +0000 (17:36 +0200)] 
udevd: worker - allow passing NULL to worker_unref()

9 years agoudevd: worker - use _exit() rather than exit()
Tom Gundersen [Tue, 21 Apr 2015 13:53:10 +0000 (15:53 +0200)] 
udevd: worker - use _exit() rather than exit()

Follow the coding style and avoid the exit handlers.

9 years agoudevd: modernize error handling
Tom Gundersen [Mon, 27 Apr 2015 12:56:21 +0000 (14:56 +0200)] 
udevd: modernize error handling

We never return magic exit codes, but just EXIT_FAILUER or EXIT_SUCCESS.

9 years agoudevd: use kernel cmdline parser
Tom Gundersen [Fri, 17 Apr 2015 21:18:24 +0000 (23:18 +0200)] 
udevd: use kernel cmdline parser

9 years agoudevd: worker - move some fields from the worker to the event
Tom Gundersen [Mon, 27 Apr 2015 10:14:38 +0000 (12:14 +0200)] 
udevd: worker - move some fields from the worker to the event

9 years agoudevd: worker - introduce worker_attach_event()
Tom Gundersen [Mon, 27 Apr 2015 09:33:41 +0000 (11:33 +0200)] 
udevd: worker - introduce worker_attach_event()

9 years agoudevd: worker - make refcounting clearer
Tom Gundersen [Mon, 27 Apr 2015 09:26:47 +0000 (11:26 +0200)] 
udevd: worker - make refcounting clearer

Take and drop explicit references where it makes sense.

9 years agoudevd: worker - only allocate the worker struct in the main process
Tom Gundersen [Mon, 27 Apr 2015 09:11:58 +0000 (11:11 +0200)] 
udevd: worker - only allocate the worker struct in the main process

This is not used in the worker, so avoid having to free it there.

9 years agoudevd: rename worker_new() to worker_spawn()
Tom Gundersen [Mon, 27 Apr 2015 09:08:38 +0000 (11:08 +0200)] 
udevd: rename worker_new() to worker_spawn()

9 years agoudevd: don't track worker exitcode
Tom Gundersen [Sat, 25 Apr 2015 23:40:12 +0000 (01:40 +0200)] 
udevd: don't track worker exitcode

We used to use this to track failed events so they could be retriggered,
but that is no longer done, so the code can be dropped.

9 years agoUpdate TODO
David Herrmann [Wed, 6 May 2015 16:29:41 +0000 (18:29 +0200)] 
Update TODO

9 years agoudev: fix coding style
Susant Sahani [Wed, 6 May 2015 06:15:13 +0000 (11:45 +0530)] 
udev: fix coding style

9 years agosystemctl: null-initialize pointer with cleanup attribute
Daniel Buch [Wed, 6 May 2015 08:28:08 +0000 (10:28 +0200)] 
systemctl: null-initialize pointer with cleanup attribute

9 years agomachinectl: remove unused variable
Thomas Hindoe Paaboel Andersen [Wed, 6 May 2015 16:23:11 +0000 (18:23 +0200)] 
machinectl: remove unused variable

9 years agobus: don't switch to kdbus if not requested
David Herrmann [Wed, 6 May 2015 16:18:43 +0000 (18:18 +0200)] 
bus: don't switch to kdbus if not requested

Whenever systemd is re-executed, it tries to create a system bus via
kdbus. If the system did not have kdbus loaded during bootup, but the
module is loaded later on manually, this will cause two system buses
running (kdbus and dbus-daemon in parallel).

This patch makes sure we never try to create kdbus buses if it wasn't
explicitly requested on the command-line.

9 years agotimedated: remove unnecessary goto
Zbigniew Jędrzejewski-Szmek [Wed, 6 May 2015 04:44:52 +0000 (23:44 -0500)] 
timedated: remove unnecessary goto

Not needed since 99f861310d3f05f4.

9 years agotmpfiles: try to handle read-only file systems gracefully
Michael Olbrich [Thu, 30 Apr 2015 18:50:38 +0000 (20:50 +0200)] 
tmpfiles: try to handle read-only file systems gracefully

On read-only filesystems trying to create the target will not fail with
EEXIST but with EROFS. Handle EROFS by checking if the target already
exists, and if empty when truncating.
This avoids reporting errors if tmpfiles doesn't actually needs to do
anything.

[zj: revert condition to whitelist rather then blacklisting, and add goto
to avoid stat'ting twice.]

9 years agoshared/utmp-wtmp: fix copy/paste error
Michael Olbrich [Thu, 30 Apr 2015 18:28:37 +0000 (20:28 +0200)] 
shared/utmp-wtmp: fix copy/paste error

9 years agoAdd audit type generated files to gitignore
Zbigniew Jędrzejewski-Szmek [Wed, 6 May 2015 02:41:42 +0000 (22:41 -0400)] 
Add audit type generated files to gitignore

They are not currently used, but the Makefile rules don't know that.
It's easier to ignore them, then to special-case creation rules.

9 years agolockfile-util.[ch]: Split out from util.[ch]
Colin Walters [Mon, 4 May 2015 20:12:46 +0000 (16:12 -0400)] 
lockfile-util.[ch]: Split out from util.[ch]

Continuing the general trend of splitting up util.[ch].  I specifically
want to reuse this code in https://github.com/GNOME/libglnx and
having it split up will make future copy-pasting easier.

9 years agoFix permissions on /run/systemd/nspawn/locks
Seth Jennings [Tue, 5 May 2015 18:31:01 +0000 (13:31 -0500)] 
Fix permissions on /run/systemd/nspawn/locks

machined is getting an EACCES when trying to create the lock file for
images because the mode on /run/systemd/nspawn/locks is 0600.

mkdir("/run/systemd/nspawn/locks", 0600) = -1 EEXIST (File exists)
stat("/run/systemd/nspawn/locks", {st_mode=S_IFDIR|0600, st_size=40, ...}) = 0
open("/run/systemd/nspawn/locks/inode-41:256", O_RDWR|O_CREAT|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC, 0600) = -1 EACCES (Permission denied)

This commit adjusts the mode to 0700 to correct the issue.

9 years agotreewide: fix typos
Torstein Husebø [Thu, 30 Apr 2015 09:57:09 +0000 (11:57 +0200)] 
treewide: fix typos

9 years agoupdate TODO
Lennart Poettering [Tue, 5 May 2015 20:48:57 +0000 (13:48 -0700)] 
update TODO

9 years agoman: document that nspawn -x, --template= and machinectl clone leave hostname and...
Lennart Poettering [Tue, 5 May 2015 20:48:28 +0000 (13:48 -0700)] 
man: document that nspawn -x, --template= and machinectl clone leave hostname and machine id unmodified

9 years agoman: nspawn is used in production these days, admit that
Lennart Poettering [Tue, 5 May 2015 20:41:31 +0000 (13:41 -0700)] 
man: nspawn is used in production these days, admit that

Previously, the man page suggested to only use nspawn for testing,
building, and debugging things. However, it is nowadays used in
production and used as building block for rocket, hence let's just admit
that it's pretty much production ready.

9 years agocore: be more strict when manipulating slices names and unescaping paths from unit...
Lennart Poettering [Tue, 5 May 2015 20:39:14 +0000 (13:39 -0700)] 
core: be more strict when manipulating slices names and unescaping paths from unit names

Let's better be safe then sorry.

9 years agocore: bus name units should not allow aliases or instances
Lennart Poettering [Sat, 2 May 2015 15:42:55 +0000 (17:42 +0200)] 
core: bus name units should not allow aliases or instances

9 years agocore: rework unit name validation and manipulation logic
Lennart Poettering [Thu, 30 Apr 2015 18:21:00 +0000 (20:21 +0200)] 
core: rework unit name validation and manipulation logic

A variety of changes:

- Make sure all our calls distuingish OOM from other errors if OOM is
  not the only error possible.

- Be much stricter when parsing escaped paths, do not accept trailing or
  leading escaped slashes.

- Change unit validation to take a bit mask for allowing plain names,
  instance names or template names or an combination thereof.

- Refuse manipulating invalid unit name

9 years agoutil: be a bit safer in path_is_safe()
Lennart Poettering [Thu, 30 Apr 2015 17:44:10 +0000 (19:44 +0200)] 
util: be a bit safer in path_is_safe()

We should be more strict when verifying paths with path_is_safe() for
potentially dangerous constructs, and that includes lengths of
PATH_MAX-1 and larger. Be more accurate here.

9 years agocgroup-util: be more strict when processing slice unit names
Lennart Poettering [Thu, 30 Apr 2015 17:42:48 +0000 (19:42 +0200)] 
cgroup-util: be more strict when processing slice unit names

9 years agobuild-sys: remove left-over
Kay Sievers [Tue, 5 May 2015 20:05:46 +0000 (22:05 +0200)] 
build-sys: remove left-over

9 years agoAdd VARIANT as a standard value for /etc/os-release
Stephen Gallagher [Wed, 29 Apr 2015 12:19:05 +0000 (08:19 -0400)] 
Add VARIANT as a standard value for /etc/os-release

Some distributions (such as Fedora) are using the VARIANT field to
indicate to select packages which of several default configurations
they should be using. For example, VARIANT=Server provides a
different default firewall configuration (blocking basically
everything but SSH and the management console) whereas
VARIANT=Workstation opens many other ports for application
compatibility.

By adding this patch to the manual pages, we can standardize on a
cross-distribution mechanism for accomplishing this.

Fedora implementation details are available at
https://fedoraproject.org/wiki/Packaging:Per-Product_Configuration

(David: drop double paranthesis)

9 years agogenerators: rename add_{root,usr}_mount to add_{sysroot,sysroot_usr}_mount
Zbigniew Jędrzejewski-Szmek [Sat, 2 May 2015 17:01:29 +0000 (12:01 -0500)] 
generators: rename add_{root,usr}_mount to add_{sysroot,sysroot_usr}_mount

This makes it obvious that those functions are only usable in the
initramfs.

Also, add a warning when noauto, nofail, or automount is used for the
root fs, instead of silently ignoring. Using those options would be a
sign of significant misconfiguration, and if we bother to check for
them, than let's go all the way and complain.

Other various small cleanups and reformattings elsewhere.

9 years agonetwork: Implement fallback DHCPv6 prefix handling for older kernels
Patrik Flykt [Fri, 10 Apr 2015 11:03:18 +0000 (14:03 +0300)] 
network: Implement fallback DHCPv6 prefix handling for older kernels

When setting IPv6 addresses acquired by DHCPv6, systemd-networkd sets
the IFA_F_NOPREFIXROUTE flag in the IFA_FLAGS netlink attribute. As
the flag and the attribute are present starting with Linux 3.14, older
kernels will need systemd-network to manage prefix route expiry.

By default, DHCPv6 addresses are first assigned setting the
IFA_F_NOPREFIXROUTE flag in the IFA_FLAGS netlink attribute. Should
the address assignment fail, the same assignment is tried without
the IFA_FLAGS attribute. Should also the second attempt fail, an error
is printed and address assignment ends with failure. As successful use
of the IFA_FLAGS netlink attribute is recorded in the Link structure,
the DHCPv6 code will know if the kernel or systemd-network fallback
code handles expiring prefixes.

The prefix expiration and IPv6 address updating fallback code is
resurrected from the parts deleted with commit
47d45d3cde45d6545367570264e4e3636bc9e345.

This patch can be removed once the minimum kernel requirements are
greater than or equal to 3.14.

9 years agofstab-generator: fix memleak
Zbigniew Jędrzejewski-Szmek [Sat, 2 May 2015 17:01:28 +0000 (12:01 -0500)] 
fstab-generator: fix memleak

filtered was used to store an allocated string twice. The first allocation was
thus lost. The string is not needed for anything, so simply skip the allocation.

Fixup for deb0a77cf0b409141c4.

9 years agoman: use utf-8 in systemd-remount-fs.service(8)
Zbigniew Jędrzejewski-Szmek [Sat, 2 May 2015 17:01:28 +0000 (12:01 -0500)] 
man: use utf-8 in systemd-remount-fs.service(8)

9 years agoterminal: update for simpler sd-bus api's
Thomas Hindoe Paaboel Andersen [Thu, 30 Apr 2015 18:10:31 +0000 (20:10 +0200)] 
terminal: update for simpler sd-bus api's

9 years agoupdate TODO
Lennart Poettering [Thu, 30 Apr 2015 10:35:15 +0000 (12:35 +0200)] 
update TODO

9 years agocore: simplify %r and %R logic a bit
Lennart Poettering [Thu, 30 Apr 2015 10:33:54 +0000 (12:33 +0200)] 
core: simplify %r and %R logic a bit

Do not calculate the cgroup path manually, just use normal unit fields
and calls for that.

9 years agocore: catch some special cases in cg_slice_to_path()
Lennart Poettering [Thu, 30 Apr 2015 10:33:35 +0000 (12:33 +0200)] 
core: catch some special cases in cg_slice_to_path()

9 years agosym: adding missing symbols to .sym file
Lennart Poettering [Thu, 30 Apr 2015 10:01:19 +0000 (12:01 +0200)] 
sym: adding missing symbols to .sym file

9 years agosd-bus,sd-login: add api for querying the slice within the the user systemd instance...
Lennart Poettering [Thu, 30 Apr 2015 09:58:06 +0000 (11:58 +0200)] 
sd-bus,sd-login: add api for querying the slice within the the user systemd instance of a process

units are organized in slice trees, not only for the system instance,
but also for user systemd instances, expose this properly.

9 years agoupdate TODO
Lennart Poettering [Wed, 29 Apr 2015 23:54:18 +0000 (01:54 +0200)] 
update TODO

9 years agoman: update sd_bus_open() documentation
Lennart Poettering [Wed, 29 Apr 2015 23:52:39 +0000 (01:52 +0200)] 
man: update sd_bus_open() documentation

Update for current function prototypes.

Also, document -ESOCKTNOSUPPORT as being returned when protocol version
mismatches are detected.

9 years agocore: simplify unit type detection logic
Lennart Poettering [Wed, 29 Apr 2015 23:29:00 +0000 (01:29 +0200)] 
core: simplify unit type detection logic

Introduce a new call unit_type_supported() and make use of it
everywhere.

Also, drop Manager parameter from per-type supported method prototype.

9 years agosd-bus: when we get ENOTTY on the HELLO ioctl assume incompatible API version
Lennart Poettering [Wed, 29 Apr 2015 23:24:48 +0000 (01:24 +0200)] 
sd-bus: when we get ENOTTY on the HELLO ioctl assume incompatible API version

As perparation for future incompatible kdbus kernel API changes.

9 years agoupdate TODO
Lennart Poettering [Wed, 29 Apr 2015 22:49:31 +0000 (00:49 +0200)] 
update TODO

9 years agocore: rework cgroup path parse logic
Lennart Poettering [Wed, 29 Apr 2015 22:47:41 +0000 (00:47 +0200)] 
core: rework cgroup path parse logic

Various cleanups, be stricter when parsing unit paths.

Most importantly: return the root slice "-.slice" when asked for slice
of paths that contain no slice component.

9 years agonetworkd: add man for vti6 tunnel
Susant Sahani [Wed, 22 Apr 2015 08:44:56 +0000 (14:14 +0530)] 
networkd: add man for vti6 tunnel

9 years agonetworkd: introduce vti6 tunnel
Susant Sahani [Wed, 22 Apr 2015 08:44:55 +0000 (14:14 +0530)] 
networkd: introduce vti6 tunnel

This patch add support to create vti6 tunnel

test:

vt6.network
[Match]
Name=wlan0

[Network]
Tunnel=ip6vti

vti6.netdev
[NetDev]
Name=ip6vti
Kind=vti6

[Tunnel]
Local=2a00:ffde:4567:edde::4987
Remote=2001:473:fece:cafe::5179

ip link

11: ip6_vti0@NONE: <NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT
group default
    link/tunnel6 :: brd ::
12: ip6vti@wlan0: <POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN
mode DEFAULT group default
    link/tunnel6 2a00:ffde:4567:edde::4987 peer 2001:473:fece:cafe::5179

9 years agonetworkd: tunnel improve logging
Susant Sahani [Wed, 22 Apr 2015 08:44:54 +0000 (14:14 +0530)] 
networkd: tunnel improve logging

Replaces a lof ot strerror() usage with log_netdev_error_errno()

9 years agoman: document when the various sd-login.h calls return ENXIO
Lennart Poettering [Wed, 29 Apr 2015 19:45:45 +0000 (21:45 +0200)] 
man: document when the various sd-login.h calls return ENXIO

9 years agoman: document when the sd_bus_creds_xxx() calls return ENXIO
Lennart Poettering [Wed, 29 Apr 2015 19:44:55 +0000 (21:44 +0200)] 
man: document when the sd_bus_creds_xxx() calls return ENXIO

9 years agosd-bus: properly handle creds that are known but undefined for a process
Lennart Poettering [Wed, 29 Apr 2015 19:40:54 +0000 (21:40 +0200)] 
sd-bus: properly handle creds that are known but undefined for a process

A number of fields do not apply to all processes, including: there a
processes without a controlling tty, without parent process, without
service, user services or session. To distuingish these cases from the
case where we simply don't have the data, always return ENXIO for them,
while returning ENODATA for the case where we really lack the
information.

Also update the credentials dumping code to show this properly. Fields
that are known but do not apply are now shown as "n/a".

Note that this also changes some of the calls in process-util.c and
cgroup-util.c to return ENXIO for these cases.

9 years agocore: fix event source annotations
Mantas Mikulėnas [Wed, 29 Apr 2015 18:29:18 +0000 (21:29 +0300)] 
core: fix event source annotations

These looked like a mass-replace gone slightly wrong – two statements
with no { }'s, and no error checking.

9 years agotree-wide: get rid of a few more explicit bus parameters
Lennart Poettering [Wed, 29 Apr 2015 17:10:09 +0000 (19:10 +0200)] 
tree-wide: get rid of a few more explicit bus parameters

9 years agocore: for queued reload message there is no need to store the bus explicitly
Lennart Poettering [Wed, 29 Apr 2015 17:02:08 +0000 (19:02 +0200)] 
core: for queued reload message there is no need to store the bus explicitly

After all it can be derived from the message directly, and already is.

9 years agosd-bus: allow passing NULL as bus parameter to sd_bus_send()
Lennart Poettering [Wed, 29 Apr 2015 16:58:30 +0000 (18:58 +0200)] 
sd-bus: allow passing NULL as bus parameter to sd_bus_send()

If NULL is specified for the bus it is now automatically derived from
the passed in message.

This commit also changes a number of invocations of sd_bus_send() to
make use of this.

9 years agoupdate TODO
Lennart Poettering [Wed, 29 Apr 2015 16:36:17 +0000 (18:36 +0200)] 
update TODO

9 years agosd-bus: drop bus parameter from message callback prototype
Lennart Poettering [Wed, 29 Apr 2015 16:35:10 +0000 (18:35 +0200)] 
sd-bus: drop bus parameter from message callback prototype

This should simplify the prototype a bit. The bus parameter is redundant
in most cases, and in the few where it matters it can be derived from
the message via sd_bus_message_get_bus().

9 years agoman: avoid line break in url
Lennart Poettering [Wed, 29 Apr 2015 10:04:16 +0000 (12:04 +0200)] 
man: avoid line break in url

9 years agoTODO: split out issues to fix before 220
Lennart Poettering [Wed, 29 Apr 2015 10:03:57 +0000 (12:03 +0200)] 
TODO: split out issues to fix before 220

9 years agotest: rename test-bus-kernel-benchmark to test-bus-benchmark
Tom Gundersen [Wed, 29 Apr 2015 15:08:18 +0000 (17:08 +0200)] 
test: rename test-bus-kernel-benchmark to test-bus-benchmark

This can now benchmark more than just kdbus.

9 years agocore: annotate event sources
Tom Gundersen [Wed, 29 Apr 2015 14:05:32 +0000 (16:05 +0200)] 
core: annotate event sources

9 years agosd-bus: benchmark - also support testing non-kdbus transports
Tom Gundersen [Tue, 28 Apr 2015 19:39:13 +0000 (21:39 +0200)] 
sd-bus: benchmark - also support testing non-kdbus transports

We introduce two news types of benchmarks in chart-mode:
 - 'legacy' connects using the session bus
 - 'direct' connects using a peer-to-peer socket

We should probably also introduce a mode for testing the dbus1-kdbus proxy.

9 years agolibudev: monitor - fix typo in log message
Tom Gundersen [Mon, 27 Apr 2015 13:01:06 +0000 (15:01 +0200)] 
libudev: monitor - fix typo in log message

9 years agoTODO: drop journal blocker
David Herrmann [Wed, 29 Apr 2015 10:57:32 +0000 (12:57 +0200)] 
TODO: drop journal blocker

This got fixed via a cleanup by Zbigniew, see:
  http://lists.freedesktop.org/archives/systemd-devel/2015-April/031348.html

9 years agoupdate TODO
Lennart Poettering [Tue, 28 Apr 2015 19:33:02 +0000 (21:33 +0200)] 
update TODO

9 years agomachined: make PropertiesChanged match more strict
Lennart Poettering [Tue, 28 Apr 2015 19:32:42 +0000 (21:32 +0200)] 
machined: make PropertiesChanged match more strict

9 years agomachined: make sure to track machine unit states properly
Lennart Poettering [Tue, 28 Apr 2015 19:17:35 +0000 (21:17 +0200)] 
machined: make sure to track machine unit states properly

If a unit is stopped for a moment, we need to invalidate our knowledge
of it, otherwise we might be confused by automatic restarts

This makes reboots for nspawn containers run as service work correctly.

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

9 years agobus-util: drop redundant bus argument from bus_message_map_all_properties() and relat...
Lennart Poettering [Tue, 28 Apr 2015 18:48:54 +0000 (20:48 +0200)] 
bus-util: drop redundant bus argument from bus_message_map_all_properties() and related calls

9 years agonspawn: when run as a service, don't ask machined for terminatin of ourselves
Lennart Poettering [Tue, 28 Apr 2015 18:46:33 +0000 (20:46 +0200)] 
nspawn: when run as a service, don't ask machined for terminatin of ourselves

9 years agonspawn: make sure we install the device policy if nspawn is run as unit as on the...
Lennart Poettering [Tue, 28 Apr 2015 18:46:03 +0000 (20:46 +0200)] 
nspawn: make sure we install the device policy if nspawn is run as unit as on the command line

9 years agoservice: make restart logic a bit easier to understand
Lennart Poettering [Tue, 28 Apr 2015 18:45:25 +0000 (20:45 +0200)] 
service: make restart logic a bit easier to understand

9 years agoexit-status: introduce common exit_status_set_test() call for testing exit status...
Lennart Poettering [Tue, 28 Apr 2015 16:24:20 +0000 (18:24 +0200)] 
exit-status: introduce common exit_status_set_test() call for testing exit status set membership

9 years agoscope: use correct enum type
Thomas Hindoe Paaboel Andersen [Tue, 28 Apr 2015 17:02:49 +0000 (19:02 +0200)] 
scope: use correct enum type

9 years agoupdate TODO
Lennart Poettering [Tue, 28 Apr 2015 15:34:35 +0000 (17:34 +0200)] 
update TODO

9 years agofsck: remove fsckd again, but keep the door open for external replacement
Lennart Poettering [Tue, 28 Apr 2015 15:13:23 +0000 (17:13 +0200)] 
fsck: remove fsckd again, but keep the door open for external replacement

For a longer discussion see this:

http://lists.freedesktop.org/archives/systemd-devel/2015-April/030175.html

This introduces /run/systemd/fsck.progress as a simply
AF_UNIX/SOCK_STREAM socket. If it exists and is connectable we'll
connect fsck's -c switch with it. If external programs want to get
progress data they should hence listen on this socket and will get
all they need via that socket. To get information about the connecting
fsck client they should use SO_PEERCRED.

Unless /run/systemd/fsck.progress is around and connectable this change
reverts back to v219 behaviour where we'd forward fsck output to
/dev/console on our own.

9 years agofsck: minor improvements
Lennart Poettering [Tue, 28 Apr 2015 14:49:43 +0000 (16:49 +0200)] 
fsck: minor improvements

Among other smaller fixes, explicitly check if we are invoked on a block
device before making use of st.st_rdev.