chiark / gitweb /
elogind.git
10 years agomachinectl: add bash completion
Thomas Hindoe Paaboel Andersen [Tue, 18 Feb 2014 20:09:05 +0000 (21:09 +0100)]
machinectl: add bash completion

10 years agoupdate TODO
Lennart Poettering [Tue, 18 Feb 2014 20:07:13 +0000 (21:07 +0100)]
update TODO

10 years agoman: machinectl: there is no command 'kill-machine'
Thomas Hindoe Paaboel Andersen [Tue, 18 Feb 2014 15:39:17 +0000 (16:39 +0100)]
man: machinectl: there is no command 'kill-machine'

10 years agoman: minor fixes to networkd page
Tom Gundersen [Tue, 18 Feb 2014 14:48:30 +0000 (15:48 +0100)]
man: minor fixes to networkd page

Also enforce that we don't allow setting the Broadcast for IPv6 addresses.

10 years agoNEWS: Fix header file name
Patrik Flykt [Tue, 18 Feb 2014 14:30:09 +0000 (16:30 +0200)]
NEWS: Fix header file name

10 years agofix SECCOMP_CFLAGS usage
Cristian Rodríguez [Tue, 18 Feb 2014 13:56:36 +0000 (10:56 -0300)]
fix SECCOMP_CFLAGS usage

SECCOMP_CFLAGS must be in the global CFLAGS as <seccomp.h> is
included in core/execute.h. when seccomp.h is not in the standard
path.(i.e openSUSE has it in /usr/include/pkg/libseccomp/, precisely to
catch this kind of bugs) compiling systemd fails.

10 years agolibsystemd-dhcp: Add a full DHCP address acquisition test case
Patrik Flykt [Tue, 18 Feb 2014 14:07:40 +0000 (16:07 +0200)]
libsystemd-dhcp: Add a full DHCP address acquisition test case

Upon startup the DHCP library will immediately send a DHCP Discover.
Handle the additional DHCP Discover checking and DHCP Offer sending
in test_addr_acq_recv_discover(). Write a zero UDP checksum, the
received XID and the faked MAC address into place to create a DHCP
message the library can accept.

Follow exactly the same steps when receiving a DHCP Request in
test_addr_acq_recv_request() and send the Ack. Check that the proper
addresses have been found by the DHCP library before exiting the
main loop and finishing the test.

10 years agolibsystemd-dhcp: Factor out test code for DHCP message verification
Patrik Flykt [Tue, 18 Feb 2014 14:07:39 +0000 (16:07 +0200)]
libsystemd-dhcp: Factor out test code for DHCP message verification

Add a callback function that will handle the test case specific checking.

10 years agolibsystemd-dhcp: Add capability to print out test steps
Patrik Flykt [Tue, 18 Feb 2014 14:07:38 +0000 (16:07 +0200)]
libsystemd-dhcp: Add capability to print out test steps

10 years agoNEWS: fix typos and grammar errors
Jason St. John [Tue, 18 Feb 2014 05:28:42 +0000 (00:28 -0500)]
NEWS: fix typos and grammar errors

10 years agoNEWS: even more fixes
Lennart Poettering [Tue, 18 Feb 2014 12:38:31 +0000 (13:38 +0100)]
NEWS: even more fixes

10 years agosd-rtnl-message: store reference to the bus in the message
Tom Gundersen [Mon, 17 Feb 2014 23:10:08 +0000 (00:10 +0100)]
sd-rtnl-message: store reference to the bus in the message

This mimics the sd-bus api, as we may need it in the future.

10 years agoNEWS: sd-resolv.h is sd-resolve.h
Daniel Buch [Tue, 18 Feb 2014 07:13:25 +0000 (08:13 +0100)]
NEWS: sd-resolv.h is sd-resolve.h

10 years agodoc: fix newly-arisen inconsistencies in NEWS
Jan Engelhardt [Tue, 18 Feb 2014 04:10:48 +0000 (05:10 +0100)]
doc: fix newly-arisen inconsistencies in NEWS

10 years agoRemove unused variable and two function stubs
Zbigniew Jędrzejewski-Szmek [Tue, 18 Feb 2014 03:25:37 +0000 (22:25 -0500)]
Remove unused variable and two function stubs

10 years agoNEWS: fix a few typos and inconsistencies
Zbigniew Jędrzejewski-Szmek [Tue, 18 Feb 2014 03:01:28 +0000 (22:01 -0500)]
NEWS: fix a few typos and inconsistencies

- systemd-delta had support for .d for a long time.
- systemd-activate had --environment before --setenv.

10 years agoNEWS: more "scary" kdbus incompatibility warning
Kay Sievers [Tue, 18 Feb 2014 02:19:57 +0000 (03:19 +0100)]
NEWS: more "scary" kdbus incompatibility warning

10 years agodoc: general refresh of orthography and grammar
Jan Engelhardt [Tue, 18 Feb 2014 02:13:08 +0000 (03:13 +0100)]
doc: general refresh of orthography and grammar

10 years agoNEWS: fix typos
Kay Sievers [Tue, 18 Feb 2014 02:06:15 +0000 (03:06 +0100)]
NEWS: fix typos

10 years agodoc: orthographic corrections
Jan Engelhardt [Tue, 18 Feb 2014 00:08:57 +0000 (01:08 +0100)]
doc: orthographic corrections

10 years agoNEWS fix
Lennart Poettering [Tue, 18 Feb 2014 02:03:04 +0000 (03:03 +0100)]
NEWS fix

10 years agoprepare NEWS
Lennart Poettering [Tue, 18 Feb 2014 01:51:39 +0000 (02:51 +0100)]
prepare NEWS

10 years agoutil: generalize code that checks whether PIDs are alive or unwaited for
Lennart Poettering [Mon, 17 Feb 2014 17:28:53 +0000 (18:28 +0100)]
util: generalize code that checks whether PIDs are alive or unwaited for

10 years agodoc: utilize the DocBook markup for some literals
Jan Engelhardt [Mon, 17 Feb 2014 14:43:36 +0000 (15:43 +0100)]
doc: utilize the DocBook markup for some literals

10 years agodoc: reword "shared per-thread" wording
Jan Engelhardt [Mon, 17 Feb 2014 14:31:28 +0000 (15:31 +0100)]
doc: reword "shared per-thread" wording

Either it is shared across threads, or it is per-thread: decide.

Reading the source code, I see a thread_local identifier, so that's
that. But that does not yet preclude that a program may pass around
the pointer returned from the function among its own threads.

Do a best effort at saying so.

10 years agodoc: balance C indirections in function prototypes
Jan Engelhardt [Sun, 16 Feb 2014 12:55:27 +0000 (13:55 +0100)]
doc: balance C indirections in function prototypes

Shift the asterisks in the documentation's prototypes such that they
are consistent among each other. Use the right side to match source code.

10 years agodoc: properly use XML entities
Jan Engelhardt [Mon, 17 Feb 2014 02:58:37 +0000 (03:58 +0100)]
doc: properly use XML entities

10 years agodoc: choose different words to improve clarity
Jan Engelhardt [Mon, 17 Feb 2014 01:49:45 +0000 (02:49 +0100)]
doc: choose different words to improve clarity

I suggest the following changes to improve the way the text reads
("flows").

10 years agodoc: resolve missing/extraneous words or inappropriate forms
Jan Engelhardt [Mon, 17 Feb 2014 02:37:18 +0000 (03:37 +0100)]
doc: resolve missing/extraneous words or inappropriate forms

Issues fixed:
* missing words required by grammar
* duplicated or extraneous words
* inappropriate forms (e.g. singular/plural), and declinations
* orthographic misspellings

10 years agodoc: update punctuation
Jan Engelhardt [Mon, 17 Feb 2014 02:37:13 +0000 (03:37 +0100)]
doc: update punctuation

Resolve spotted issues related to missing or extraneous commas, dashes.

10 years agodoc: detail what "UID" is
Jan Engelhardt [Sun, 16 Feb 2014 13:01:31 +0000 (14:01 +0100)]
doc: detail what "UID" is

10 years agodoc: quote consistently in autoconf code
Jan Engelhardt [Sun, 16 Feb 2014 12:42:17 +0000 (13:42 +0100)]
doc: quote consistently in autoconf code

AS_HELP_STRING has been observed to expand such that the surround
function complains; play it safe and consistenly quote the example
code throughout.

10 years agocore: more exact test on the procfs special string "(deleted)"
Jan Engelhardt [Sun, 16 Feb 2014 12:58:18 +0000 (13:58 +0100)]
core: more exact test on the procfs special string "(deleted)"

In other parts of systemd, the code checks for " (deleted)",
but in one instance, it did not (yet). Make it do the same.

10 years agoman: fix a typo
Ansgar Burchardt [Mon, 17 Feb 2014 20:34:20 +0000 (21:34 +0100)]
man: fix a typo

10 years agonetworkd: act on lease only if there is one
Umut Tezduyar Lindskog [Mon, 17 Feb 2014 20:16:53 +0000 (21:16 +0100)]
networkd: act on lease only if there is one

Interface could go down before acquiring a dhcp lease

10 years agoFix gperf syntax
Jasper St. Pierre [Mon, 17 Feb 2014 21:07:02 +0000 (22:07 +0100)]
Fix gperf syntax

If we put a closing bracket on its own line, gperf will complain about
empty lines. Only occurs if the option in question is disabled. So fix the
m4 macros to work properly in both cases.

10 years agocore: warn when unit files with unsupported options are parsed
Lennart Poettering [Mon, 17 Feb 2014 16:49:09 +0000 (17:49 +0100)]
core: warn when unit files with unsupported options are parsed

10 years agocore: store and expose SELinuxContext field normalized as bool + string
Lennart Poettering [Mon, 17 Feb 2014 15:52:52 +0000 (16:52 +0100)]
core: store and expose SELinuxContext field normalized as bool + string

10 years agoRevert "man: systemd.service(5): clarify behavior of SuccessExitStatus"
Lennart Poettering [Mon, 17 Feb 2014 15:37:30 +0000 (16:37 +0100)]
Revert "man: systemd.service(5): clarify behavior of SuccessExitStatus"

This reverts commit 29e254f7f093c07a1ec7e845e60203357f585235.

Conflicts:
man/systemd.service.xml

10 years agomain: make gcc shut up
Lennart Poettering [Mon, 17 Feb 2014 15:18:17 +0000 (16:18 +0100)]
main: make gcc shut up

10 years agocore: fixate show_status earlier, so that we actually print the welcome message
Lennart Poettering [Mon, 17 Feb 2014 15:17:08 +0000 (16:17 +0100)]
core: fixate show_status earlier, so that we actually print the welcome message

Previously, we'd fixed show_state only after printing the welcome
message which had the effect that the welcome message was almost always
suppressed.

10 years agoUpdate TODO
Lennart Poettering [Mon, 17 Feb 2014 14:52:32 +0000 (15:52 +0100)]
Update TODO

10 years agocore: find the closest parent slice that has a specfic cgroup controller enabled...
Lennart Poettering [Mon, 17 Feb 2014 01:06:32 +0000 (02:06 +0100)]
core: find the closest parent slice that has a specfic cgroup controller enabled when enabling/disabling cgroup controllers for units

10 years agocore: fix property changes in transient units
Lennart Poettering [Mon, 17 Feb 2014 00:58:33 +0000 (01:58 +0100)]
core: fix property changes in transient units

10 years agounit: slice dependencies should not be subject to DefaultDependencies
Lennart Poettering [Mon, 17 Feb 2014 00:19:08 +0000 (01:19 +0100)]
unit: slice dependencies should not be subject to DefaultDependencies

10 years agomain: don't set no_new_privs when using SystemCallArchitectures= system-wide
Lennart Poettering [Mon, 17 Feb 2014 00:14:14 +0000 (01:14 +0100)]
main: don't set no_new_privs when using SystemCallArchitectures= system-wide

After all, we want to allow userspace to get new privs...

10 years agonspawn: netns_fd can be removed now
Lennart Poettering [Sun, 16 Feb 2014 21:20:19 +0000 (22:20 +0100)]
nspawn: netns_fd can be removed now

10 years agocore: rework cgroup mask propagation
Lennart Poettering [Fri, 14 Feb 2014 18:11:07 +0000 (19:11 +0100)]
core: rework cgroup mask propagation

Previously a cgroup setting down tree would result in cgroup membership
additions being propagated up the tree and to the siblings, however a
unit could never lose cgroup memberships again. With this change we'll
make sure that both cgroup additions and removals propagate properly.

10 years agoPass log config from systemd to systemd-shutdown
Zbigniew Jędrzejewski-Szmek [Sat, 15 Feb 2014 23:13:46 +0000 (18:13 -0500)]
Pass log config from systemd to systemd-shutdown

If PID 1 debug logging is enabled, it is nice to keep those settings
when switching to systemd-shutdown binary, independently of whether
this was done through /proc/cmdline options, or through runtime
manipulations.

10 years agoSome modernizations
Zbigniew Jędrzejewski-Szmek [Sat, 15 Feb 2014 23:10:36 +0000 (18:10 -0500)]
Some modernizations

10 years agoExtract looping over /proc/cmdline into a shared function
Zbigniew Jędrzejewski-Szmek [Sat, 15 Feb 2014 23:08:59 +0000 (18:08 -0500)]
Extract looping over /proc/cmdline into a shared function

In cryptsetup-generator automatic cleanup had to be replaced
with manual cleanup, and the code gets a bit longer. But existing
code had the issue that it returned negative values from main(),
which was wrong, so should be reworked anyway.

10 years agologind: close race on session state during logins
Djalal Harouni [Thu, 13 Feb 2014 22:03:23 +0000 (23:03 +0100)]
logind: close race on session state during logins

At login there is a small race window where session_get_state() will
return SESSION_ACTIVE instead of SESSION_OPENING. This must be fixed
since during that time there are calls to session_save() to save
session states and we want to write the correct state.

When we queue the start scope and service jobs, we wait for both of them
to finish before calling and continue processing in:
"session_jobs_reply() => session_send_create_reply()"
to create the session fifo and notify clients.

However, in the match_job_removed() D-Bus signal, we may hit situations
where the scope job has successfully finished and we are still waiting
for the user service job to finish. During that time the
"session->scope_job" will be freed and set to NULL, this makes
session_get_state() return SESSION_ACTIVE before it is really active, it
should return SESSION_OPENING since we are still waiting for the service
job to finish in order to create the session fifo.

To fix this, we also check if the session fifo fd was created, if so then
the session has entered the SESSION_ACTIVE state, if not then it is still
in the SESSION_OPENING state and it is waiting for the scope and service
jobs to finish.

10 years agosd-dhcp: silently ignore malformed packets
Tom Gundersen [Sun, 16 Feb 2014 22:28:19 +0000 (23:28 +0100)]
sd-dhcp: silently ignore malformed packets

This fixes a regression introduced in e5002702.

10 years agosd-rtnl: do not require ifindex to be set for SETLINK messages
Tom Gundersen [Sun, 16 Feb 2014 20:39:50 +0000 (21:39 +0100)]
sd-rtnl: do not require ifindex to be set for SETLINK messages

The kernel will then look up the ifindex itself based on the name.
This should be used very carefully as it is racey.

[This was a left-over hunk from my previous nspawn patch.]

10 years agoTODO: remove done item
Thomas Hindoe Paaboel Andersen [Sun, 16 Feb 2014 21:58:24 +0000 (22:58 +0100)]
TODO: remove done item

strv_append was removed in e3e45d4f82daa5cd85ba40dde9127df900096c0c

10 years agonspawn: typo fix in help
Thomas Hindoe Paaboel Andersen [Sun, 16 Feb 2014 21:15:24 +0000 (22:15 +0100)]
nspawn: typo fix in help

10 years agonspawn: add new --network-bridge= switch
Tom Gundersen [Sun, 16 Feb 2014 20:12:47 +0000 (21:12 +0100)]
nspawn: add new --network-bridge= switch

This adds the host side of the veth link to the given bridge.

Also refactor the creation of the veth interfaces a bit to set it up
from the host rather than the container. This simplifies the addition
to the bridge, but otherwise the behavior is unchanged.

10 years agoAdd white space between _XZ_FEATURE_ and _SECCOMP_FEATURE_
Djalal Harouni [Sat, 15 Feb 2014 16:15:33 +0000 (17:15 +0100)]
Add white space between _XZ_FEATURE_ and _SECCOMP_FEATURE_

10 years agobus: fix match_parse for unquoted matches
Simon Peeters [Sun, 16 Feb 2014 02:01:17 +0000 (03:01 +0100)]
bus: fix match_parse for unquoted matches

10 years agocore: check for return value from get_process_state
Yuxuan Shui [Sat, 15 Feb 2014 05:20:55 +0000 (13:20 +0800)]
core: check for return value from get_process_state

Fix for commit e10c9985bb.

10 years agoREADME: mention libudev's requirement
Kay Sievers [Sat, 15 Feb 2014 16:21:49 +0000 (17:21 +0100)]
README: mention libudev's requirement

10 years agosd-dhcp: network - don't hardcode ports
Tom Gundersen [Fri, 14 Feb 2014 16:23:58 +0000 (17:23 +0100)]
sd-dhcp: network - don't hardcode ports

We want to reuse these functions for the server library too.

10 years agosd-rtnl: always include linux/rtnetlink.h
Tom Gundersen [Fri, 14 Feb 2014 23:06:09 +0000 (00:06 +0100)]
sd-rtnl: always include linux/rtnetlink.h

10 years agosd-dhcp: minimum options size is part of the protocol
Tom Gundersen [Fri, 14 Feb 2014 10:58:41 +0000 (11:58 +0100)]
sd-dhcp: minimum options size is part of the protocol

10 years agosd-dhcp-client: explicitly handle raw and udp messages
Tom Gundersen [Thu, 13 Feb 2014 19:56:16 +0000 (20:56 +0100)]
sd-dhcp-client: explicitly handle raw and udp messages

Split the recevie_message callback into _raw and _udp parts and a generic
DHCPMessage handler.

Also always verify the xid/MAC, rather than only for udp messages.

10 years agosd-rtnl: message_open_container - don't take a 'size' argument
Tom Gundersen [Fri, 14 Feb 2014 21:39:48 +0000 (22:39 +0100)]
sd-rtnl: message_open_container - don't take a 'size' argument

We can always know the size based on the type, so let's do this inside the library.

10 years agosd-rtnl: link flags - don't allow change = 0
Tom Gundersen [Fri, 14 Feb 2014 11:15:26 +0000 (12:15 +0100)]
sd-rtnl: link flags - don't allow change = 0

The kernel will happily treat 0x0 as 0xffffffff, but it is for backwards
compatibility only, so let's not perpetuate this.

10 years agoFix prototype of get_process_state
Zbigniew Jędrzejewski-Szmek [Sat, 15 Feb 2014 04:04:50 +0000 (23:04 -0500)]
Fix prototype of get_process_state

10 years agoutil: fix mismatching function signature
Kay Sievers [Sat, 15 Feb 2014 03:30:27 +0000 (04:30 +0100)]
util: fix mismatching function signature

10 years agoman: use spaces instead of tabs
Jason St. John [Sat, 15 Feb 2014 03:07:22 +0000 (22:07 -0500)]
man: use spaces instead of tabs

Several sections of the man pages included intermixed tabs and spaces;
this commit replaces all tabs with spaces.

10 years agoman: replace STDOUT with standard output, etc.
Zbigniew Jędrzejewski-Szmek [Sat, 15 Feb 2014 03:00:06 +0000 (22:00 -0500)]
man: replace STDOUT with standard output, etc.

Actually 'STDOUT' is something that doesn't appear anywhere: in the
stdlib we have 'stdin', and there's only the constant STDOUT_FILENO,
so there's no reason to use capitals. When refering to code,
STDOUT/STDOUT/STDERR are replaced with stdin/stdout/stderr, and in
other places they are replaced with normal phrases like standard
output, etc.

10 years agoman: fix grammatical errors and other formatting issues
Jason St. John [Fri, 14 Feb 2014 01:25:23 +0000 (20:25 -0500)]
man: fix grammatical errors and other formatting issues

* standardize capitalization of STDIN, STDOUT, and STDERR
* reword some sentences for clarity
* reflow some very long lines to be shorter than ~80 characters
* add some missing <literal>, <constant>, <varname>, <option>, and <filename> tags

10 years agocore: fix detection of dead processes
Yuxuan Shui [Fri, 14 Feb 2014 18:38:50 +0000 (02:38 +0800)]
core: fix detection of dead processes

Commit 5ba6985b moves the UNIT_VTABLE(u)->sigchld_event before systemd
actually reaps the zombie. Which leads to service_load_pid_file accepting
zombie as a valid pid.

This fixes timeouts like:
[ 2746.602243] systemd[1]: chronyd.service stop-sigterm timed out. Killing.
[ 2836.852545] systemd[1]: chronyd.service still around after SIGKILL. Ignoring.
[ 2927.102187] systemd[1]: chronyd.service stop-final-sigterm timed out. Killing.
[ 3017.352560] systemd[1]: chronyd.service still around after final SIGKILL. Entering failed mode.

10 years agotest: add basic seccomp tests
Ronny Chevalier [Fri, 14 Feb 2014 16:21:41 +0000 (17:21 +0100)]
test: add basic seccomp tests

10 years agounits: systemd-logind fails hard without dbus
Zbigniew Jędrzejewski-Szmek [Fri, 14 Feb 2014 22:01:43 +0000 (17:01 -0500)]
units: systemd-logind fails hard without dbus

That is, without --enable-kdbus and kdbus running.

With --enable-kdbus things are more complicated, because dbus might be
necessary, if kdbus is missing at runtime. If it is not necessary,
the socket will be started, which is not imporant, but not the service.

10 years agotest: print the important commands to make debugging easier
Zbigniew Jędrzejewski-Szmek [Fri, 14 Feb 2014 21:39:58 +0000 (16:39 -0500)]
test: print the important commands to make debugging easier

10 years agotest: make the image bigger
Zbigniew Jędrzejewski-Szmek [Fri, 14 Feb 2014 21:39:15 +0000 (16:39 -0500)]
test: make the image bigger

I got some errors about lack of disk space... 100MB either way
shouldn't matter.

10 years agonspawn: if we don't find bash, try sh
Lennart Poettering [Fri, 14 Feb 2014 15:41:03 +0000 (16:41 +0100)]
nspawn: if we don't find bash, try sh

10 years agoupdate TODO
Lennart Poettering [Fri, 14 Feb 2014 15:40:52 +0000 (16:40 +0100)]
update TODO

10 years agonspawn: don't accept just any tree to execute
Lennart Poettering [Fri, 14 Feb 2014 15:35:18 +0000 (16:35 +0100)]
nspawn: don't accept just any tree to execute

When invoked without -D in an arbitrary directory we should not try to
execute anything, make some validity checks first.

10 years agoman: always place <programlisting> and </programlisting> in a line with actual source...
Lennart Poettering [Fri, 14 Feb 2014 14:56:19 +0000 (15:56 +0100)]
man: always place <programlisting> and </programlisting> in a line with actual sources, so that we don't get spurious newlines in the man page output

10 years agolocalectl: log error if bus_map_all_properties() fails
Djalal Harouni [Thu, 19 Dec 2013 10:14:33 +0000 (11:14 +0100)]
localectl: log error if bus_map_all_properties() fails

10 years agoservice: when we complain about a notify message we cannot map to main pid because...
Lennart Poettering [Fri, 14 Feb 2014 01:05:40 +0000 (02:05 +0100)]
service: when we complain about a notify message we cannot map to main pid because we don't know anything about the main pid, do so at debug level

10 years agoservice: if we don't know the main pid of a service, we cannot accept any notificatio...
Lennart Poettering [Fri, 14 Feb 2014 01:04:09 +0000 (02:04 +0100)]
service: if we don't know the main pid of a service, we cannot accept any notification messages

10 years agobuild-sys: fix for "recipe for target 'dbus1-generator-install-hook' failed"
Simon Peeters [Fri, 14 Feb 2014 00:52:40 +0000 (01:52 +0100)]
build-sys: fix for "recipe for target 'dbus1-generator-install-hook' failed"

10 years agoman: systemd.service(5): clarify behavior of SuccessExitStatus
Dave Reisner [Fri, 14 Feb 2014 00:40:04 +0000 (01:40 +0100)]
man: systemd.service(5): clarify behavior of SuccessExitStatus

The behavior of this is a little cryptic in that $MAINPID must exit as
a direct result of receiving a signal in order for a listed signal to
be considered a success condition.

10 years agoshared: include root when canonicalizing conf paths
Michael Marineau [Fri, 31 Jan 2014 23:35:04 +0000 (15:35 -0800)]
shared: include root when canonicalizing conf paths

The conf_files_list family accepts an alternate root path to prefix all
directories in the list but path_strv_canonicalize_uniq doesn't use it.
This results in the suspicious behavior of resolving directory symlinks
based on the contents of / instead of the alternate root.

This adds a prefix argument to path_strv_canonicalize which will now
prepend the prefix, if given, to every path in the list. To avoid
answering what a relative path means when called with a root prefix
path_strv_canonicalize is now path_strv_canonicalize_absolute and only
considers absolute paths. Fortunately all users of already call
path_strv_canonicalize with a list of absolute paths.

10 years agologind: make sure to terminate systemd user on logouts
Djalal Harouni [Thu, 13 Feb 2014 17:31:43 +0000 (18:31 +0100)]
logind: make sure to terminate systemd user on logouts

Currently if the user logs out, the GC may never call user_stop(),
this will not terminate the systemd user and (sd-pam) of that user.

To fix this, remove the USER_CLOSING state check that is blocking the
GC from calling user_stop(). Since if user_check_gc() returns false
this means that all the sessions of the user were removed which will
make user_get_state() return USER_CLOSING.

Conclusion: that test will never be statisfied.

So we remove the USER_CLOSING check and replace it with a check inside
user_stop() this way we know that user_stop() has already queued stop
jobs, no need to redo.

This ensures that the GC will get its two steps correctly as pointed out
by Lennart:
http://lists.freedesktop.org/archives/systemd-devel/2014-February/016825.html

Note: this also fixes another bug that prevents creating the user
private dbus socket which will break communications with the user
manager.

10 years agonspawn: make socket(AF_NETLINK, *, NETLINK_AUDIT) fail with EAFNOTSUPPORT in containers
Lennart Poettering [Thu, 13 Feb 2014 19:30:02 +0000 (20:30 +0100)]
nspawn: make socket(AF_NETLINK, *, NETLINK_AUDIT) fail with EAFNOTSUPPORT in containers

The kernel still doesn't support audit in containers, so let's make use
of seccomp and simply turn it off entirely. We can get rid of this big
as soon as the kernel is fixed again.

10 years agonspawn: add new --network-veth switch to add a virtual ethernet link to the host
Lennart Poettering [Thu, 13 Feb 2014 17:47:20 +0000 (18:47 +0100)]
nspawn: add new --network-veth switch to add a virtual ethernet link to the host

10 years agortnl: support adding VETH_INFO_PEER containers into rtnl messages
Lennart Poettering [Thu, 13 Feb 2014 17:46:48 +0000 (18:46 +0100)]
rtnl: support adding VETH_INFO_PEER containers into rtnl messages

10 years agosystemctl: fix exit statuses from is-active/is-failed
Dave Reisner [Thu, 13 Feb 2014 15:14:31 +0000 (10:14 -0500)]
systemctl: fix exit statuses from is-active/is-failed

This was inadvertantly disturbed in e3e0314b when glob support was
added.

10 years agoeverywhere: always use O_CLOEXEC where it makes sense
Lennart Poettering [Thu, 13 Feb 2014 13:59:56 +0000 (14:59 +0100)]
everywhere: always use O_CLOEXEC where it makes sense

10 years agoeverywhere: make use of new0() and macro() macros, and stop using perror()
Lennart Poettering [Thu, 13 Feb 2014 13:45:51 +0000 (14:45 +0100)]
everywhere: make use of new0() and macro() macros, and stop using perror()

10 years agonspawn: check with udev before we take possession of an interface
Lennart Poettering [Thu, 13 Feb 2014 13:38:02 +0000 (14:38 +0100)]
nspawn: check with udev before we take possession of an interface

10 years agonspawn: no need to subscribe to netlink messages if we just want to execute one operation
Lennart Poettering [Thu, 13 Feb 2014 13:08:16 +0000 (14:08 +0100)]
nspawn: no need to subscribe to netlink messages if we just want to execute one operation

10 years agonspawn: --private-network should imply CAP_NET_ADMIN
Lennart Poettering [Thu, 13 Feb 2014 13:07:59 +0000 (14:07 +0100)]
nspawn: --private-network should imply CAP_NET_ADMIN

10 years agortnl: rename constructors from the form sd_rtnl_xxx_yyy_new() to sd_rtnl_xxx_new_yyy()
Lennart Poettering [Thu, 13 Feb 2014 12:53:25 +0000 (13:53 +0100)]
rtnl: rename constructors from the form sd_rtnl_xxx_yyy_new() to sd_rtnl_xxx_new_yyy()

So far we followed the rule to always indicate the "flavour" of
constructors after the "_new_" or "_open_" in the function name, so
let's keep things in sync here for rtnl and do the same.

10 years agortnl: drop "sd_" prefix from cleanup macros
Lennart Poettering [Thu, 13 Feb 2014 02:44:14 +0000 (03:44 +0100)]
rtnl: drop "sd_" prefix from cleanup macros

The "sd_" prefix is supposed to be used on exported symbols only, and
not in the middle of names. Let's drop it from the cleanup macros hence,
to make things simpler.

The bus cleanup macros don't carry the "sd_" either, so this brings the
APIs a bit nearer.

10 years agonspawn: add new --network-interface= switch to move an existing interface into the...
Lennart Poettering [Thu, 13 Feb 2014 02:27:39 +0000 (03:27 +0100)]
nspawn: add new --network-interface= switch to move an existing interface into the container