Commit graph

14047 commits

Author SHA1 Message Date
Karel Zak 3c3e5f4276 build-sys: move python helpers to tools directory
Note that make-man-rules.py is missing in EXTRA_DIST=, this patch
fixes this mistake too.
2014-02-10 13:02:34 +01:00
Karel Zak bfb35cfda1 build-sys: add check-includes build target and script 2014-02-10 13:00:19 +01:00
Colin Guthrie 63a1b905d8 fstab-generator: Create fsck-root symlink with correct path
This was noticed in Brussels at the hackfest. The fstab-generator currently
creates a broken symlink pointing to itself in
/run/systemd/generator/local-fs.target.wants/ for systemd-fsck-root.service
2014-02-10 11:59:07 +01:00
Vincent Batts fcf90586a2 nspawn: require /etc/os-release only for init
/etc/os-release is expected for the case for booting a full system, and
need not be required for thin container execution.
2014-02-10 11:57:53 +01:00
Tom Gundersen d50cf59b94 networkd: fix setting dns from dhcp 2014-02-10 11:53:20 +01:00
Zbigniew Jędrzejewski-Szmek bbf261b75f man: fix another reference in systemd-inhibit(1)
http://bugs.debian.org/738316
2014-02-09 09:14:40 -05:00
Zbigniew Jędrzejewski-Szmek 07b4b9b822 man: fix reference in systemd-inhibit(1)
http://bugs.debian.org/738316
2014-02-09 01:35:44 -05:00
Zbigniew Jędrzejewski-Szmek 49888ca9ef manager: fix initialization of plymouth socket
I'm not sure why this makes a difference...
2014-02-08 16:19:22 -05:00
Dave Reisner 66a5dbdf28 cryptsetup-generator: auto add deps for device as password
If the password is a device file, we can add Requires/After dependencies
on the device rather than requiring the user to do so.
2014-02-08 13:53:02 -05:00
Zbigniew Jędrzejewski-Szmek 2ba110900a core: use automatic cleanup in two functions 2014-02-08 13:07:39 -05:00
Zbigniew Jędrzejewski-Szmek 550a40eceb core: do not print invalid utf-8 in error messages 2014-02-08 13:07:39 -05:00
Zbigniew Jędrzejewski-Szmek cda7ecb0a3 pam-module: avoid (null) in debug message 2014-02-08 13:07:39 -05:00
Goffredo Baroncelli f27f0e2177 core: fix crashes if locale.conf contains invalid utf-8 string
In the parse_env_file_push() and load_env_file_push() functions, there
are two assert() call to check if the key or value parameters are utf8 valid.

If the strings aren't utf8 valid, assert does abort.

These function are used early by systemd to parse some files. For
example '/etc/locale.conf'. In my case this file contained a not utf8
sequence, which is bad, but systemd crashed during the boot, which
is even worse!

The enclosed patch removes the assert and return -EINVAL if the
sequence is invalid. This is possible because the caller of these
function [1] checks the errors.
So the check of an invalid utf8 sequence is still performed, but
systemd doesn't crash anymore and logs the error.

[1] parse_env_file_internal(), invoked by load_env_file() and
parse_env_file()
2014-02-08 13:07:39 -05:00
Thomas Hindoe Paaboel Andersen ecd2f2c594 remove unused variables 2014-02-07 23:09:40 +01:00
Lennart Poettering ba978d7b32 nspawn: rename --file-label to --apifs-label since it's really just about the API file systems, nothing else 2014-02-07 19:29:28 +01:00
Lennart Poettering 4e2f8d2778 core: when an already abandoned unit gets abandoned again generate a clean error 2014-02-07 19:26:49 +01:00
Lennart Poettering ba4c5d93b7 logind: order all scopes after both systemd-logind.service and
systemd-user-sessions.service

This way at shutdown we can be sure that the sessions go away before the
network.
2014-02-07 17:49:16 +01:00
Tom Gundersen 1a43680949 networkd: netdev - rename Netdev to NetDev
Both in the configuration file format and everywhere else in the code.
2014-02-07 17:07:11 +01:00
Djalal Harouni 99e7e3922e logind: add function session_jobs_reply() to unify the create reply
The session_send_create_reply() function which notifies clients about
session creation is used for both session and user units. Unify the
shared code in a new function session_jobs_reply().

The session_save() will be called unconditionally on sessions since it
does not make sense to only call it if '!session->started', this will
also allow to update the session state as soon as possible.
2014-02-07 16:34:18 +01:00
Lennart Poettering 743970d2ea core: one step back again, for nspawn we actually can't wait for cgroups running empty since systemd will get exactly zero notifications about it 2014-02-07 16:18:16 +01:00
Lennart Poettering 4e05c4951a machined: since we can now somewhat reliable get notifications for dying
scopes we don't need to lower the stop timeout anymore
2014-02-07 16:18:16 +01:00
Jan Janssen 0452ffebbb man: cryptsetup-1.6.3 now allows partition device file in system mode 2014-02-07 15:51:58 +01:00
Tom Gundersen 07c71313c5 build-sys: autogen - enable compat libs by default 2014-02-07 15:48:35 +01:00
Tom Gundersen a6cc569e33 sd-dhcp-client: split sd_dhcp_lease from sd_dhcp_client
This allows us users of the library to keep copies of old leases. This is
used by networkd to know what addresses to drop (if any) when the lease
expires.

In the future this may be used by DNAv4 and sd-dhcp-server.
2014-02-07 15:48:35 +01:00
Tom Gundersen d72143bad4 zsh-completions: kernel-install - only show existing kernels for 'remove'
When we remove a kernel, we don't remove the modules, so don't look at the modules directory to find installed kernels.
2014-02-07 15:48:35 +01:00
Lennart Poettering a50df72b37 logind: given that we can now relatively safely shutdown sessions copes
without working cgroup empty notifications there's no need to set the
stop timeout of sessions scopes low
2014-02-07 15:14:36 +01:00
Lennart Poettering 5ba6985b6c core: allow PIDs to be watched by two units at the same time
In some cases it is interesting to map a PID to two units at the same
time. For example, when a user logs in via a getty, which is reexeced to
/sbin/login that binary will be explicitly referenced as main pid of the
getty service, as well as implicitly referenced as part of the session
scope.
2014-02-07 15:14:36 +01:00
Lennart Poettering 8190da36f7 core: don't send duplicate SIGCONT when killing units 2014-02-07 15:14:36 +01:00
Lennart Poettering 6e8314c420 cgroup: make sure to properly send SIGCONT to all processes of a cgroup if that's requested 2014-02-07 15:14:36 +01:00
Lennart Poettering 5f41d1f10f logind: rework session shutdown logic
Simplify the shutdown logic a bit:

- Keep the session FIFO around in the PAM module, even after the session
  shutdown hook has been finished. This allows logind to track precisely
  when the PAM handler goes away.

- In the ReleaseSession() call start a timer, that will stop terminate
  the session when elapsed.

- Never fiddle with the KillMode of scopes to configure whether user
  processes should be killed or not. Instead, simply leave the scope
  units around when we terminate a session whose processes should not be
  killed.

- When killing is enabled, stop the session scope on FIFO EOF or after
  the ReleaseSession() timeout. When killing is disabled, simply tell
  PID 1 to abandon the scope.

Because the scopes stay around and hence all processes are always member
of a scope, the system shutdown logic should be more robust, as the
scopes can be shutdown as part of the usual shutdown logic.
2014-02-07 15:14:36 +01:00
Lennart Poettering a911bb9ab2 core: watch SIGCHLD more closely to track processes of units with no reliable cgroup empty notifier
When a process dies that we can associate with a specific unit, start
watching all other processes of that unit, so that we can associate
those processes with the unit too.

Also, for service units start doing this as soon as we get the first
SIGCHLD for either control or main process, so that we can follow the
processes of the service from one to the other, as long as process that
remain are processes of the ones we watched that died and got reassigned
to us as parent.

Similar, for scope units start doing this as soon as the scope
controller abandons the unit, and thus management entirely reverts to
systemd. To abandon a unit introduce a new Abandon() scope unit method
call.
2014-02-07 15:14:36 +01:00
Thomas Hindoe Paaboel Andersen 1006a62d20 core: fix warning
introduced in c7040b5d1c
2014-02-07 00:01:19 +01:00
Zbigniew Jędrzejewski-Szmek 627a98d398 shell-completion: fix completion of localectl set-locale
https://bugs.freedesktop.org/show_bug.cgi?id=74157
2014-02-06 12:01:39 -05:00
Tom Gundersen 5d63309cf5 nspawn: fix HAVE_SELINUX ifdef 2014-02-06 17:30:01 +01:00
Zbigniew Jędrzejewski-Szmek 75cb8502df transaction: print more information about conflicting jobs
Also remove some debug statement that should not have been committed.
2014-02-06 00:46:15 -05:00
Zbigniew Jędrzejewski-Szmek 3ce09b7da2 bash-completion: fix completion of complete verbs
When doing 'command verb<TAB>', the arguments for verb would be
proposed, but it is too early. We should complete verb first.

https://bugs.freedesktop.org/show_bug.cgi?id=74596
2014-02-06 00:45:00 -05:00
Lennart Poettering 97e0691f85 core: only send SIGHUP when doing first kill, not when doing final sigkill 2014-02-06 02:13:23 +01:00
Jóhann B. Guðmundsson 99bd4af0c7 udev: add zram to the list of devices inappropriate for symlinks
udev seems to have a race condition with swapon to see which can open
/dev/zram0 first, causing swapon to fail. Seems to be most noticeable
on arm devices one out of every 7 times or something.
2014-02-05 19:29:33 -05:00
Zbigniew Jędrzejewski-Szmek 90b2de37b8 Update some message formats
Use PID_FMT/USEC_FMT/... in more places.

Also update logind error messages to print the full path to a file that
failed. This should make debugging easier for people who do not know
off the top of their head where logind stores it state.
2014-02-05 19:00:36 -05:00
Lennart Poettering 284c0b9176 nspawn: add --quiet switch for turning off any output noise 2014-02-06 00:43:14 +01:00
Lennart Poettering 1c03020cc4 nspawn: always use default bus 2014-02-05 23:06:34 +01:00
Lennart Poettering f4d140e9a6 bus: properly unset default bus pointer when destroying last reference 2014-02-05 23:06:13 +01:00
Lennart Poettering a4cd87e9dc man: introduce new "Desktop" property for sessions
This is initialized from XDG_SESSION_DESKTOP and is useful for GNOME
to recognize its own sessions. It's supposed to be set to a short string
identifying the session, such as "kde" or "gnome".
2014-02-05 20:44:49 +01:00
Lennart Poettering 49ebd11fb0 logind: make session type and class settable via the same ways
If the session type/class is set via environment variables, use that,
and otherwise fallback to something that is set via the PAM module
command line.
2014-02-05 18:55:18 +01:00
Lennart Poettering d9eb81f984 logind: add new "wayland" session type 2014-02-05 18:27:43 +01:00
Lennart Poettering 1baccdda2e core: don't wait for non-control/non-main processes when killing processes on the host either
Since the current kernel cgroup notification logic is easily confused by
existing subgroups, let's do the same thing as in containers before. and
just not wait for non-control and non-main processes.

This should be corrected as soon as we have sane cgroup notifications
from the kernel.
2014-02-05 02:22:11 +01:00
Lennart Poettering b4f052a05a kill: fix error return 2014-02-05 02:11:18 +01:00
Lennart Poettering c7040b5d1c core: allow User=, Group=, Nice=, Environment=, Type= to be passed when creating a transient service 2014-02-05 02:03:10 +01:00
Susant Sahani 7b1796403a Added attribute support for sd-rtnl
Added sd_rtnl_message_append_u8 and
  few attribute support in sd_rtnl_message_append_u32
       IFLA_GROUP, IFLA_TXQLEN, IFLA_NUM_TX_QUEUES, IFLA_NUM_RX_QUEUES
2014-02-05 00:07:29 +01:00
Lennart Poettering d002827b03 nspawn: various fixes in selinux hookup
- As suggested, prefix argument variables with "arg_" how we do this
  usually.

- As suggested, don't involve memory allocations when storing command
  line arguments.

- Break --help text at 80 chars

- man: explain that this is about SELinux

- don't do unnecessary memory allocations when putting together mount
  option string
2014-02-04 22:56:07 +01:00