1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 15:21:37 +03:00
Commit Graph

11079 Commits

Author SHA1 Message Date
Lennart Poettering
d47c78be4a util: properly escape corner cases in bus_path_escape(), too
This follows the suggestions from:

http://lists.freedesktop.org/archives/systemd-devel/2013-March/009363.html
2013-03-05 20:05:46 +01:00
Kay Sievers
2f2343c6b1 inhibit: print --list if no argument is given 2013-03-05 19:34:38 +01:00
Michael Biebl
1a9ce3f766 Fix typos 2013-03-05 19:19:26 +01:00
Lennart Poettering
37495eede9 journal: make gatewayd run under its own user ID 2013-03-05 19:15:31 +01:00
Kay Sievers
37c0e8f35e README: add udev goups 2013-03-05 19:04:48 +01:00
Lennart Poettering
f47ec8ebb3 update TODO 2013-03-05 18:59:14 +01:00
Lennart Poettering
a24c64f03f journald: introduce new "systemd-journal" group and make it own the journal files
Previously all journal files were owned by "adm". In order to allow
specific users to read the journal files without granting it access to
the full "adm" powers, introduce a new specific group for this.

"systemd-journal" has to be created by the packaging scripts manually at
installation time. It's a good idea to assign a static UID/GID to this
group, since /var/log/journal might be shared across machines via NFS.

This commit also grants read access to the journal files by default to
members of the "wheel" and "adm" groups via file system ACLs, since
these "almost-root" groups should be able to see what's going on on the
system. These ACLs are created by "make install". Packagers probably
need to duplicate this logic in their postinst scripts.

This also adds documentation how to grant access to the journal to
additional users or groups via fs ACLs.
2013-03-05 18:59:03 +01:00
Lennart Poettering
fc7b7e2e74 journald: stpcpy() + mempcpy() are awesome 2013-03-05 15:02:38 +01:00
Lennart Poettering
82499507b3 journald: drop splitting-by-audit entirely
Thinking about it we should probably not hide bugs by falling back to
audit when we have our own session information anyway.
2013-03-05 14:36:59 +01:00
Lennart Poettering
40adcda869 journald: be a bit more careful when spitting up journals by user id 2013-03-05 14:27:34 +01:00
Lennart Poettering
8a0889dfda journald: check session owner UID rather then audit ID when splitting up journal files
We should always go by our own cgroup hierarchy before using foreign
schemes such as audit, so let's do that for the split out logic too.
2013-03-05 14:23:27 +01:00
Harald Hoyer
ac4785b031 Revert "fstab-generator: place initrd /sysroot mounts in initrd-fs.target"
This reverts commit 8330847e94.

Conflicts:
	src/fstab-generator/fstab-generator.c
2013-03-05 06:45:06 +01:00
Lennart Poettering
6bc80e94b6 update TODO 2013-03-05 04:10:19 +01:00
Lennart Poettering
954449b82d logind: when registering a new session always use previous session info from cgroup path rather than audit
Previously for cases like "su" or "sudo" where a session is attempted to
be created from within an existing one we used the audit session ID to
detect this and in such a case we simple returned the session data of
the original session a second time.

With this change we will now use the cgroup path of the calling path to
determine the old session, i.e. we only rely on our own session
identification scheme, instead of audits.

We will continue to keep the audit session ID and ours in sync however,
to avoid unnecessary confusion.
2013-03-05 03:35:52 +01:00
Michael Biebl
d51167c626 build-sys: build and install systemd-coredumpctl conditionally
If coredump support is disabled via --disable-coredump, do not build and
install the systemd-coredumpctl binary and man page.
2013-03-04 23:23:06 +01:00
Harald Hoyer
135b5212d4 fstab-generator: only handle block devices with root= kernel command line parameter
skip s.th. like root=nfs:... root=iscsi:... root=nbd:...
2013-03-04 21:00:56 +01:00
Harald Hoyer
8330847e94 fstab-generator: place initrd /sysroot mounts in initrd-fs.target
also do not overwrite /sysroot*.mount units already generated from fstab
2013-03-04 19:37:06 +01:00
Harald Hoyer
7d89ce303f units/initrd-*: require initrd-fs.target rather than local-fs.target 2013-03-04 19:33:50 +01:00
Harald Hoyer
39b83cdab3 add initrd-fs.target and initrd-fs-pre.target 2013-03-04 19:33:50 +01:00
Zbigniew Jędrzejewski-Szmek
47c4903452 build-sys: do not install pam_systemd(8) without PAM 2013-03-04 13:16:38 -05:00
Zbigniew Jędrzejewski-Szmek
4fe5211923 build-sys: do not install logind manpages when disabled
The condition was wrong: HAVE_PAM -> ENABLE_LOGIND.
2013-03-04 13:06:43 -05:00
Kay Sievers
8ab85e2d2d ProFUSION got bought by Intel 2013-03-04 16:13:19 +01:00
Kay Sievers
da4993920c journal: split journal uid only when audit uid data is valid 2013-03-04 15:19:10 +01:00
Michal Schmidt
a0b6422689 core/manager: fix conditions to start and stop watching running jobs
Harald encountered division by zero in manager_print_jobs_in_progress.
Clearly we had the watch enabled when we shouldn't - there were no
running jobs in m->jobs, only waiting ones. This is either a deadlock,
or maybe some of them would be detected as runnable in the next dispatch
of the run queue. In any case we mustn't crash.

Fix it by starting and stopping the watch based on n_running_jobs
instead of the number of all jobs.
2013-03-04 14:51:32 +01:00
Zbigniew Jędrzejewski-Szmek
19fbec1919 tmpfiles: use cleanup func. to save a few lines 2013-03-03 20:16:57 -05:00
Lukas Nykryn
a6187d4ce8 tmpfiles: move exclamation mark into right place
Unary not has higher precedence than comparisons,
so the condition was bogus.
2013-03-03 20:16:57 -05:00
Zbigniew Jędrzejewski-Szmek
bc41f93e90 core/path: install inotify watches top-down instead of bottom-up
When watches are installed from the bottom, it is always possible
to race, and miss a file creation event. The race can be avoided
if a watch is first established for a parent directory, and then for
the file in the directory. If the file is created in the time between,
the watch on the parent directory will fire.

Some messages (mostly at debug level) are added to help diagnose
pidfile issues.

Should fix https://bugzilla.redhat.com/show_bug.cgi?id=917075.
2013-03-03 20:16:56 -05:00
Michael Biebl
03c149144d build-sys: be more tolerant if dbus directories do not exist
use readlink -m instead of -f since we might be building in a minimal
chroot where those directories do not actually exist and readlink -f
would return an empty string.
2013-03-04 02:13:34 +01:00
Michael Biebl
5a37b9476f build-sys: resolve absolute path for the dbus directories
/usr/share/dbus-1/system-services simply looks a lot nicer then
/usr/share/dbus-1/services/../system-services
2013-03-04 01:47:19 +01:00
Michael Biebl
25ee45f995 build-sys: replace backticks `` with $()
for consistencies sake use $() everywhere
2013-03-04 01:46:03 +01:00
Michael Biebl
db059f1b03 build-sys: don't hard code bash-completion directory 2013-03-04 00:10:38 +01:00
Michael Biebl
6b7620431f build-sys: use $PKG_CONFIG instead of calling the pkg-config binary directly 2013-03-04 00:10:34 +01:00
Rob Clark
bb26309dd0 udev: fix segfault with android rndis
The android gadget driver for network tethering over rndis somehow has a
parent device with a null subsystem.  Probably this is bug in android driver,
but it is easy enough to make systemd/udev behave gracefully and not
segfault.  And this will help for making linux distros with systemd
(like fedora) work on android devices.
2013-03-03 19:02:36 +01:00
Kay Sievers
1d600df55b udev: remove database conversion code 2013-03-03 18:35:22 +01:00
Kay Sievers
3f60bcb5e6 udev: firmware - do not created /run/udev/firmware-missing/
The userspace firmware loader is deprecated now, and will be entirely
removed when we depend on a kernel version with the built-in firmware
loader available.
2013-03-03 18:31:52 +01:00
Zbigniew Jędrzejewski-Szmek
d288f79fb4 journald: do not barf when setting RateLimitInterval=0
Assertion 'interval > 0 || burst == 0' failed at src/journal/journald-rate-limit.c:78, function journal_rate_limit_new(). Aborting.
2013-03-03 09:11:28 -05:00
Zbigniew Jędrzejewski-Szmek
117dcc5793 core/service: use cleanup functions, wrap lines 2013-03-03 09:11:22 -05:00
Zbigniew Jędrzejewski-Szmek
28a79bd28b core/path: catch errors when adding watches
Errors because of oom conditions or descriptor exhaustion should not
be ignored. We probably cannot recover from those conditions.

Current behaviour wrt. insufficient permissions is described in the
man page. It might make sense in case of user sessions, so I left
it as is.
2013-03-03 08:55:53 -05:00
Zbigniew Jędrzejewski-Szmek
e0207c8d91 core/path: modernize style 2013-03-03 08:55:53 -05:00
Zbigniew Jędrzejewski-Szmek
a163db4419 core/path: use automatic cleanup
... and fix bogus return code on malloc failure.
2013-03-03 08:55:53 -05:00
Zbigniew Jędrzejewski-Szmek
f8c16f42fb core/path: fix a leak in success path
... and use automatic cleanup.
2013-03-03 08:55:53 -05:00
Michael Biebl
b8fe3faf9f Update TODO 2013-03-03 14:40:49 +01:00
Michael Biebl
d611dadcc7 bash-completion: split completions and move to new location
Split the large bash completion script into separate, smaller files each
named after the binary it is used for and move the files to
/usr/share/bash-completion/completions. This way the completions can be
loaded on demand and we only install the completions for the tools we
actually build. The old path /etc/bash_completion.d/ is deprecated and
will disappear in the future.
2013-03-03 14:39:51 +01:00
Michal Schmidt
076a24adf4 job: print the "OK" status messages in normal green
The "OK" status messages should not draw attention to themselves.
It's better if they're not printed in bright/bold. Leave that
to errors and warnings.

Use a plain inconspicuous enterprisey green.
2013-03-02 17:56:32 +01:00
Michal Schmidt
e970a72e94 manager: turn a superfluous check into assert
The crash that the check prevented has been fixed by commit 9e9e2b7.
2013-03-02 12:57:42 +01:00
Michal Schmidt
6b19ad24d3 unit: count deserialized job only after it's definitely installed
Installation of a deserialized job may fail (though purely in theory),
so increase the running job counter only when succeeding.
2013-03-02 12:29:04 +01:00
Tom Gundersen
cf84347794 initrd: add unit files needed for basic systemd-in-initrd support
This will:
 * mount all configured filesystems (typically the rootfs on /sysroot)
 * reload the configuration to pick up anything from the mounted fs (typically
   /sysroot/etc/fstab)
 * mount any newly configured filesystems (typically /usr on /sysroot/usr, if
   applicable)
 * shut-down and clean-up any daemons running in the initramfs (typically udevd)
 * switch-root to /sysroot and start the real init

For an example of what files should be included in an initramfs based on this
see
<https://mailman.archlinux.org/pipermail/arch-projects/2013-February/003628.html>.

Cc: Harald Hoyer <harald.hoyer@gmail.com>
Cc: Dave Reisner <d@falconindy.com>
2013-03-01 22:52:36 +01:00
Tom Gundersen
3d22d1ab57 fstab-generator: initrd - mount selected entries from /sysroot/etc/fstab
We only mount "/usr" and entries marked with "x-initrd.mount".

This (together with the right unit files) is needed in the initramfs in order to
natively support mounting /usr (and friends) from the initramfs.

The way it is meant to work is:
 * wait for sysroot.mount to be mounted
 * do a daemon-reload to generate sysroot-usr.mount (++) from /sysroot/etc/fstab
 * wait for sysroot-usr.mount to be mounted
 * switch-root

Cc: Harald Hoyer <harald.hoyer@gmail.com>
Cc: Dave Reisner <d@falconindy.com>
2013-03-01 22:52:36 +01:00
Lukas Nykryn
fea9740ae4 systemctl: check if iterator was initialized succesfully 2013-03-01 16:43:57 -05:00
Lukas Nykryn
34bf02818d manager: print p and then free it 2013-03-01 16:43:57 -05:00