Commit Graph
11441 Commits
Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 94de750682 units: make fsck units remain after exit
Without this, fsck would be re-run if any other service which pulls
in a target requiring one of the mounts was started after fsck was done
but before the initial transaction was done.

https://bugs.freedesktop.org/show_bug.cgi?id=66784
2013-10-06 11:30:50 -04:00
Mantas Mikulėnas dde42206a9 man: fix description of sysctl.d order
systemd-sysctl gives priority to the latest occurence as of commit
04bf3c1a60, but the manpage hasn't been
updated for that.
2013-10-06 11:30:49 -04:00
Kay Sievers 49bfb98b14 libudev: add missing 'global' to symbol export 2013-10-06 11:30:49 -04:00
Zbigniew Jędrzejewski-Szmek a66b28a7b7 Remove duplicate entries from syscall list
ARM syscall list includes SYS_OABI_SYSCALL_BASE and SYS_SYSCALL_BASE
which were obsuring real syscall names.
2013-10-06 11:30:49 -04:00
Zbigniew Jędrzejewski-Szmek 098a54e144 test-fileio: assume that Buffers may be missing 2013-10-06 11:30:49 -04:00
Zbigniew Jędrzejewski-Szmek 66023e6316 Use first partition in /proc/swaps for hibernation test
It seems that the kernel uses the first configured partition
for hibernation. If it is too full, hibernation will fail. Test
that directly.
2013-10-06 11:30:49 -04:00
Zbigniew Jędrzejewski-Szmek 6ccb2ab661 Assume that /proc/meminfo can be missing
Travis tests are failing, probably because /proc/meminfo is not available
in the test environment. The same might be true in some virtualized systems,
so just treat missing /proc/meminfo as a sign that hibernation is not
possible.
2013-10-06 10:53:38 -04:00
Zbigniew Jędrzejewski-Szmek 2dfa0e9ba6 Advertise hibernation only if there's enough free swap
Condition that is checked is taken from upower:
  active(anon) < free swap * 0.98

This is really stupid, because the kernel knows the situation better,
e.g. there could be two swap files, and then hibernation would be
impossible despite passing this check, or the kernel could start
supporting compressed swap and/or compressed hibernation images, and
then this this check would be too stringent. Nevertheless, until
we have something better, this should at least return a true negative
if there's no swap.

Logging of capabilities in the journal is changed to not strip leading
zeros. I consider this more readable anyway.

http://cgit.freedesktop.org/upower/tree/src/up-daemon.c#n613
https://bugzilla.redhat.com/show_bug.cgi?id=1007059

Conflicts:
	src/shared/logs-show.c
	src/shared/util.c
2013-10-06 10:48:21 -04:00
Lennart Poettering 98f452c534 manager: when verifying whether clients may change environment using selinux check for "reload" rather "reboot"
This appears to be a copy/paste error.
2013-10-06 10:48:20 -04:00
Zbigniew Jędrzejewski-Szmek bed59840a1 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-06 10:48:20 -04:00
Václav Pavlín 6577f5c40c man: Improve the description of parameter X in tmpfiles.d page 2013-10-06 10:48:20 -04:00
Zbigniew Jędrzejewski-Szmek ecf8adc911 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.

Conflicts:
	TODO
	man/systemd.exec.xml
2013-10-06 10:48:20 -04:00
Lennart Poettering 99d9092108 strv: don't access potentially NULL string arrays 2013-10-06 10:48:20 -04:00
Lennart Poettering 503283556c efi: never call qsort on potentially NULL arrays 2013-10-06 10:48:20 -04:00
Lennart Poettering f29767aea1 modules-load: fix error handling 2013-10-06 10:48:20 -04:00
Lennart Poettering 5625c498c4 dbus: fix return value of dispatch_rqueue() 2013-10-06 10:48:20 -04:00
Lennart Poettering 4bee17817b journald: add missing error check 2013-10-06 10:48:20 -04:00
Lennart Poettering 915491b8cd cryptsetup: fix OOM handling when parsing mount options
Conflicts:
	src/cryptsetup/cryptsetup.c
2013-10-06 10:48:20 -04:00
Chen Jie e543e472c3 util.c: ignore pollfd.revent for loop_read/loop_write
Let read()/write() report any error/EOF.
2013-10-06 10:48:20 -04:00
Patrick McCarty 40d128581e 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-06 10:48:20 -04:00
Lennart Poettering 5c6fa27f02 main: don't free fds array twice 2013-10-06 10:48:20 -04:00
Lennart Poettering 3fecc95e6a man: mention the systemd homepage from systemd(1) 2013-10-06 10:48:20 -04:00
Andrey Borzenkov 7596e64d66 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-10-06 10:48:19 -04:00
Zbigniew Jędrzejewski-Szmek 3e5bd73528 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>

Conflicts:
	src/test/test-util.c
2013-10-06 10:48:19 -04:00
Michael Scherer 403c467739 Add a bit more explicit message, to help confused users
Seeing http://www.happyassassin.net/2013/09/27/further-sysadmin-adventures-wheres-my-freeipa-badge/
it seems that the default message is a bit confusing for people
who never encountered it before, so adding a link to the manpage could
help them.

Conflicts:
	tmpfiles.d/systemd.conf
2013-10-06 10:48:19 -04:00
Zbigniew Jędrzejewski-Szmek 3a6e57e5d6 Remove duplicated line
Conflicts:
	src/core/load-fragment.c
2013-10-06 10:48:19 -04:00
Lennart Poettering aa1e724469 swap: properly expose timeout property on the bus 2013-10-06 10:48:19 -04:00
Lennart Poettering e851b89255 dbus: fix introspection for TimerSlackNSec 2013-10-06 10:48:19 -04:00
Lennart Poettering 9732761d49 logind: if a user is sitting in front of the computer and can shutdown the machine anyway he should also be able to reboot it 2013-10-06 10:24:27 -04:00
Zbigniew Jędrzejewski-Szmek 1691769c56 journald: accept EPOLLERR from /dev/kmsg
Also print out unexpected epoll events explictly.
2013-10-06 10:23:55 -04:00
Dave Reisner 4afb30fa35 journalctl(1): s/adm/systemd-journal/
Conflicts:
	man/journalctl.xml
2013-10-06 10:23:36 -04:00
Dave Reisner 995cdebf10 completion/systemctl: add missing list-sockets verb
Conflicts:
	shell-completion/bash/systemctl
	shell-completion/zsh/_systemctl
2013-10-06 10:19:23 -04:00
Dave Reisner c3576f997b fix grammatical error 2013-10-06 10:12:03 -04:00
Dave Reisner 8dab9d3583 nspawn: be less liberal about creating bind mount destinations
Previously, if a file's bind mount destination didn't exist, nspawn
would blindly create a directory, and the subsequent bind mount would
fail. Examine the filetype of the source and ensure that, if the
destination does not exist, that it is created appropriately.

Also go one step further and ensure that the filetypes of the source
and destination match.
2013-10-06 10:11:56 -04:00
Dave Reisner c393e2c64d udev-builtin-blkid: export ID_PART_TABLE_UUID 2013-10-06 10:11:08 -04:00
Andrey Borzenkov a948167a8c clarify $ escaping in Exec* lines
Explain that literal $ can be passed by doubling it.
2013-10-06 10:10:38 -04:00
Colin Walters 06f66abc77 polkit: Avoid race condition in scraping /proc
If a calling process execve()s a setuid program, it can appear to be
uid 0.  Since we're receiving requests over DBus, avoid this by simply
passing system-bus-name as a subject.
2013-09-18 11:47:45 -05:00
Brandon Philips fc9783ea51 cgtop: fixup the online help
The online help shows the keys as uppercase but the code and manpage say
lower case. Make the online help follow reality.
2013-09-14 14:11:45 -04:00
Michal Sekletar 90c6172bd8 systemctl: process only signals for jobs we really wait for
wait_filter() callback shouldn't process JobRemove signals for arbitrary
jobs. It should only deal with signals for jobs which are included in
set of jobs we wait for.
2013-09-14 14:11:44 -04:00
Zbigniew Jędrzejewski-Szmek f3e54e0678 Actually allow tabs in environment files
Fixup for ac4c8d6da8.
2013-09-14 14:11:44 -04:00
Zbigniew Jędrzejewski-Szmek c884f73cb7 Allow tabs in environment files
bash allows them, and so should we.

string_has_cc is changed to allow tabs, and if they are not wanted,
they must be now checked for explicitly. There are two other callers,
apart from the env file loaders, and one already checked anyway, and
the other is changed to check.

https://bugs.freedesktop.org/show_bug.cgi?id=68592
https://bugs.gentoo.org/show_bug.cgi?id=481554
2013-09-14 14:11:43 -04:00
Zbigniew Jędrzejewski-Szmek 7d3f06fa51 journalctl: use _COMM= match for scripts
In case of scripts, _EXE is set to the interpreter name, and
_COMM is set based on the file name. Add a match for _COMM,
and _EXE if the interpreter is not a link (e.g. for yum,
the interpreter is /usr/bin/python, but it is a link to
/usr/bin/python2, which in turn is a link to /usr/bin/python2.7,
at least on Fedora, so we end up with _EXE=/usr/bin/python2.7).
I don't think that such link chasing makes sense, because
the final _EXE name is more likely to change.
2013-09-14 14:11:43 -04:00
Andrew Cook 27b1a19a3c systemd-coredump: Ignore coredumps larger than COREDUMP_MAX
Currently this check happens when the coredump has been collected in
it's entirety and being received by journald. this is not ideal
behaviour when the crashing process is consuming significant percentage
of physical memory such as a large instance of firefox or a java
application.
2013-09-14 14:11:41 -04:00
David Herrmann 0006eedfd2 libudev: enumerate: fix NULL-deref for subsystem-matches
udev_device_get_subsystem() may return NULL if no subsystem could be
figured out by libudev. This might be due to OOM or if the device
disconnected between the udev_device_new() call and
udev_device_get_subsystem(). Therefore, we need to handle subsystem==NULL
safely.

Instead of testing for it in each helper, we treat subsystem==NULL as
empty subsystem in match_subsystem().

Backtrace of udev_enumerate with an input-device disconnecting in exactly
this time-frame:
 (gdb) bt
 #0  0x00007ffff569dc24 in strnlen () from /usr/lib/libc.so.6
 #1  0x00007ffff56d9e04 in fnmatch@@GLIBC_2.2.5 () from /usr/lib/libc.so.6
 #2  0x00007ffff5beb83d in match_subsystem (udev_enumerate=0x7a05f0, subsystem=0x0) at src/libudev/libudev-enumerate.c:727
 #3  0x00007ffff5bebb30 in parent_add_child (enumerate=enumerate@entry=0x7a05f0, path=<optimized out>) at src/libudev/libudev-enumerate.c:834
 #4  0x00007ffff5bebc3f in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=0x7a56b0 "/sys/devices/<shortened>/input/input97", maxdepth=maxdepth@entry=254) at src/libudev/libudev-enumerate.c:866
 #5  0x00007ffff5bebc54 in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=0x79e8c0 "/sys/devices/<shortened>/input", maxdepth=maxdepth@entry=255) at src/libudev/libudev-enumerate.c:868
 #6  0x00007ffff5bebc54 in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=path@entry=0x753190 "/sys/devices/<shortened>", maxdepth=maxdepth@entry=256) at src/libudev/libudev-enumerate.c:868
 #7  0x00007ffff5bec7df in scan_devices_children (enumerate=0x7a05f0) at src/libudev/libudev-enumerate.c:882
 #8  udev_enumerate_scan_devices (udev_enumerate=udev_enumerate@entry=0x7a05f0) at src/libudev/libudev-enumerate.c:919
 #9  0x00007ffff5df8777 in <random_caller> () at some/file.c:181
2013-09-14 14:11:40 -04:00
David Herrmann fa74dedd21 libudev: fix memleak when enumerating childs
We need to free udev-devices again if they don't match. Funny that no-one
noticed it yet since valgrind is quite verbose about it.
Fix it and free non-matching devices.
2013-09-14 14:11:39 -04:00
Zbigniew Jędrzejewski-Szmek 5ca24e3f6d journal: fix parsing of facility in syslog messages
In 49998b383 (journald: do not overwrite syslog facility when
parsing priority) journald started ignoring facility part when
reading service stderr to convert to syslog messages. In this
case it is fine, because only the priority is allowed.

But the same codepath is used for syslog messages, where the
facility should be used. Split the two codepaths by explicitly
specyfing whether the facility should be ignored or not.

https://bugzilla.redhat.com/show_bug.cgi?id=988814
2013-09-14 14:11:38 -04:00
Zbigniew Jędrzejewski-Szmek 9331382dd5 journald: do not overwrite syslog facility when parsing priority
https://bugs.freedesktop.org/show_bug.cgi?id=65610
2013-09-14 14:11:36 -04:00
WANG Chao 591e3ca379 fstab-generator: log_oom() if automount_name is null 2013-09-14 14:11:35 -04:00
WANG Chao b09b841398 fstab-generator: read rd.fstab=on/off switch correctly 2013-09-14 14:11:34 -04:00
George McCollister 812882be86 journal: fix hashmap leak in mmap-cache
hashmap_free() wasn't being called on m->contexts and m->fds resulting
in a leak.

To reproduce do:
	while(1) {
		sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY);
		sd_journal_close(j);
	}

Memory usage will increase until OOM.
2013-09-14 14:11:34 -04:00