1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
Commit Graph

2063 Commits

Author SHA1 Message Date
Lennart Poettering
de190aef08 journal: implement multiple field matches 2011-11-08 18:20:03 +01:00
Lennart Poettering
9b3c575ed9 macro: fix ALIGN_TO macro definition 2011-11-08 18:18:48 +01:00
Michal Schmidt
4743137a4b utmp: for DEAD_PROCESS write the current time to wtmp
Zeroed .ut_tv values in wtmp confuse chkrootkit.

Reported and debugged by Norman Smith. This is based on his patch,
but modified to behave more like upstart did in F14 and cleaned up.

https://bugzilla.redhat.com/show_bug.cgi?id=743696
2011-11-07 01:10:35 +01:00
Michal Schmidt
fa4ad7ceca utmp: initialize store with the found entry, not with the lookup key 2011-11-07 01:10:35 +01:00
Michal Schmidt
b8e47420b3 utmp: no need to zero a struct before overwriting it with memcpy 2011-11-07 01:10:34 +01:00
Michal Schmidt
0ad26e09de utmp: remove unneded parameters
With these functions no caller ever passes anything else than 0
for 't' (meaning the current time will be used).
2011-11-07 01:09:53 +01:00
Lennart Poettering
353fa6a21a cgroup: immediately remove all cgroups which run empty
Some controllers have scaling problems when many empty cgroups exist.
Hence, as soon as we get a notification that a cgroup is empty, delete
it. This is also nice to keep the systemd-cgls output short.
2011-11-03 19:42:53 +01:00
Lennart Poettering
263653e103 Merge remote-tracking branch 'zbigniew/systemadm_changes' 2011-11-02 14:08:49 +01:00
Ran Benita
f5a613c03c bash-completion: rename file since it is no longer for systemctl only 2011-11-02 13:07:47 +01:00
Ran Benita
3cdbf916d3 bash-completion: add completions for systemd-loginctl
This script is straightforward and should give proper completions for
all of systemd-loginctl's verbs.
2011-11-02 13:07:43 +01:00
Ran Benita
8aea83c718 bash-completion: update with new verbs and arguments
Adds arguments --root= --runtime --no-legend.
Adds verbs link mask unmask reenable list-unit-files.
Also uses list-unit-files to make nicer enable and disable completions.

Rebased due to changes in systemctl.
2011-11-02 13:07:36 +01:00
Dexter Morgan
6fdae8a6a4 Add Mageia support
This patch adds support for the Mageia Linux distribution:
 http://www.mageia.org/

Mageia is a fork of Mandriva although some divergence has already occured
and thus inclusion of these changes upstream allow us to (hopefully)
migrate more rapidly to the new standard approaches systemd offers.
Indeed, we already use the preferred mechanism of OS identification via
the /etc/os-release file rather than a distro specific variation.

This patch mostly mirrors the patch added previously for Mandriva
support. In addition to those original authors, this patch was mostly
written by Dexter Morgan with help from Colin Guthrie and Eugeni Dodonov.
2011-11-02 02:16:39 +01:00
Tom Gundersen
87e75fddbb cryptsetup-generator: avoid ordering cycle on swap
Devices with random keys (swap), should not be ordered before local-fs.target,
as this creates a cycle with systemd-load-random-seed.service (and also it
does not make sense, a swap device is not a local-fs).
2011-11-01 23:42:41 +01:00
Lennart Poettering
7fc2a89a73 mount: order remote mounts after both network.target and remote-fs-pre.target
Since remote-fs-pre.target is optional we cannot count on it to order
remote mounts after network.target, so let's add that order explicitly
in addition to remote-fs-pre.target.

https://bugzilla.redhat.com/show_bug.cgi?id=749940
2011-11-01 22:28:59 +01:00
Lennart Poettering
6ddaf1ca4a cgroup: always recreate cgroup before we try to apply attributes
We might have trimmed the cgroup tree previously, hence don't trust our
own "realized" flag, always recreate cgroup tree before applying our
attributes to make sure this actually works out.

https://bugzilla.redhat.com/show_bug.cgi?id=749687
2011-11-01 22:02:36 +01:00
Lennart Poettering
f632a6634d initctl: don't use dbus connection after PID 1 got respawned
After reexec PID 1 our bus connection is invalidated. Hence don't try to
reuse it, just terminate so that when we are spawned the next time we
just get a new one.

Spotted by Marti Raudsepp.
2011-11-01 18:21:32 +01:00
Thomas Jarosch
7670e5a2aa condition: Fix file descriptor leak in test_capability()
Detected by cppcheck.
2011-11-01 17:02:32 +01:00
Tom Gundersen
7c2ec00930 random-seed: convert poolsize from bits to bytes
The problem was first noted in a bug report against Arch's initscripts.

Reported-by: Taylan Ulrich Bayırlı <taylanbayirli@gmail.com>
Reported-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-01 14:45:52 +01:00
Lennart Poettering
bb53abeb8c plymouth: fix ply proto endianess issues
Plymouth enforces LE even for the local Ply proto, hence we should do
the conversion properly for BE arch compat.

Tracked down by Harald Hoyer.

https://bugzilla.redhat.com/show_bug.cgi?id=744415
2011-11-01 14:20:31 +01:00
Zbigniew Jędrzejewski-Szmek
1c0a113fd3 systemctl: make list-unit-files output more economical
The first column is given the width of the widest entry,
if possible, otherwise all entries are ellipsized to fit
in ($COLUMNS - (width of second column)).

[ Added a few fixes, calculate state_cols too, respect '--no-legend',
  better handling of '--full' -- michich ]
2011-10-24 19:40:05 +02:00
Dave Reisner
74eeab044e systemctl-completion: always invoke with --no-legend
In the case of completion for the 'restart' verb, passing the invalid
unit name (the colums header) causes completion to cease functioning
entirely, with the error:

  Failed to issue method call: Unit name UNIT is not valid.

This adds a small wrapper function for systemctl which can have common
options added to it.
2011-10-19 08:14:13 +02:00
Jonathan Nieder
5a8d081c58 audit: do not complain if kernel lacks audit
When running on a kernel without audit support, systemd currently
writes a mysterious-sounding error to its log:

	systemd[1]: Failed to connect to audit log: Protocol not supported

Better to suppress the audit_open() failure message when (and only
when) it is due to running on a kernel without audit support, since in
this case the admin probably does not mind systemd not writing to the
audit log.  This way, more serious errors like ENOMEM and EACCES will
stand out more.
2011-10-17 21:04:59 +02:00
Tollef Fog Heen
e51db373c2 service: Drop rcN.d runlevels from SysV services that also exist in rcS.d
Services which claim to start in both rcN.d and rcS.d generate
loops which for some reason seems to usually end up with dbus not
starting and the whole machine being quite unhappy. We now rather
assume that if a service can be started in rcS, it should not also
start in rcN.d.

Fixes Debian bug #637037
2011-10-17 21:02:42 +02:00
Michal Schmidt
563ba9ea6e manager: fix a crash in isolating
HASHMAP_FOREACH is safe against the removal of the current entry, but
not against the removal of other entries. job_finish_and_invalidate()
can recursively remove other entries.

It triggered an assertion failure:
  Assertion 'j->installed' failed at src/manager.c:1218, function
  transaction_apply(). Aborting.

Fix the crash by iterating from the beginning when there is a
possibility that the iterator could be invalid.

It is O(n^2) in the worst case, but that's better than a crash.

https://bugzilla.redhat.com/show_bug.cgi?id=717325
2011-10-17 11:29:27 +02:00
Lennart Poettering
8f9b6cd9eb journal: automaticall reset location when the set of matches changes 2011-10-15 02:53:04 +02:00
Lennart Poettering
8725d60ae4 journal: implement seek to head/tail 2011-10-15 02:45:58 +02:00
Lennart Poettering
e892bd1797 journal: unify code for up and for down traversal 2011-10-15 01:38:44 +02:00
Lennart Poettering
de7b95cdc3 journal: properly implement matching with multiple matches 2011-10-15 01:13:37 +02:00
Lennart Poettering
1cc101f1e5 journal: if two entries match with everything but seqnums, they are still identical 2011-10-14 16:52:42 +02:00
Lennart Poettering
7210bfb370 journal: move field index from file into journal object 2011-10-14 05:38:40 +02:00
Lennart Poettering
ae2cc8efc1 journal: when the same entry is in two files, skip over them in sync 2011-10-14 05:34:19 +02:00
Lennart Poettering
c2373f848d journal: synchronize seqnum across files 2011-10-14 05:12:58 +02:00
Lennart Poettering
161e54f871 journal: fix field retrieval by name 2011-10-14 04:52:56 +02:00
Lennart Poettering
3fbf9cbb02 journal: implement parallel file traversal 2011-10-14 04:44:50 +02:00
Lennart Poettering
0ac38b7072 journal: implementation rotation 2011-10-13 05:19:35 +02:00
Lennart Poettering
250d54b5be journalctl: find journal files in right path 2011-10-12 05:29:08 +02:00
Lennart Poettering
69e5d42db0 journal: add cgroup path to entries 2011-10-12 05:28:39 +02:00
Lennart Poettering
ed49ef3f34 journal: place machin journals in machine specific subdirectories 2011-10-12 05:06:09 +02:00
Lennart Poettering
7c99e0c1fc util: fix build 2011-10-12 04:42:38 +02:00
Lennart Poettering
38ac38b298 journal: only fallocate() what we really need to avoid slowness on file systems which do not support fallocate natively 2011-10-12 04:41:27 +02:00
Lennart Poettering
689b9a22f7 Merge branch 'master' into journal 2011-10-12 04:29:11 +02:00
Lennart Poettering
64685e0cea util: properly detect what the last capability is 2011-10-11 22:30:31 +02:00
Lennart Poettering
1835f23c2a service: don't try to guess PID for SysV services anymore
As it turns out there are quite a number of SysV services too broken to
make the guessing work: instead of returning in the parent only after
the child is fully initialized they return immediately. The effect is
that the guessing in systemd might happen too early, at a time where the
final main process doesn't exist yet.

By turning this off we won't try to detect the main pid anymore, with
the effect that all processes of the service in question are considered
equally likely to be the main process.
2011-10-11 20:21:06 +02:00
Lennart Poettering
c70ac211b4 localed: make sure s-s-k doesn't create any X11 config files anymore 2011-10-11 20:20:01 +02:00
Zbigniew Jędrzejewski-Szmek
30fa646835 localed: shorten generate-kbd-model-map
Output is identical.
2011-10-11 15:41:38 +02:00
Zbigniew Jędrzejewski-Szmek
adda7d8b97 pager: add _noreturn_ to pager_fallback()
src/pager.c: In function ‘pager_fallback’:
src/pager.c:35:13: warning: function might be possible candidate for attribute ‘noreturn’ [-Wmissing-noreturn]
2011-10-11 15:41:32 +02:00
Lennart Poettering
62590f23c1 unit: introduce ConditionCapability 2011-10-11 15:16:52 +02:00
Lennart Poettering
688c56ff7d logind: fail gracefully if too many sessions are created
https://bugzilla.redhat.com/show_bug.cgi?id=744726
2011-10-11 04:43:01 +02:00
Lennart Poettering
a724d2ed79 timedate: fall back to /etc/sysconfig/clock on Fedora, for compatibility with legacy 2011-10-11 04:23:35 +02:00
Lennart Poettering
21e557edcc units: introduce local-fs-pre.target and remote-fs-pre.target
This hook target enables services to order themselves between
network.target and remote mounts, which is needed for GFS2 and similar
systems.
2011-10-11 03:33:53 +02:00
Dave Reisner
e8fbe35df8 sd-login.h: correct spelling mistakes in comments 2011-10-11 02:51:59 +02:00
Miklos Vajna
b5dc29c079 hostname-setup: Frugalware switched to /etc/hostname 2011-10-11 02:47:35 +02:00
Paolo Bonzini
53273a6aef readahead: lower max file size for readahead
https://bugs.freedesktop.org/show_bug.cgi?id=41336
2011-10-11 01:44:56 +02:00
Thomas Jarosch
678abaf91e util: fix close() call on wrong variable
Detected by "cppcheck" (actually it detected a file descriptor leak)
2011-10-10 22:30:57 +02:00
Thomas Jarosch
10d975f54c tmpfiles: fix file descriptor leak
Detected by "cppcheck"
2011-10-10 22:28:04 +02:00
Kay Sievers
e5396fed3f test_virtualization: do not try to compare id in !virt context 2011-10-09 16:36:45 +02:00
Lennart Poettering
cec736d21f journal: implement parallel traversal in client 2011-10-08 02:21:05 +02:00
Lennart Poettering
f4b4781191 journal: split user logs into their own journal files 2011-10-07 23:03:07 +02:00
Lennart Poettering
260a2be455 journal: replace linked list by hashmap when merging files 2011-10-07 22:02:06 +02:00
Lennart Poettering
dad503169b journal: store XOR combination of entry data object hashes to identify hash lines 2011-10-07 22:02:06 +02:00
Lennart Poettering
87d2c1ff6a journal: add preliminary incomplete implementation 2011-10-07 22:02:05 +02:00
Lennart Poettering
7dfe96eebc hashmap: use different version of DJB's hash algorithm that uses shifting instead of multiplication 2011-10-07 21:00:48 +02:00
Lennart Poettering
3887b5abcb logind: properly generate session creation response on dbus
This fixes the various reported issues with dbus message parsing when
running su.
2011-10-04 02:28:22 +02:00
Michal Schmidt
798e258d30 systemctl: fix corrupted output of units
On some systems the list of units in systemctl output came out wrong,
all on one line and with missing descriptions.

It turns out printf() really attempts to mmap 2G memory when INT_MAX is
passed as the field width. On machines with small virtual memory
without overcommit the mmap inside printf() failed.

Do not use INT_MAX for unlimited width.
2011-09-29 21:25:50 +02:00
Lennart Poettering
a0ccd2acab localed: handle multiple X11 kbd layouts
https://bugs.freedesktop.org/show_bug.cgi?id=41341
2011-09-29 19:44:34 +02:00
Lennart Poettering
f176b5c296 systemctl: fix error message when no connection to systemd is available 2011-09-29 16:00:29 +02:00
Lennart Poettering
8185a5090a systemctl: fix detection whether the dbus connection is available 2011-09-29 15:32:10 +02:00
Lennart Poettering
e99fa3cba5 vconsole: don't parse Fedora's KEYMAP= kernel parameters anymore
KEYMAP are use to pass keymap configuration to initrd, but not to the
system itself. Since the initrd might get out of date we need to make
sure that changes made in userspace override the settings from the
cmdline, hence drpo any use of it all for these variables.
2011-09-28 04:34:17 +02:00
Lennart Poettering
fb9de93dd3 localed: add SetX11Keyboard() and SetVConsoleKeyboard() bus calls 2011-09-28 04:34:17 +02:00
Kay Sievers
958ae0d751 analyze: always draw top kernel, initramfs, userspace bars
Based on Koen Kooi's patch. Renamed initrd to initramfs.
2011-09-27 12:57:28 +02:00
Michal Schmidt
4deb3b9391 systemctl: better width and alignment of fields
Provide nicer output by taking advantage of the available columns.

Expand UNIT and DESCRIPTION if possible. Economize the space:
 - never give UNIT more width than it can use.
 - if there's a shortage of space, give 25 columns to UNIT, even
   if it would result in overflowing the total columns. The field would not
   be useful below width 25.
 - then if possible, assign up to 25 columns to DESCRIPTION.
 - then split any remaining space evenly between UNIT and DESCRIPTION.

Keep the columns aligned even with '--full'.
2011-09-27 12:10:33 +02:00
Michal Schmidt
ebed32bfe8 systemctl: print the legend regardless of stdout type, add --no-legend
Print the legend (the column headers and the footer with hints) by
default even to non-tty output. People seem to get confused by the
difference when they redirect the output.

Add a parameter to suppress the printing of the legend.

Related-to: https://bugzilla.redhat.com/show_bug.cgi?id=713567
2011-09-27 12:10:27 +02:00
Michal Schmidt
4a8e40ebd0 pager: add a trivial internal pager
In the very unlikely scenario where none of the external pagers is
available, use an internal implementation to pass stdin to stdout.

Don't bother with trying 'cat', because it's no more useful than the
internal pager.

https://bugzilla.redhat.com/show_bug.cgi?id=713707
2011-09-27 11:57:24 +02:00
Lennart Poettering
4e2b0f9b14 service: fix up std output/error before we add dependencies to the bridge socket 2011-09-23 17:42:21 +02:00
Lennart Poettering
5dc4c17fd5 virt: add missing header inclusion 2011-09-23 17:20:45 +02:00
Lennart Poettering
8095200d05 condition: optionally test against type of virtualization (vm vs. container) 2011-09-23 17:09:49 +02:00
Lennart Poettering
b52aae1d93 util: move virtualization detection into its own files, and extend return codes 2011-09-23 17:00:33 +02:00
Koen Kooi
f2b33002cd analyze: report startup time in plot mode as well
It now prints something like "Startup finished in 1507ms (kernel) + 850ms (userspace) = 2357ms" below the legend.
2011-09-23 16:28:28 +02:00
Koen Kooi
70daa62332 analyze: always draw 1s marker for scale
In situations like this:

root@omap4430-panda:~# systemd-analyze
Startup finished in 1499ms (kernel) + 916ms (userspace) = 2416ms

The svg plot will only have the 0s marker and no subsequent markers for scale. This patch forces the 1s marker to always be drawn.
2011-09-23 16:28:27 +02:00
Michal Schmidt
a65cb51f29 unit: fix complementing of requirement deps with After deps for targets
'man systemd.target' says:
  Unless DefaultDependencies= is set to false, target units will
  implicitly complement all configured dependencies of type
  Wants=, Requires=, RequiresOverridable= with dependencies of type
  After=  if the units in question also have DefaultDependencies=true.

It did not work because of a forgotten negation.
2011-09-23 16:28:27 +02:00
Lennart Poettering
799f46d36f util: don't fail if no id was passed to detect_container() 2011-09-23 16:28:27 +02:00
Lennart Poettering
65bc2c2114 util: detect systemd-nspawn without relying on ns cgroup tree 2011-09-23 16:28:27 +02:00
Lennart Poettering
3bb1c6b04f nspawn: set env var container=systemd-nspawn, following the scheme lxc introduced 2011-09-23 16:28:27 +02:00
Lennart Poettering
d77c31f8f3 loginctl: fix typo 2011-09-23 16:28:27 +02:00
Lennart Poettering
3e085b6c59 llvm-analyze: change a few things to make llvm-analyze show fewer false positives 2011-09-23 16:28:27 +02:00
Lennart Poettering
de3756ab99 llvm-analyze: fix some bugs found by llvm-analyze 2011-09-23 16:28:27 +02:00
Michal Schmidt
4e240ab0c9 util: improve signal_to_string, signal_from_string
signal_to_string:
 Produce names for SIGRTMIN+n.
 Never give an "n/a" result. In the worst case give the number itself as
 a string.

signal_from_string:
 Parse "RTMIN+n".
 Parse any valid signal number.
2011-09-23 10:30:19 +02:00
Michal Schmidt
764e9b5f07 manager: fix job mode for SIGRTMIN+1, +2
The test did not work as intended and always resulted in JOB_REPLACE.
2011-09-23 10:18:07 +02:00
Michal Schmidt
1f8fef5a44 condition: fix reversed tests if path does not exist at all
CONDITION_PATH_IS_DIRECTORY, CONDITION_PATH_IS_SYMBOLIC_LINK and
CONDITION_FILE_IS_EXECUTABLE gave reversed results when the path
did not exist at all.
2011-09-23 02:10:00 +02:00
Lennart Poettering
f8440af5fe coverity: change a few things so that coverity doesn't show so many false positives 2011-09-23 01:45:34 +02:00
Lennart Poettering
8ea913b2ea coverity: fix a couple of bugs found by coverity 2011-09-23 01:45:34 +02:00
Lennart Poettering
a82e5507a6 unit: don't recheck conditions when a unit is already starting but unit_start() is invoked 2011-09-22 21:32:18 +02:00
Michal Schmidt
5375410bb2 service: warn if a service fails to write its PID file
Warn if a service promises to write a PID file (using 'PIDFile=' in the
unit file or '# pidfile:' in SysV header), but fails to keep the
promise.

This warning will likely trigger also for the forking services with a
racy daemonization, which exit the original process before the PID file
is written.
2011-09-22 13:18:52 +02:00
Lennart Poettering
878587bddd selinux: reopen log when loading the SELinux policy fails 2011-09-22 04:05:40 +02:00
Lennart Poettering
4dfc092a71 service: if StandardInput=socket and StandardOutput=inherit imply socket for output, don't imply default output
This is useful for inetd-style per-connection services, so that they
again can simply specify StandardOutput=socket to connect all three fds
to the socket.
2011-09-22 03:29:51 +02:00
Lennart Poettering
a65f4aeb63 udev: asynchronously mount fuse/confifgs as soon as the kmods are loaded 2011-09-22 03:02:15 +02:00
Lennart Poettering
d3354f66c2 mount: pull in quota tools from fstab lines with 'quota' option, too
https://bugzilla.redhat.com/show_bug.cgi?id=736360
2011-09-21 20:19:43 +02:00
Lennart Poettering
57981b9812 job: after converting a job from restart to start readd it to run queue
When we converted a restart job it's time to look again whether any of
its dependencies are now runnable.

https://bugzilla.redhat.com/show_bug.cgi?id=735013
2011-09-21 19:57:27 +02:00
Lennart Poettering
c72dcc5431 modules-load: filter out double modules 2011-09-21 03:56:55 +02:00
Michal Schmidt
13230d5d3c service: minor change in service_load_pid_file return value
Return 0 only if the PID was really loaded. If no PIDFile= is defined,
return -ENOENT.

Only one caller cares about the return value of this function and this
change makes the usage nicer.
2011-09-21 02:25:17 +02:00
Michal Schmidt
0d60602c3b condition: add ConditionPathIsSymbolicLink 2011-09-21 01:42:02 +02:00
Lennart Poettering
8571962ca3 condition: always follow symlinks for condition checks, to mimic test 2011-09-21 01:07:25 +02:00
Michal Schmidt
db01f8b3f8 service: handle forking services that move to a new PID
When some forking daemons receive a SIGHUP, they re-execute themselves
and consequently change to a new main PID. As long as they update the
PID file in the right order (before exiting the old PID), we can detect
that and avoid killing them.
2011-09-21 00:57:41 +02:00
Lennart Poettering
ab7f148f81 unit: introduce ConditionPathIsMountPoint= 2011-09-21 00:50:40 +02:00
Lennart Poettering
a94e09a5b9 stdout-syslog-bridge: properly handle overly long log lines 2011-09-20 02:46:04 +02:00
Lennart Poettering
00ca7f0782 service: drop broken support for X-Interactive fields in LSB headers
The logic never worked since reading from the boot console is useless
when a service is started after boot. Hence drop this half-baked code,
since we now have a place document incompatibilities like this.

http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities
2011-09-20 01:33:48 +02:00
Lennart Poettering
34a2dc4bfc condition: in ConditionPathIsExecutable follow symlinks
https://bugzilla.redhat.com/show_bug.cgi?id=737047
2011-09-20 01:28:07 +02:00
Zbigniew Jędrzejewski-Szmek
79b1e6cb80 systemadm: use colors for id too, remove color from fragment link 2011-09-20 01:07:28 +02:00
Zbigniew Jędrzejewski-Szmek
fe7e28146f systemadm: adjust row numbers after removing 'aliases' 2011-09-20 01:07:28 +02:00
Zbigniew Jędrzejewski-Szmek
8f38d5a4c6 systemadm: coalesce id and decription fields
This is just in interest of saving space (e.g. 5 lines for multi-user.target).
2011-09-20 01:07:28 +02:00
Zbigniew Jędrzejewski-Szmek
734b60d796 systemadm: catch exceptions generated by dbus
Otherwise, access-denied dbus errors were not caught, and only
caused a message to be printed out on the console. After this
change a proper popup window pops up :).
2011-09-20 01:07:28 +02:00
Zbigniew Jędrzejewski-Szmek
37d3b881f1 systemadm: make the dependency listing selectable
There's no reason to forbid selecting the text.
2011-09-20 01:07:28 +02:00
Zbigniew Jędrzejewski-Szmek
8b1451ade7 systemadm: use bold for "requires", etc. 2011-09-20 01:07:28 +02:00
Zbigniew Jędrzejewski-Szmek
23b51f17b1 systemadm: use color for dependency links 2011-09-20 01:07:27 +02:00
Zbigniew Jędrzejewski-Szmek
8278f06953 systemadm: display dependencies sorted 2011-09-20 01:06:28 +02:00
Zbigniew Jędrzejewski-Szmek
11216eb0bd systemadm: add libgee as dependency and use it for a unit map 2011-09-20 01:06:01 +02:00
Zbigniew Jędrzejewski-Szmek
0dd27daff4 systemadm: add a wrappable label and use it for status lines
The new WrapLabel is there to work around a deficiency in GTK,
namely the fact that it is hard to make labels which are both
resizable and wrappable. The code is a port from libview.
2011-09-20 01:06:01 +02:00
Zbigniew Jędrzejewski-Szmek
e377ad0d11 systemadm: filter on swaps, paths, and timers too. 2011-09-20 01:06:01 +02:00
Zbigniew Jędrzejewski-Szmek
a3c159a23c systemadm: split the type+status combo box into type combo & status checkbox 2011-09-20 01:06:01 +02:00
Lennart Poettering
a373b0e7bc condition: opt out of /proc/cmdline parsing only when running in a container, not in a VM 2011-09-19 23:51:15 +02:00
Bastien Nocera
1e2591d48c hostnamed: Fix "SetStaticHostname" debug output
Was using the wrong property (eg. not the one we just set)

https://bugs.freedesktop.org/show_bug.cgi?id=40987
2011-09-19 22:39:29 +02:00
Zbigniew Jędrzejewski-Szmek
661ece1029 systemadm: allow sorting of jobs and units 2011-09-19 10:06:24 +02:00
Zbigniew Jędrzejewski-Szmek
8401f1533d systemadm: break timestamp formatting out into a seperate function
Since the timezone is always local, it doesn't make much sense to
display it. The timestamp is now formatted without the timezone.
I guess it can be further improved, which should be easier now
that it is tucked-away in a separate function.
2011-09-19 10:03:37 +02:00
Lennart Poettering
3417e2c367 timedate: fix interfaces list
https://bugs.freedesktop.org/show_bug.cgi?id=40583
2011-09-04 15:00:13 +02:00
Lennart Poettering
ad740100d1 dbus: terminate mechanism daemons after a while 2011-09-03 03:26:58 +02:00
Lennart Poettering
43de46ab92 stdout-bridge: set facility of messages with no facility to configured facility instead of LOG_USER 2011-09-01 21:15:00 +02:00
Lennart Poettering
27d340c772 fsck: show progress while fscking at boot 2011-09-01 21:05:06 +02:00
Lennart Poettering
cfc27668b0 label: fix database check 2011-09-01 01:16:55 +02:00
Lennart Poettering
07bceef2a9 locale: support $LANGUAGE too
$LANGUAGE is a GNU extension that is probably worth supporting, since it
allows specifiying an order of languages.

https://bugs.freedesktop.org/show_bug.cgi?id=40510
2011-08-31 14:10:50 +02:00
Lennart Poettering
4dc380d16d getty: simplify things a bit
https://bugs.freedesktop.org/show_bug.cgi?id=39818
2011-08-31 04:23:45 +02:00
Lennart Poettering
3c20189a72 getty: automatically add getty on hvsi0 virtualizer console
https://bugs.freedesktop.org/show_bug.cgi?id=39818
2011-08-31 04:15:42 +02:00
Lennart Poettering
f917c3e5e1 dropin: don't fail if random files are stored in .wants directories
https://bugs.freedesktop.org/show_bug.cgi?id=39957
2011-08-31 03:55:38 +02:00
Lennart Poettering
d76702a7b2 systemctl: if we managed to reexec the init system via the bus don't retry via signal
If we managed to reeexec the init system via the bus this allows us to
provide synchronous behaviour to callers. This is all lost if we then
repeat the reexecution via SIGTERM.

https://bugzilla.redhat.com/show_bug.cgi?id=698198
2011-08-31 03:31:32 +02:00
Lennart Poettering
3745b50031 logind: use syspath instead of sysname to identify fb devices since udlfb got fixed now 2011-08-31 03:16:01 +02:00
Lennart Poettering
3a34ae3a4d mount: fix parsing of prio value
https://bugzilla.redhat.com/show_bug.cgi?id=722803
2011-08-31 01:46:38 +02:00
Lennart Poettering
a17b785b5f getty-generator: ignore if symlinks already exist 2011-08-31 01:30:57 +02:00
Lennart Poettering
382241ee56 label: minor fixes 2011-08-31 01:21:02 +02:00
Lennart Poettering
f13e30d22a label: introduce label_bind() and make use of it where necessary
https://bugzilla.redhat.com/show_bug.cgi?id=729997
2011-08-31 01:02:00 +02:00
Lennart Poettering
de6c78f879 service: change default stdout/stderr to syslog 2011-08-30 22:57:58 +02:00
Lennart Poettering
346bce1f4c stdout-bridge: rename logger to stdout-syslog-bridge to make it more descriptive 2011-08-30 22:42:49 +02:00
Lennart Poettering
af65c24804 selinux: explicitly relabel /run/initramfs/root-fsck and friends 2011-08-30 18:49:41 +02:00
Lennart Poettering
149e180ac3 specifier: drop misplaced assert() 2011-08-30 16:49:48 +02:00
Lennart Poettering
edb4977837 selinux: don't relabel /run/initramfs
/run/initramfs usually contains the initrd so that we can jump back into
it on shutdown. It's usually relatively large and static data, hence we
should avoid relabelling of it. On my netbook this saves 6s. (6.6s
needed for relabelling /dev and /run goes down to 600ms -- still way too
much, but much better).
2011-08-30 00:16:00 +02:00
Lennart Poettering
4d4c74866c selinux: retest selinux after we loaded the policy 2011-08-29 23:36:10 +02:00
Lennart Poettering
990a1abae2 logind: downgrade session create/remove log messages to LOG_DEBUG for
cronjobs and similar which have no tty/X11 server assigned

https://bugzilla.redhat.com/show_bug.cgi?id=727315
2011-08-29 22:08:19 +02:00
Lennart Poettering
7daa9e6e29 execute: fix bus serialization for commands 2011-08-29 19:45:46 +02:00
Lennart Poettering
d2d4b03899 acl: properly handle if devices are tagged as uaccess but do not have a device node 2011-08-25 16:50:49 +02:00
Lennart Poettering
6705c2df46 update README 2011-08-24 23:29:28 +02:00
Frederic Crozat
1c5224b336 cryptsetup-generator: block boot when querying passphrase.
Ensure we wait for passphrase before starting tty1 or graphical display.
Needed when not using plymouth.
2011-08-24 16:23:44 +02:00
Frederic Crozat
41e6f28acc cryptsetup: accept "none" option 2011-08-24 16:22:58 +02:00
Frederic Crozat
a5afffa151 path-lookup: monitor /etc/systemd/user for user manager 2011-08-24 14:08:56 +02:00
Tero Roponen
07cc1c066d dbus: 'directrion' is not a valid attribute
$ gdbus introspect --system --dest org.freedesktop.systemd1 --object-path /org/freedesktop/systemd1
Error parsing introspection XML: 115:64: attribute 'directrion' invalid for element 'arg'
2011-08-24 13:54:41 +02:00
Frederic Crozat
65457142f1 initctl: check for kexec_loaded when reboot is requested through initctl 2011-08-24 02:19:30 +02:00
Miklos Vajna
240fc26e03 service: all rcS.d scripts have been converted on Frugalware 2011-08-24 02:14:10 +02:00
Lennart Poettering
700de55514 strv: fix counting in strv_env_delete() 2011-08-24 01:10:13 +02:00
Lennart Poettering
944d6c0427 udev: since bt devices cannot be renamed revert to %k 2011-08-24 01:09:21 +02:00
Lennart Poettering
e03695957f udev: use $name instead of %k 2011-08-23 18:06:58 +02:00
Lennart Poettering
0c85a4f3ef cgroup: optionally mount a specific cgroup controllers together, and add cpu+cpuacct to the default 2011-08-23 00:37:35 +02:00
Lennart Poettering
c5f0532ff1 timedate: make NTP controllable too 2011-08-22 01:08:10 +02:00
Lennart Poettering
e27796a030 cgroup: when trimming cgroup trees, honour sticky bit of tasks file 2011-08-21 21:00:41 +02:00
Lennart Poettering
b4454c5edf readahead: make use of block_get_whole_disk() where applicable 2011-08-21 20:20:41 +02:00
Lennart Poettering
ad293f5a94 cgroup: honour sticky bit when trimming cgroup trees 2011-08-21 20:07:46 +02:00
Lennart Poettering
94959f0fa0 exec: allow passing arbitrary path names to blkio cgroup attributes
If a device node is specified, then adjust the bandwidth/weight of it,
otherwise find the backing block device of the file system the path
refers to and adjust its bandwidth/weight.
2011-08-21 20:07:45 +02:00
Lennart Poettering
9e37286844 exec: add high-level controls for blkio cgroup attributes 2011-08-21 20:07:08 +02:00
Lennart Poettering
d8bbda9141 cgroup: expose cgroup attributes as unit properties on the bus 2011-08-21 20:07:08 +02:00
Lennart Poettering
ab1f063390 exec: optionally apply cgroup attributes to the cgroups we create 2011-08-20 00:22:02 +02:00
Frederic Crozat
5ed27dbdbf PATCH: add missing header include
Hi,

MS_REC is not always defined in sys/mount.h. linux/fs.h should be
included, since it is always defined there.
--
Frederic Crozat <fcrozat@suse.com>
SUSE

>From 9f8a50decf45aaa4436b9fb3a0ab360f238b7d96 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Thu, 18 Aug 2011 15:42:29 +0200
Subject: [PATCH] nspawn: add missing include header for MS_REC.
2011-08-19 00:34:51 +02:00
Kay Sievers
e191553d1d convert int to boolean for dbus_bool_t 2011-08-17 19:38:07 +02:00
Koen Kooi
612e58b45b gperf: add missing.h that was present in the C version to the m4
This fixes:

src/load-fragment-gperf.c:413:51: error: 'RLIMIT_RTTIME' undeclared (first use in this function)
2011-08-04 03:16:28 +02:00
Lennart Poettering
ff01d048b4 exec: introduce PrivateNetwork= process option to turn off network access to specific services 2011-08-02 05:24:58 +02:00
Lennart Poettering
a41fe3a293 nspawn: add new --no-net switch to turn off networking in the container 2011-08-02 04:49:37 +02:00
Frederic Crozat
de3910a324 service: parse insserv.conf and plugs its system facilities into systemd. 2011-08-02 01:37:48 +02:00
Lennart Poettering
835680f53e dbus: fix MaskUnitFiles bus call 2011-08-02 00:10:40 +02:00
Frederic Crozat
54a437057e bash: Allow to restart already started service.
Allow to restart all services, not only inactive one.

https://bugzilla.novell.com/show_bug.cgi?id=704782
2011-08-01 23:29:56 +02:00
Tom Gundersen
46e964c5ce initctl: support 'telinit u/q'
We send SIGTERM (resp., SIGHUP) when we receive request for changing to
runlevel 'u' (resp., 'q').

As initctl is already async, we just send the signals rather than first
attempting to connect to sytemd over dbus and then falling back to kill.
2011-08-01 23:22:24 +02:00
Lennart Poettering
afbb67e485 gperf: fix load-fragment-gperf.gperf.m4 when HAVE_SYSV_COMPAT is not set 2011-08-01 23:15:02 +02:00
Lennart Poettering
7aaa27f219 main: fix reexec 2011-08-01 22:42:19 +02:00
Lennart Poettering
1d6702e8d3 umask: set umask of a number of sockets by default, even though we check creds on connections 2011-08-01 22:42:07 +02:00
Lennart Poettering
fa8f36ac15 execute: properly enforce group
https://bugzilla.redhat.com/show_bug.cgi?id=723892
2011-08-01 21:34:42 +02:00
Lennart Poettering
4c12626c8e umask: change default umask to 0022 just to be sure, and set it explicitly in all binaries, in order to make sure it is set when started from the terminal 2011-08-01 20:52:18 +02:00
Lennart Poettering
07f8a4aa49 manager: call generators with umask 0022 2011-08-01 20:51:18 +02:00
Lennart Poettering
c375a7f750 getty: fix message 2011-08-01 20:28:59 +02:00
Lennart Poettering
980fc73d1f getty: automatically spawn getty on xen console xvc0
https://bugzilla.redhat.com/show_bug.cgi?id=726976
2011-08-01 20:28:01 +02:00
Lennart Poettering
39c2a6f193 hashmap: speed up hashmap allocations by introducing an allocation cache 2011-08-01 16:50:55 +02:00
Lennart Poettering
4d14be09d6 missing: define gettid() 2011-08-01 05:06:15 +02:00
Lennart Poettering
3bfc71846c util: place a couple of _likely_ around cache TLS vars 2011-08-01 05:05:59 +02:00
Lennart Poettering
b636465bc0 util: add is_main_thread() call 2011-08-01 05:05:12 +02:00
Lennart Poettering
cd0ed1db9b util: more join() optimizations 2011-08-01 02:45:51 +02:00
Lennart Poettering
44d9105692 util: use join() instead of asprintf() as an optimization 2011-08-01 02:39:22 +02:00
Lennart Poettering
70132bd042 util: various optimizations, using join() 2011-08-01 01:55:31 +02:00
Lennart Poettering
911a4828e0 util: introduce join() to speed up simple string concatenations 2011-08-01 01:28:01 +02:00
Lennart Poettering
57a8eca84a util: optimize strstrip() a bit 2011-08-01 01:18:33 +02:00
Lennart Poettering
d937fbbd97 conf-parser: properly handle known but not parsed assignments 2011-08-01 01:18:14 +02:00
Lennart Poettering
f975e971ac load-fragment: speed up parsing by using a perfect hash table with configuration settings built by gperf 2011-08-01 00:43:05 +02:00
Lennart Poettering
f786e80d7a systemctl: fix parsing of LoadError property for systemctl show 2011-07-31 18:28:33 +02:00
Lennart Poettering
a43757462a dbus: export unit file state 2011-07-31 18:28:02 +02:00
Lennart Poettering
07672f492e main: show load profiling in test mode, too 2011-07-31 18:13:59 +02:00
Lennart Poettering
9f39404c86 dbus: export load error on unit objects 2011-07-31 18:13:03 +02:00
Kay Sievers
a27d218416 shutdownd: add 'success message' if we retried detaching stuff
If we need to retry, we print things like
  'Not all file systems unmounted, 1 left'
We should also print something after we succeeded, so we don't leave
the impression we left stuff behind.
2011-07-30 20:24:40 +02:00
Lennart Poettering
b9b2b042c5 sd-login: build test code again 2011-07-30 16:42:26 +02:00
Lennart Poettering
ecdcbc5e60 systemctl: s/ignore/ignore_error/ in 'show' output 2011-07-30 16:42:05 +02:00
Lennart Poettering
2030694fec git: hide org.freedesktop.systemd1.policy.in 2011-07-29 03:26:10 +02:00
Lennart Poettering
6b2bf92353 nspawn: properly bind mount /sys/fs/selinux into container, since /selinux moved there 2011-07-29 03:25:05 +02:00
Lennart Poettering
d60ef52650 sd-login: return size of arrays as return value in functions that generate an array 2011-07-29 03:14:06 +02:00
Lennart Poettering
4ef3108288 selinux: mount /sys, /proc, /dev before we load the SELinux policy 2011-07-29 01:49:46 +02:00
Lennart Poettering
0b3325e79e selinux: use setcon() instead of reexec to apply selinux policy 2011-07-28 23:52:23 +02:00
Lennart Poettering
058dc6f379 main: redirection to telinit is unnecessary if sysv compat is disabled 2011-07-28 23:42:47 +02:00
Lennart Poettering
9d76d730ef main: profile unit file loading 2011-07-28 23:41:57 +02:00
Lennart Poettering
189583d7e4 label: generalize label_get_socket_label_from_exe() a bit 2011-07-28 23:39:29 +02:00
Lennart Poettering
d605b2fd41 dbus: the changes array might actually be NULL when ti is empty 2011-07-28 15:49:18 +02:00
Michael Biebl
288088b86c Remove a stray empty line 2011-07-28 15:03:30 +02:00
Michael Biebl
25bafad67f Don't show a warning message in non-enforcing mode.
If we fail to load the SELinux policy only log an error message in
enforcing mode.
2011-07-28 15:01:41 +02:00
Lennart Poettering
6c7506dca3 logind: properly write user state files 2011-07-28 04:15:53 +02:00
Lennart Poettering
455a946f40 selinux: also profile memory usage 2011-07-27 21:47:25 +02:00
Lennart Poettering
bbc7328308 pam: set XDG_SEAT and XDG_VTNR when logging in 2011-07-26 23:09:34 +02:00
Lennart Poettering
add30678a1 sd-login: add new call sd_seat_can_multi_session() 2011-07-26 23:09:09 +02:00
Lennart Poettering
64559e8b4e logind: rename can_activate_sessions to can_multi_session 2011-07-26 21:49:29 +02:00
Lennart Poettering
40cbb26f3b udev: fix copy/paste error when applying sysctl to network devices 2011-07-26 21:45:18 +02:00
Lennart Poettering
0843f2d65e selinux: check PID 1 label instead of /selinux mount point to figure out if selinux is already initialized 2011-07-25 21:59:05 +02:00
Lennart Poettering
871e580949 selinux: log how much time it takes to load the SELinux policy and database 2011-07-25 21:22:57 +02:00
Lennart Poettering
41e4d6e9ac sysctl: apply network specific sysctls to each network card as they appear 2011-07-25 20:25:49 +02:00
Lennart Poettering
8d41a963d6 machine-id: be nice and generate compliant v4 UUIDs
Newly generated machine IDs now qualify as randomized v4 UUIds. This is
trivial to do and hopefully increases adoption of the ID for various
purposes.
2011-07-25 19:32:43 +02:00
Kay Sievers
fb922d4f82 seat: add another 'Plugable' device id 2011-07-25 14:35:33 +02:00
Lennart Poettering
729e3769c3 systemctl: hook up new install logic
This adds a number of new options to systemctl, for presets, reenabling,
masking/unmask, and runtime operations.
2011-07-25 04:58:02 +02:00
Lennart Poettering
4b7a6af440 nspawn: mount a new /proc instance in the container so that we don't see the hosts' PID tree
This partially reverts f5c1b9eeb9.
2011-07-23 15:54:52 +02:00
Lennart Poettering
e1ea662c33 systemctl: remove monitor command since it is mostly useless 2011-07-23 04:21:47 +02:00
Lennart Poettering
34c4b47b7f systemctl: split --help into multiple sections 2011-07-23 04:20:22 +02:00
Lennart Poettering
253ee27a0c manager: add log control via RT signals 2011-07-23 04:15:38 +02:00
Lennart Poettering
c0576cd6d6 bus: expose installer functions 2011-07-23 03:44:47 +02:00
Lennart Poettering
5780425ea7 login: drop unused variables 2011-07-23 01:18:20 +02:00
Lennart Poettering
4b67834e9f util: make use of get_user_creds() and get_group_creds() wherever applicable 2011-07-23 01:17:59 +02:00
Lennart Poettering
e6a6b40679 install: don't choke on dead links 2011-07-23 00:49:32 +02:00
Lennart Poettering
3d7d60c822 uaccess: port over to using sd-login 2011-07-23 00:48:11 +02:00
Lennart Poettering
4bf2bbb6fb lookup: fix NUL termination of search path array 2011-07-23 00:47:50 +02:00
Lennart Poettering
ddd8876392 util: user parse_uid() wherever applicable 2011-07-23 00:47:17 +02:00
Lennart Poettering
034a2a52ac sd-login: beef up login api, to add monitoring and enumerating 2011-07-22 21:01:15 +02:00
Lennart Poettering
bccc1d8859 shutdown: untabify 2011-07-22 04:32:22 +02:00
Harald Hoyer
2006d9acb1 shutdown: initialize the controlling terminal
Thanks Kay Sievers!
2011-07-22 04:31:21 +02:00
Harald Hoyer
3b8a1f3fee shutdown: remove close_nointr_nofail after make_stdio call
make_stdio itsselves closes the fd already
2011-07-22 04:31:21 +02:00
Lennart Poettering
f782b8d031 util: use readdir_r() instead of readdir() 2011-07-22 04:31:21 +02:00
Lennart Poettering
830964834f install: add new installer implementation
This new installer will replace the current code of "systemctl enable"
but also be available via D-Bus. It adds a couple of new features:

- Mask/Unmask calls
- Reenable call
- Preset call
- Support for enabling units temporarily (i.e. in /run/systemd instead
  of /etc/systemd)
- Enumeration of installed units
- Support for out-of-search-path units

systemctl and D-Bus are not hooked up with this yet
2011-07-22 04:31:21 +02:00
Lennart Poettering
09adcdf71d systemctl: fix indenting 2011-07-22 04:31:21 +02:00
Lennart Poettering
f437d5d203 path-lookup: add both the configured and the fixed search paths in 2011-07-22 04:31:20 +02:00
Lennart Poettering
c800e48374 path-lookup: make inclusion of user private units optional 2011-07-22 04:31:20 +02:00
Kay Sievers
ff4daf5a34 fix hwclock_apply_localtime_delta() to properly handle negative TZ offset
Localtime may be a negative number, i.e. GMT-7. Fix based on a
patch from Kelly Anderson <kelly@silka.with-linux.com>.
2011-07-21 20:28:27 +02:00
Lennart Poettering
f68c5a7076 sysctl: support multiple prefixes in a single invocation 2011-07-15 02:01:31 +02:00
Lennart Poettering
55af389785 logind: enable PowerOff/Reboot calls 2011-07-15 01:53:11 +02:00
Lennart Poettering
1eae4c45c9 libs: add symbol versioning for the benefit of RPM 2011-07-14 23:49:37 +02:00
Lennart Poettering
114a50f898 sd-daemon: turn sd-daemon.c into a shared library 2011-07-14 23:06:31 +02:00
Lennart Poettering
d40c98162f uaccess: become a nop when not run on a systemd system 2011-07-14 22:51:28 +02:00
Lennart Poettering
74b91131ed logind: introduce libsystemd-login.so as fast path to access logind data 2011-07-14 22:51:28 +02:00
Lennart Poettering
0a55b298d9 systemctl: don't try rebooting with /dev/initcl if Upstart worked 2011-07-14 18:05:33 +02:00
Lennart Poettering
501c92c432 logind: fix some potentially uninitialized accesses 2011-07-13 23:17:05 +02:00
Lennart Poettering
576a01c873 nspawn: compress mount table a bit 2011-07-13 22:50:59 +02:00
Lennart Poettering
85f248b266 consolidate TODO 2011-07-13 22:05:35 +02:00
Lennart Poettering
f5c1b9eeb9 nspawn: always use bind mounts to make API file systems available in the container
This ensures that read-only flags are never passed from the container to
the host OS.
2011-07-13 21:57:56 +02:00
Lennart Poettering
2eb916cdff logind: use new udev_enumerate_add_match_parent() where applicable 2011-07-13 21:49:21 +02:00
Lennart Poettering
309c2a2ce9 loginctl: use new udev_device_has_tag() call from libudev where applicable 2011-07-13 20:11:23 +02:00
Lennart Poettering
f2994ddbf9 logind: remove some unused labels 2011-07-13 20:06:27 +02:00
Lennart Poettering
4d44e4f0b5 udev: actually check for existance of ID_PATH_TAG before we use it 2011-07-13 20:06:11 +02:00
Lennart Poettering
de07ab16c6 loginctl: implement missing kill verb 2011-07-13 19:59:28 +02:00
Lennart Poettering
a17204af0e unit: use ESRCH as error when we don't find anybody to kill 2011-07-13 19:59:28 +02:00
Lennart Poettering
0a524ba7c3 unit: accept empty defaults for kill who/mode args 2011-07-13 19:59:28 +02:00
Lennart Poettering
88e3dc903b loginctl: implement more verbs 2011-07-13 19:59:28 +02:00
Kay Sievers
d4b36d99f1 seat: udev - use ID_PATH_TAG instead of 'sed' hack 2011-07-13 19:45:36 +02:00
Lennart Poettering
82e487c56d unit: introduce ConditionFileIsExecutable= and use it where we check for a binary we'll spawn 2011-07-12 04:25:02 +02:00
Lennart Poettering
3611581ebd service: properly handle who argument on D-Bus kill calls 2011-07-12 04:05:33 +02:00
Lennart Poettering
ee17ee7c5c tmpfiles: allow creation of named pipes with tmpfiles 2011-07-12 03:56:56 +02:00
Lennart Poettering
7a2a0b907b sysctl: support application of sysctl subtrees 2011-07-12 03:36:17 +02:00
Lennart Poettering
9356a6c656 build-sys: fix make distcheck 2011-07-12 01:11:40 +02:00
Lennart Poettering
89d471d55e shutdown: coding style fixes 2011-07-11 22:56:45 +02:00
Lennart Poettering
7e2bb92dca Merge remote-tracking branch 'harald/master' 2011-07-11 22:39:57 +02:00
Zbigniew Jędrzejewski-Szmek
2fb1aedaf2 logind: Fix compilation without ACL
Compilation fails if sys/acl.h is not available. The configure script
already tests for sys/acl.h presence, but the result was so far unused.
To compile without acl, stub implementations of the acl functions are
used.
2011-07-11 22:29:45 +02:00
Bastien Nocera
1c7dde3e47 build-sys: Add i18n support through intltool
And put the PolicyKit policy files up for translation.
2011-07-11 21:10:33 +02:00
Kay Sievers
2376ce132b clarify separate-/usr message
Everything should be fine if /usr is mounted from initramfs.
2011-07-11 02:12:42 +02:00
Lennart Poettering
24310c11ba loginctl: add missing header file 2011-07-09 00:04:27 +02:00
Lennart Poettering
aca4c78676 systemctl: fix --help syntax for variables 2011-07-08 21:45:59 +02:00
Lennart Poettering
1189684177 logind: don't confuse 'shared' with a session of its own 2011-07-08 21:45:44 +02:00
Lennart Poettering
e3e9cc803e logind: fix introspection typo 2011-07-08 21:45:23 +02:00
Lennart Poettering
7b3afbac4d acl: two tag matching is not going to be available in libudev 2011-07-08 21:44:22 +02:00
Lennart Poettering
a4c279f874 loginctl: add various introspection functions 2011-07-08 21:39:10 +02:00
Lennart Poettering
33fd64726c seat: only mark main input device for seat assignments 2011-07-08 21:37:17 +02:00
Lennart Poettering
69fc152fc1 systemctl: hide all information on --kill-mode= since it is mostly useless 2011-07-07 04:19:03 +02:00
Lennart Poettering
ef3a24de02 systemctl: use cached tty value where possible 2011-07-07 03:30:47 +02:00
Lennart Poettering
3b0727f5ec systemctl: cache tty value before we open the pager 2011-07-07 03:30:31 +02:00
Lennart Poettering
abca482291 loginctl: add basic implementation of loginctl for introspecting controlling sessions/users/seats 2011-07-07 03:29:56 +02:00
Lennart Poettering
1968a36040 cgls: add pager support to systemd-cgls 2011-07-07 02:34:35 +02:00
Lennart Poettering
8092a428d4 path,unit: support globbing in conditions and path units 2011-07-07 02:07:39 +02:00
Lennart Poettering
a755605296 manager: merge serialization and desrialization counter into one, and increase it when reexecuting
Instead of having individual counters n_serializing and n_deserializing
have a single one n_reloading, which should be sufficient.

Set n_reloading when we are about to go down for reexecution to avoid
cgroup trimming when we free the units for reexecution.
2011-07-06 00:47:42 +02:00
Lennart Poettering
38a285d776 cgroup: don't trim a cgroup we create, we might just take it over from somebody else 2011-07-06 00:14:26 +02:00
Lennart Poettering
d5762cf540 udev: tag virtio serial ports with systemd by default 2011-07-05 20:32:08 +02:00
Lennart Poettering
347b9c4b1f udev: improve udev rule a bit 2011-07-05 14:27:26 +02:00
Michal Schmidt
f878830392 service: 'pidfile:' in SysV chkconfig header implies a real daemon
The presence of the chkconfig "pidfile:" header in the initscript is an
excellent indication that it's not a oneshot script (like iptables),
but a real daemon (like httpd).
2011-07-05 10:17:42 +02:00
Lennart Poettering
5db35d0672 udev: pull in printer.target from all kinds of printers 2011-07-05 03:29:24 +02:00
Lennart Poettering
7862f62de3 util: explicitly turn of O_CLOEXEC for stdin/stdout/stderr 2011-07-05 03:29:24 +02:00
Lennart Poettering
ccaa61498c add a few O_CLOEXEC where missing 2011-07-05 03:29:24 +02:00
Lennart Poettering
b5ef5549e9 logind: write rules files atomically 2011-07-05 03:29:24 +02:00
Lennart Poettering
5ba7b87195 password-agent: actually really don't access unallocated memory
Fix for 9726f9ff11
2011-07-04 19:06:43 +02:00
Lennart Poettering
9726f9ff11 password-agent: make sure not to access unallocated memory
Tracked down by Frederic Crozat
2011-07-04 19:00:48 +02:00
Harald Hoyer
7cb1094ace shutdown: pivot_root to a tmpfs directory to properly umount root
check for /run/initramfs/shutdown
mount bind all needed dirs to /run/initramfs
pivot_root to /run/initramfs
execute /run/initramfs/shutdown
2011-07-04 12:47:50 +02:00
Harald Hoyer
31657718f5 umount: log failed umounts only once at the end 2011-07-04 12:47:50 +02:00
Harald Hoyer
6f7f51f793 umount: umount, until all umounts failed 2011-07-04 12:47:50 +02:00
Harald Hoyer
0415a10436 umount: log_info about what we unmounted 2011-07-04 12:47:50 +02:00
Michal Schmidt
b8590c197d systemadm: report GLib.Error only to stderr
When a GLib.Error happens, it is likely that showing a message box would fail
too.

https://bugzilla.redhat.com/show_bug.cgi?id=716663
2011-07-03 01:51:09 +02:00
Michal Schmidt
30923233b3 shutdown: print the standard wall message even when the user provided one
Print the user-provided wall message in addition to the standard one, not
instead of it.

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=624149
2011-07-03 00:15:43 +02:00
Michal Schmidt
52c002150a shutdown: respect the dry run option '-k'
Don't do the actual power-off/reboot when '-k' is passed to shutdown.

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=624149
2011-07-03 00:12:16 +02:00
Michal Schmidt
1a63987788 shutdown: accept minutes argument without '+'
Both SysVinit's and upstart's shutdown commands accept the number of
minutes with or without the plus sign.
'shutdown -h 1' works in RHEL 5, Fedora 14, Debian 6.
Let's be compatible.

https://bugzilla.redhat.com/show_bug.cgi?id=708886
2011-07-03 00:11:22 +02:00
Michal Schmidt
1b562e4604 manager: consider the active job when merging
In some cases systemd forgets to start enabled services, e.g. in this scenario:
1. The job "sendmail.service/start" is installed.
2. Before systemd proceeds with this job, a process requests a reload of
   sendmail. The job "sendmail.service/reload" is enqueued.
3. The original job is silently discarded. The service is not started.
   The reload job proceeds by doing nothing.

The fix is to allow merging transaction jobs with the active job.
With the fix the resulting merged job "sendmail.service/reload-or-start" is
installed and the service works as expected.

https://bugzilla.redhat.com/show_bug.cgi?id=633774
2011-07-02 17:32:05 +02:00
Lennart Poettering
21bdae12e1 tmpfiles: don't exit with an error code if we cannot access all files
This is just to avoid confusion if people use stuff like FUSE file
systems or SELinux which might disallow access to files even if tmpfiles
is running as root.

We still log away if we cannot access a file, but we do not return a
failure exit code in the end.
2011-07-02 01:45:29 +02:00
Michael Olbrich
dee87d612d umount: ignore missing /proc/swaps
/proc/swaps does not exist when swap is disabled in the kernel.
Just report an empty list of mountpoints to unmount in this case.
2011-07-02 00:26:23 +02:00
Lennart Poettering
b1bc08e599 manager: don't even think of enumerating sysv services in user instances 2011-07-01 23:53:44 +02:00
Lennart Poettering
5c94603d4c nspawn: better use setresuid() instead of setreuid() 2011-07-01 23:53:14 +02:00
Michal Vyskocil
687d0825a4 nspawn: spawn shell under specified --user
Add -u/--user option, which changes the effective and real user and
group id to the new value. The user must exists in the chroot, otherwise
it will fail. Both username and user id are accepted. The user home is
created as well.

It also setup HOME, USER, LOGNAME and SHELL variables .
2011-07-01 23:51:14 +02:00
Michal Vyskocil
1cccf43569 nspawn: Move the get_user_creds from execute.c to utils.c for later usage in nspawn.c. 2011-07-01 23:49:56 +02:00
Lennart Poettering
eeecf6e607 log: log to syslog unless connected to a tty in user mode 2011-07-01 22:35:34 +02:00
Lennart Poettering
0254daedb1 logind: create private subdirectory for X11 socket 2011-07-01 22:34:58 +02:00
Lennart Poettering
be81bfc4a7 dbus: listen on private sockets in user mode too 2011-07-01 22:34:37 +02:00
Lennart Poettering
8fef765900 unit: support wildcards in Environment=, EnvironmentFile= 2011-07-01 01:13:47 +02:00
Lennart Poettering
1fd45a90f5 unit: do wildcard expansion in ListenStream= and friends 2011-07-01 00:55:34 +02:00
Lennart Poettering
31e54cc807 cgroup: kill processes even in cgroups that aren't realized 2011-07-01 00:41:41 +02:00
Lennart Poettering
0aef434548 unit: add three new specifiers to use in unit files 2011-07-01 00:41:18 +02:00
Lennart Poettering
30b2c336d8 pam: initialize XDG_RUNTIME_DIR 2011-06-30 04:31:49 +02:00
Lennart Poettering
aa87e62474 execute: properly pass PAM environment to executed process 2011-06-30 04:31:34 +02:00
Lennart Poettering
9a0e689634 util: try harder to rename the process 2011-06-30 04:16:10 +02:00
Lennart Poettering
7fbf31dfe3 execute: fix PAM error checking 2011-06-30 04:15:53 +02:00
Lennart Poettering
3dead8d925 execute: invoke sigwait() in a loop when waiting for PAM parent, to avoid spurious wake-ups 2011-06-30 04:15:39 +02:00
Lennart Poettering
0f1df8e169 execute: don't invoke pam_setcred, since we are not running on a tty where the user could change his password 2011-06-30 04:14:50 +02:00
Lennart Poettering
e025b4c306 unit: consider all cgroups in the name=systemd hierarchy, even when the user has specified an explicit path in it 2011-06-30 02:41:01 +02:00
Lennart Poettering
f284f69a7b execute: when parsing ConrolGroup= replace wildcards 2011-06-30 02:39:29 +02:00
Lennart Poettering
d42d27ead9 logind: add service for per-user shared systemd daemon 2011-06-30 02:18:01 +02:00
Lennart Poettering
e6061ab2af logind: make sure to create/run/systemd/sessions before we try to place a fifo in it 2011-06-30 02:16:07 +02:00
Lennart Poettering
530345e782 manager: use sd_notify() to notify parent systemd that we have finished startup 2011-06-30 02:15:41 +02:00
Lennart Poettering
3b8bdddeff execute: do initgroups() first, pam initialization second so that it can still modify the groups list 2011-06-30 02:15:01 +02:00
Lennart Poettering
64747e2d4b exec: add ControlGroupModify= switch to allow changing access mode to cgroups fs 2011-06-30 00:11:25 +02:00
Lennart Poettering
8585357a0e util: clear scrolling region when clearing screen 2011-06-29 21:17:31 +02:00
Lennart Poettering
5bc849fd06 logind: allow access to SetIdleHint() to owner of the session 2011-06-29 19:53:27 +02:00
Lennart Poettering
539072153c acl: libudev currently doesn't handle properly enumerator matches with multiple tags, so avoid using them for now 2011-06-29 19:41:07 +02:00
Lennart Poettering
f5f32cd7ad uaccess: drop ACLs in case of error, just to be safe 2011-06-29 18:06:58 +02:00
Lennart Poettering
0b191e603c logind: hook uaccess into udev by default 2011-06-29 04:14:43 +02:00
Lennart Poettering
b4f78aeac6 logind: we need to open and close a named pipe once for read before we get EOF 2011-06-29 03:48:53 +02:00
Lennart Poettering
4a4b033ff2 logind: when initializing drop sessions that are unreferenced 2011-06-29 03:48:16 +02:00
Lennart Poettering
b668e06428 dbus: add FlushDevices() bus call to reset all seat assignments 2011-06-29 03:12:23 +02:00
Lennart Poettering
4fa4c2ac6e logind: fix typo in config parser 2011-06-29 02:48:29 +02:00
Lennart Poettering
c36eecdfcb man: update pam_systemd page to document new behaviour 2011-06-29 02:46:20 +02:00
Lennart Poettering
8fa365e586 logind: add man page for configuration file 2011-06-29 02:27:53 +02:00
Lennart Poettering
25d934917d logind: move default reset controller/kill exclude list into logind 2011-06-29 02:27:16 +02:00
Lennart Poettering
ac2dcbb215 logind: udev no longer ignores subsystem matches on monitors when used in conjunction with tags 2011-06-29 01:49:21 +02:00
Lennart Poettering
1c9a2c1047 logind: be a bit more rigid with seat names 2011-06-29 01:48:59 +02:00
Lennart Poettering
ab2a782ab7 logind: fix udev rule to generate valid tags, as a temporary fix until udev gains a native feature for this 2011-06-29 01:48:30 +02:00
Lennart Poettering
193197e85c logind: parse configuration file 2011-06-29 01:47:55 +02:00