1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 11:55:44 +03:00
Commit Graph

14161 Commits

Author SHA1 Message Date
Umut Tezduyar Lindskog
17256461f5 networkd: act on lease only if there is one
Interface could go down before acquiring a dhcp lease
2014-02-17 23:30:08 +01:00
Jasper St. Pierre
acfbbf5c56 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.
2014-02-17 22:07:02 +01:00
Lennart Poettering
6a6751fe24 core: warn when unit files with unsupported options are parsed 2014-02-17 17:49:09 +01:00
Lennart Poettering
5f8640fb62 core: store and expose SELinuxContext field normalized as bool + string 2014-02-17 16:52:52 +01:00
Lennart Poettering
4a3fa6ac77 Revert "man: systemd.service(5): clarify behavior of SuccessExitStatus"
This reverts commit 29e254f7f0.

Conflicts:
	man/systemd.service.xml
2014-02-17 16:37:30 +01:00
Lennart Poettering
15bd5aee09 main: make gcc shut up 2014-02-17 16:18:17 +01:00
Lennart Poettering
b6e2f3293d 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.
2014-02-17 16:17:08 +01:00
Lennart Poettering
3d0ce78b25 Update TODO 2014-02-17 15:52:32 +01:00
Lennart Poettering
03b90d4bad core: find the closest parent slice that has a specfic cgroup controller enabled when enabling/disabling cgroup controllers for units 2014-02-17 15:49:21 +01:00
Lennart Poettering
6d2357247b core: fix property changes in transient units 2014-02-17 15:49:21 +01:00
Lennart Poettering
e954c9cfa6 unit: slice dependencies should not be subject to DefaultDependencies 2014-02-17 15:49:21 +01:00
Lennart Poettering
8a8bf3c045 main: don't set no_new_privs when using SystemCallArchitectures= system-wide
After all, we want to allow userspace to get new privs...
2014-02-17 15:49:21 +01:00
Lennart Poettering
37c47eb709 nspawn: netns_fd can be removed now 2014-02-17 15:49:21 +01:00
Lennart Poettering
bc432dc7eb 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.
2014-02-17 15:49:21 +01:00
Zbigniew Jędrzejewski-Szmek
b1e90ec515 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.
2014-02-17 02:26:22 -05:00
Zbigniew Jędrzejewski-Szmek
fb4729006a Some modernizations 2014-02-17 02:26:22 -05:00
Zbigniew Jędrzejewski-Szmek
141a79f491 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.
2014-02-17 02:26:22 -05:00
Djalal Harouni
8fe63cd4f1 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.
2014-02-17 02:26:22 -05:00
Tom Gundersen
9fadd4cabf sd-dhcp: silently ignore malformed packets
This fixes a regression introduced in e5002702.
2014-02-16 23:28:19 +01:00
Tom Gundersen
489e4fbb8c 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.]
2014-02-16 23:17:19 +01:00
Thomas Hindoe Paaboel Andersen
6cd6fdb228 TODO: remove done item
strv_append was removed in e3e45d4f82
2014-02-16 22:58:24 +01:00
Thomas Hindoe Paaboel Andersen
32457153f4 nspawn: typo fix in help 2014-02-16 22:15:24 +01:00
Tom Gundersen
ab046dde6f 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.
2014-02-16 21:40:28 +01:00
Djalal Harouni
1733a00f62 Add white space between _XZ_FEATURE_ and _SECCOMP_FEATURE_ 2014-02-16 11:44:16 -05:00
Simon Peeters
a3e648ccbb bus: fix match_parse for unquoted matches 2014-02-16 11:24:15 -05:00
Yuxuan Shui
e3025da104 core: check for return value from get_process_state
Fix for commit e10c9985bb.
2014-02-16 11:09:51 -05:00
Kay Sievers
5d31974e44 README: mention libudev's requirement 2014-02-15 17:21:49 +01:00
Tom Gundersen
080ab27621 sd-dhcp: network - don't hardcode ports
We want to reuse these functions for the server library too.
2014-02-15 12:14:45 +01:00
Tom Gundersen
818dc5e72a sd-rtnl: always include linux/rtnetlink.h 2014-02-15 12:14:45 +01:00
Tom Gundersen
0bfedf143c sd-dhcp: minimum options size is part of the protocol 2014-02-15 12:14:45 +01:00
Tom Gundersen
e500270271 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.
2014-02-15 12:14:45 +01:00
Tom Gundersen
ee3a6a51e5 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.
2014-02-15 12:14:45 +01:00
Tom Gundersen
a7b74db6e7 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.
2014-02-15 12:14:45 +01:00
Zbigniew Jędrzejewski-Szmek
93b5eaec70 Fix prototype of get_process_state 2014-02-14 23:15:42 -05:00
Kay Sievers
ecea04731c util: fix mismatching function signature 2014-02-15 04:30:27 +01:00
Jason St. John
b200a92cdc man: use spaces instead of tabs
Several sections of the man pages included intermixed tabs and spaces;
this commit replaces all tabs with spaces.
2014-02-14 22:08:10 -05:00
Zbigniew Jędrzejewski-Szmek
6db2742802 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.
2014-02-14 22:03:40 -05:00
Jason St. John
bcddd5bf80 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
2014-02-14 22:03:40 -05:00
Yuxuan Shui
e10c9985bb 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.
2014-02-14 20:47:52 -05:00
Ronny Chevalier
f928d3263d test: add basic seccomp tests 2014-02-14 19:00:32 -05:00
Zbigniew Jędrzejewski-Szmek
8f9c6fe5ff 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.
2014-02-14 19:00:32 -05:00
Zbigniew Jędrzejewski-Szmek
8a8332f77e test: print the important commands to make debugging easier 2014-02-14 19:00:32 -05:00
Zbigniew Jędrzejewski-Szmek
b8667ee416 test: make the image bigger
I got some errors about lack of disk space... 100MB either way
shouldn't matter.
2014-02-14 19:00:26 -05:00
Lennart Poettering
262d10e6bd nspawn: if we don't find bash, try sh 2014-02-14 16:41:03 +01:00
Lennart Poettering
af1082b04a update TODO 2014-02-14 16:40:52 +01:00
Lennart Poettering
6b9132a9c4 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.
2014-02-14 16:35:18 +01:00
Lennart Poettering
9fccdb0f64 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 2014-02-14 15:56:19 +01:00
Djalal Harouni
6046278f40 localectl: log error if bus_map_all_properties() fails 2014-02-14 02:19:42 +01:00
Lennart Poettering
3a33e61d2d 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 2014-02-14 02:05:40 +01:00
Lennart Poettering
336c6e4690 service: if we don't know the main pid of a service, we cannot accept any notification messages 2014-02-14 02:04:09 +01:00