1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00
Commit Graph

12375 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
77009452cf systemd: order remote mounts from mountinfo before remote-fs.target
Usually the network is stopped before filesystems are umounted.
Ordering network filesystems before remote-fs.target means that their
unmounting will be performed earlier, and can terminate sucessfully.

https://bugs.freedesktop.org/show_bug.cgi?id=70002
2013-10-03 22:15:08 -04:00
Zbigniew Jędrzejewski-Szmek
5862d652ba Introduce _cleanup_endmntent_ 2013-10-03 22:13:55 -04:00
Zbigniew Jędrzejewski-Szmek
9a5cb1371b gpt-auto-generator: exit immediately if in container
Otherwise we get an ugly warning when running systemd in
a container.
2013-10-03 22:13:01 -04:00
Zbigniew Jędrzejewski-Szmek
970edce6ef execute: more debugging messages 2013-10-03 22:12:32 -04:00
Václav Pavlín
e776c8cfcd man: Improve the description of parameter X in tmpfiles.d page 2013-10-03 15:49:03 +02:00
Zbigniew Jędrzejewski-Szmek
59fccd8211 execute.c: always set $SHELL
In e6dca81 $SHELL was added to user@.service. Let's
instead provide it to all units which have a user.
2013-10-02 22:23:56 +02:00
Dave Reisner
7074fecf67 tmpfiles.d: include setgid perms for /run/log/journal
4608af4333 set permissions for journal storage on persistent disk
but not the volatile storage.

ref: https://bugs.archlinux.org/task/37170
2013-10-02 15:35:16 -04:00
Lennart Poettering
51045322c4 nspawn: always copy /etc/resolv.conf rather than bind mount
We were already creating the file if it was missing, and this way
containers can reconfigure the file without running into problems.

This also makes resolv.conf handling more alike to handling of
/etc/localtime, which is also not a bind mount.
2013-10-02 19:45:12 +02:00
Lennart Poettering
69c2b6be8f mkdir: pass a proper function pointer to mkdir_safe_internal 2013-10-02 19:45:12 +02:00
Lennart Poettering
5b4fb02d89 strv: don't access potentially NULL string arrays 2013-10-02 19:45:12 +02:00
Lennart Poettering
62678deda2 efi: never call qsort on potentially NULL arrays 2013-10-02 19:45:12 +02:00
Lennart Poettering
b857193b1d modules-load: fix error handling 2013-10-02 19:45:12 +02:00
Lennart Poettering
2e8d788c2f dbus: fix return value of dispatch_rqueue() 2013-10-02 19:45:12 +02:00
Lennart Poettering
f5f6e41a9e bus: fix potentially uninitialized memory access 2013-10-02 19:45:12 +02:00
Lennart Poettering
8c92d4bbc7 journald: add missing error check 2013-10-02 19:45:12 +02:00
Lennart Poettering
4b93637fd7 cryptsetup: fix OOM handling when parsing mount options 2013-10-02 19:45:12 +02:00
Václav Pavlín
cbb13b2a53 systemctl: fix name mangling for sysv units 2013-10-02 16:42:53 +02:00
Lennart Poettering
2c64a8d0ca acpi: make sure we never free an uninitialized pointer 2013-10-02 14:03:56 +02:00
Dave Reisner
6c8c92fef7 fix lingering references to /var/lib/{backlight,random-seed}
This should have been part of ef5bfcf668.
2013-10-02 07:51:06 -04:00
Lukas Nykryn
7e326fb5b2 acpi-fptd: fix memory leak in acpi_get_boot_usec 2013-10-02 13:39:49 +02:00
Lennart Poettering
1434ae6fd4 cgroup: there's no point in labelling cgroupfs dirs, so let's not do that
This allows us to get rid of the dep on libsystemd-label for cgroup
management.

https://bugs.freedesktop.org/show_bug.cgi?id=69966
2013-10-02 04:59:05 +02:00
Lennart Poettering
fbd8ebddbe build-sys: mkdir.[ch] should be in libsystemd-shared
Otherwise, why is mkdir-label.[ch] split out?
2013-10-02 04:56:33 +02:00
Lennart Poettering
cd4010b373 build-ss: prepare new release 2013-10-02 03:02:25 +02:00
Lennart Poettering
a3b6fafed4 hashmap: randomize hash functions a bit 2013-10-01 23:11:49 +02:00
David Herrmann
ef7939dfbb Update TODO
Remove "logind fbdev removal" as it is no longer supported.
2013-10-01 19:21:35 +02:00
David Herrmann
3a83f5223a logind: remove fbdev session-device support
fbdev does not support access-handover so it is quite useless to route it
through logind. If compositors want to use it they ought to open it
themselves. It's highly recommended to be ignored entirely, though. fbdev
is about to be deprecated in the kernel.
2013-10-01 18:08:54 +02:00
David Herrmann
11c2f7a813 logind: run with CAP_SYS_ADMIN
DRM Master access requires CAP_SYS_ADMIN, yay! Add it to the capability
bounding set for systemd-logind. As CAP_SYS_ADMIN actually allows a huge
set of actions, this mostly renders the restriction-set useless. Anyway,
patches are already pending to reduce the restriction on the kernel side.
But these won't really make it into any stable-release so for now we're
stuck with CAP_SYS_ADMIN.
2013-10-01 17:59:44 +02:00
David Herrmann
dfd552707d logind: send PropertyChanged during deactivation
We only send the PropertyChanged signal for the to-be-activated session
but not for the to-be-deactivated one. Fix that so both listeners get
notified about the new state.
2013-10-01 17:58:58 +02:00
David Herrmann
c2e5d024a3 logind: check whether first drmSetMaster succeeded
The initial drmSetMaster may fail if there is an active master already. We
must not assume that all existing clients comply to logind rules. We check
for this during session-activation already but didn't during device setup.
Fix this by checking the return code.

As drmSetMaster has had horrible return codes in the past (0 for failure?
EINVAL for denied access, ..) we need to be quite pedantic. To guarantee
an open file-descriptor we need to close the device and reopen it without
master if setting master failed first.
2013-10-01 17:53:43 +02:00
David Herrmann
081dfa852f logind: fix session-device dbus notify
Had this fix lying around here for some time. Thanks to missing
type-checking for va-args we passed in the actual major/minor values
instead of pointers to it. Fix it by saving the values on the stack first
and passing in the pointers.
2013-10-01 17:48:15 +02:00
Tom Gundersen
ea52e2aee8 kernel-install: add compat with 'installkernel'
If 'kernel-install' is called as 'installkernel' it will be compatible with the
syntax used by the kernel's build system.

This means it can be called by doing 'make install' in a kernel build
directory, if the correct symlink has been installed (which we don't do by
default yet).

[Edit harald@redhat.com: removed basename and use shift]
2013-10-01 17:40:30 +02:00
Lennart Poettering
4cc1fe6913 update TODO 2013-10-01 13:35:37 +02:00
Lennart Poettering
7400b9d2e9 core: whenever a new PID is passed to us, make sure we watch it 2013-10-01 05:06:56 +02:00
Chen Jie
c22ceead43 util.c: ignore pollfd.revent for loop_read/loop_write
Let read()/write() report any error/EOF.
2013-10-01 04:49:59 +02:00
Evan Callicoat
e6dca81441 units: Add SHELL environment variable
With the advent of systemd --user sessions, it's become very interesting to spawn X as a user unit, as well as accompanying processes that may have previously been in a .xinitrc/.xsession, or even just to replace a collection of XDG/GDM/KDM/etc session files with independent systemd --user units. The simplest case here would be to login on a tty, with the traditional /usr/sbin/login "login manager".

However, systemd --user (spawned by user@.service) is at the top level of the slice for the user, and does not inherit any environment variables from the login process. Given the number of common applications which rely on SHELL being set in the environment, it seems like the cleanest way to provide this variable is to set it to %s in the user@.service.

Ideally in the long-term, applications which rely on SHELL being set should be fixed to just grab it from getpwnam() or similar, but until that becomes more common, I propose this simple change to make user sessions a little bit nicer out of the box.
2013-10-01 04:17:31 +02:00
Lennart Poettering
abaaabf40a build-sys: don't fallback to upstart defaults 2013-10-01 03:23:14 +02:00
Cristian Rodríguez
ba5ecfcdbb systemctl: remove legacy upstart compatibility 2013-10-01 03:23:08 +02:00
Patrick McCarty
a1c9563cce smack-setup: fix path to Smack/CIPSO mappings
The correct path to the dir with CIPSO mappings is /etc/smack/cipso.d/;
/etc/smack/cipso is a file that can include these mappings as well,
though it is no longer supported in upstream libsmack.
2013-10-01 02:52:46 +02:00
Kay Sievers
ae05436265 Revert "build-sys: link libsystemd-login with libsystemd-label.la"
Systemd-logind does not pull in cg_create(), if we unconditionally link
this, all users of systemd-logind qill need the label stuff and therefore
link against selinux.

It is probably a build-system issue, or something that need to be sorted
out in a differnt way than linking not needed libs.

This reverts commit ceadabb102.
2013-10-01 00:21:50 +02:00
Lennart Poettering
0b926f194a Update TODO 2013-10-01 00:17:21 +02:00
Lennart Poettering
45fa9e29f8 hashmap: size hashmap bucket array dynamically
Instead of fixing the hashmap bucket array to 127 entries dynamically
size it, starting with a smaller one of 31. As soon as a fill level of
75% is reached, quadruple the size, and so on.

This should siginficantly optimize the lookup time in large tables
(from O(n) back to O(1)), and save memory on smaller tables (which most
are).
2013-10-01 00:17:21 +02:00
Lennart Poettering
bcd8e6d1bd local: fix memory leak when putting together locale settings
Also, we need to use proper strv_env_xyz() calls when putting together
the environment array, since otherwise settings won't be properly
overriden.

And let's get rid of strv_appendf(), is overkill and there was only one
user.
2013-10-01 00:17:21 +02:00
Lennart Poettering
6c081276dc main: don't free fds array twice 2013-10-01 00:17:21 +02:00
Zbigniew Jędrzejewski-Szmek
69ae3ee07e logs-show.c: show all messages for a slice 2013-10-01 00:02:08 +02:00
Michał Górny
ceadabb102 build-sys: link libsystemd-login with libsystemd-label.la
libsystemd-login.la uses cg_create() that currently seems to be a part
of libsystemd-label.la. However, it doesn't link against that library
and it seems that none of the (unconditional) libraries it uses do. In
the end, people end up getting «undefined reference to `cg_create'»
when trying to build e.g. dbus.
2013-10-01 00:02:08 +02:00
Lennart Poettering
ba54bcb822 man: mention the systemd homepage from systemd(1) 2013-09-30 18:57:04 +02:00
Lennart Poettering
3efabbe47f update TODO 2013-09-30 18:57:04 +02:00
Lennart Poettering
ea021cc3ea man: link cgroups api docs from relevant man pages 2013-09-30 18:57:04 +02:00
Andrey Borzenkov
4469ff4ade set IgnoreOnIsolate=true for systemd-cryptsetup@.service
When crypttab contains noauto, cryptsetup service does not have any
explicit dependencies. If service is started later manually (directly or via
mount dependency) it will be stopped on isolate.

mount units already have IgnoreOnIsolate set by default. Set it by
default for cryptsetup units as well.
2013-09-29 20:36:59 +02:00
Zbigniew Jędrzejewski-Szmek
893fa014de Fix buffer overrun when enumerating files
https://bugs.freedesktop.org/show_bug.cgi?id=69887

Based-on-a-patch-by: Hans Petter Jansson <hpj@copyleft.no>
2013-09-29 15:28:35 +02:00