Commit Graph

11180 Commits

Author SHA1 Message Date
Harald Hoyer dbd3dedfaf core/execute.c: debug log final execve() with argv[]
https://bugzilla.redhat.com/show_bug.cgi?id=772073
2013-12-22 23:36:31 -05:00
Zbigniew Jędrzejewski-Szmek cd771c23d2 catalog: remove links to non-existent wiki pages
AFAIK, we don't have even one page with message explanations.
If/when we add them, we can add links.

https://bugzilla.redhat.com/show_bug.cgi?id=1017161

Conflicts:
	catalog/systemd.catalog
2013-10-29 11:14:43 -04:00
Kay Sievers a63ba5f1c5 libudev: fix hwdb validation to look for the *new* file 2013-10-29 11:14:43 -04:00
Kay Sievers 945624129b rules: remove pointless MODE= settings
Changing the default MODE= for the group accessi, but not specifying
a GROUP= does not provide anything.

It disables the default logic that the mode switches to 0660 as soon
as a GROUP= is specifed, which make custom rules uneccesarily complicated.

https://bugs.freedesktop.org/show_bug.cgi?id=70665
2013-10-29 11:14:43 -04:00
Kay Sievers 646ed3b5d1 tmpfiles: log unaccessible FUSE mount points only as debug message 2013-10-29 11:14:43 -04:00
Lennart Poettering e44f228b78 rules: don't limit some of the rules to the "add" action
Devices should show up in systemd regardless whether the user invoked
"udevadm trigger" or not. Before this change some devices might have
suddenly disappeared due issuing that command.

Conflicts:
	rules/99-systemd.rules.in
2013-10-29 11:14:43 -04:00
Jan Engelhardt 2b88f7af92 man: document the -b special boot option 2013-10-29 11:14:42 -04:00
Zbigniew Jędrzejewski-Szmek 9f7634c16c man: add more markup to udevadm(8) 2013-10-29 11:14:42 -04:00
Zbigniew Jędrzejewski-Szmek b7a6e42e91 drop-ins: check return value
If the function failed, nothing serious would happen
because unlink would probably return EFAULT, but this
would obscure the real error and is a bit sloppy.

Conflicts:
	src/core/unit.c
2013-10-29 11:14:42 -04:00
Zbigniew Jędrzejewski-Szmek 3288a531d6 dbus-common: avoid leak in error path
src/shared/dbus-common.c:968:33: warning: Potential leak of memory pointed to by 'l'
                        return -EINVAL;
                                ^~~~~~
2013-10-29 11:14:42 -04:00
Dave Reisner 9adfee5183 udevadm.xml: document --resolve-names option for test
And remove documentation of the --subsystem flag which doesn't actually
exist.
2013-10-29 11:14:42 -04:00
Zbigniew Jędrzejewski-Szmek 03e321c7b6 journald: remove rotated file from hashmap when rotation fails
Before, when the user journal file was rotated, journal_file_rotate
could close the old file and fail to open the new file. In that
case, we would leave the old (deallocated) file in the hashmap.
On subsequent accesses, we could retrieve this stale entry, leading
to a segfault.

When journal_file_rotate fails with the file pointer set to 0,
old file is certainly gone, and cannot be used anymore.

https://bugzilla.redhat.com/show_bug.cgi?id=890463
2013-10-29 11:14:42 -04:00
Lennart Poettering e8fc3ef0fc journald: fix minor memory leak 2013-10-29 11:14:42 -04:00
Zbigniew Jędrzejewski-Szmek 79271854cc journald: be a bit more verbose when vacuuming
Vacuuming behaviour is a bit confusing, and/or we have some bugs,
so those additional messages should help to find out what's going
on. Also, rotation of journal files shouldn't be happening too
often, so the level of the messages is bumped to info, so that
they'll be logged under normal operation.

Conflicts:
	src/journal/journalctl.c
2013-10-29 11:14:42 -04:00
George McCollister 4d28dc9086 journald: fix fd leak in journal_file_empty
Before my previous patch, journal_file_empty wasn't be called with the
correct filename. Now that it's being called with the correct filename
it leaks file descriptors. This patch closes the file descriptors before
returning.

Signed-off-by: George McCollister <george.mccollister@gmail.com>

[Edit harald@redhat.com: make use of _cleanup_close_ instead]
2013-10-29 11:14:42 -04:00
George McCollister 1fc56e5b7f journald: fix vacuuming of archived journals
d_name is modified on line 227 so if the entire journal name is needed
again p must be used. Before this change when journal_file_empty was called
on archived journals it would always return with -2.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
2013-10-29 11:14:42 -04:00
Zbigniew Jędrzejewski-Szmek a2c483fc0b journald: always vacuum empty offline files
Corrupted empty files are relatively common. I think they are created
when a coredump for a user who never logged anything before is
attempted to be written, but the write does not succeed because the
coredump is too big, but there are probably other ways to create
those, especially if the machine crashes at the right time.
Non-corrupted empty files can also happen, e.g. if a journal file is
opened, but nothing is ever successfully written to it and it is
rotated because of MaxFileSec=. Either way, each "empty" journal file
costs around 3 MB, and there's little point in keeping them around.
2013-10-29 11:14:42 -04:00
Zbigniew Jędrzejewski-Szmek eccaffa038 journal/vacuum: cleanup 2013-10-29 11:14:42 -04:00
Lennart Poettering 03b589c60c core: unify the way we denote serialization attributes 2013-10-29 11:14:42 -04:00
Sylvia Else 7157e4b7a6 systemd: serialize/deserialize forbid_restart value
The Service type's forbid_restart field was not preserved by
serialization/deserialization, so the fact that the service should not
be restarted after stopping was lost.

If a systemctl stop foo command has been given, but the foo service
has not yet stopped, and then the systemctl --system daemon-reload was
given, then when the foo service eventually stopped, systemd would
restart it.

https://bugs.freedesktop.org/show_bug.cgi?id=69800
2013-10-29 11:14:42 -04:00
Harald Hoyer 67c230aa88 core/mount.c:mount_dump(): don't segfault, if mount is not mounted anymore
Don't segfault, if m->from_proc_self_mountinfo and m->from_fragment is
false.

https://bugzilla.redhat.com/show_bug.cgi?id=957783#c9
2013-10-29 11:14:41 -04:00
Lennart Poettering a203e13d0b mount: when learning about the root mount from mountinfo, don't add conflicting dep for umount.target
That way systemd won't try to umount it at shutdown.
2013-10-29 11:14:41 -04:00
Zbigniew Jędrzejewski-Szmek a2f10ecdf8 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-29 11:14:41 -04:00
Kay Sievers 337722373b libudev: add missing 'global' to symbol export 2013-10-29 11:14:41 -04:00
Zbigniew Jędrzejewski-Szmek b5ac228d18 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-29 11:14:41 -04:00
Zbigniew Jędrzejewski-Szmek 5dd95bcdf1 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-29 11:14:41 -04:00
Václav Pavlín d7a925df92 man: Improve the description of parameter X in tmpfiles.d page 2013-10-29 11:14:41 -04:00
Zbigniew Jędrzejewski-Szmek f94b45c027 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-29 11:14:41 -04:00
Lennart Poettering a8c35776cd strv: don't access potentially NULL string arrays 2013-10-29 11:14:41 -04:00
Lennart Poettering d475d0fa21 efi: never call qsort on potentially NULL arrays 2013-10-29 11:14:41 -04:00
Lennart Poettering b0aa79e3d8 modules-load: fix error handling 2013-10-29 11:14:41 -04:00
Lennart Poettering dc9f98c23e dbus: fix return value of dispatch_rqueue() 2013-10-29 11:14:41 -04:00
Lennart Poettering 6fcec98acd journald: add missing error check 2013-10-29 11:14:41 -04:00
Lennart Poettering b76652a28e cryptsetup: fix OOM handling when parsing mount options
Conflicts:
	src/cryptsetup/cryptsetup.c
2013-10-29 11:14:40 -04:00
Chen Jie de55428968 util.c: ignore pollfd.revent for loop_read/loop_write
Let read()/write() report any error/EOF.
2013-10-29 11:14:40 -04:00
Lennart Poettering 8e3aceb513 main: don't free fds array twice 2013-10-29 11:14:40 -04:00
Lennart Poettering a0855f4947 man: mention the systemd homepage from systemd(1) 2013-10-29 11:14:40 -04:00
Andrey Borzenkov 8d0879b970 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-29 11:14:40 -04:00
Zbigniew Jędrzejewski-Szmek bbe5efee5e 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-29 11:14:40 -04:00
Michael Scherer 649bbc2c12 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-29 10:59:16 -04:00
Zbigniew Jędrzejewski-Szmek 85d23bd3d5 Remove duplicated line
Conflicts:
	src/core/load-fragment.c
2013-10-29 10:59:07 -04:00
Lennart Poettering ab093f2760 swap: properly expose timeout property on the bus 2013-10-29 10:59:01 -04:00
Lennart Poettering eb31913712 dbus: fix introspection for TimerSlackNSec 2013-10-29 10:58:56 -04:00
Lennart Poettering 412c2eb9b8 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-29 10:58:53 -04:00
Zbigniew Jędrzejewski-Szmek f494120944 journald: accept EPOLLERR from /dev/kmsg
Also print out unexpected epoll events explictly.
2013-10-29 10:58:48 -04:00
Dave Reisner b775ab3342 journalctl(1): s/adm/systemd-journal/
Conflicts:
	man/journalctl.xml
2013-10-29 10:58:04 -04:00
Dave Reisner aeca88f2ff completion/systemctl: add missing list-sockets verb
Conflicts:
	shell-completion/bash/systemctl
	shell-completion/zsh/_systemctl
2013-10-29 10:58:01 -04:00
Dave Reisner d03880f0c3 fix grammatical error 2013-10-29 10:57:51 -04:00
Dave Reisner 78d87cec49 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-29 10:57:48 -04:00
Dave Reisner 908d0910ba udev-builtin-blkid: export ID_PART_TABLE_UUID 2013-10-29 10:57:42 -04:00