summaryrefslogtreecommitdiff
path: root/src/shared
AgeCommit message (Collapse)Author
2012-06-04unit-name: never create a unit name with a leading '.'Kay Sievers
Supposed to prevent creating unit files like:   ├── dev-sda1.device.wants   │   └── .dot.mount -> /run/systemd/generator/.dot.mount   ├── .dot.mount from: # cat /etc/fstab /dev/sda1 /.dot vfat ro 1 3 which we later skip reading because of the leading '.'.
2012-06-01missing: define MS_STRICTATIME if not defined alreadyLennart Poettering
2012-06-01journal: allow setting of a cutoff log level for disk storage, syslog, kmsg, ↵Lennart Poettering
console forwarding
2012-05-31main: Silence gcc warningMarc-Antoine Perennou
2012-05-31Revert "label: fix systemd-udev labeling of /run directory."Kay Sievers
This reverts commit 9b5af248f04b6cad8a5bca836e89a39e9f6823d9. Udev now explicitely labels only files/directories in /dev. The selinux array API is not released and will not work on other distros at this moment.
2012-05-31mkdir: provide all functions with and without selinux label applicationKay Sievers
2012-05-31mkdir: append _label to all mkdir() calls that explicitly set the selinux ↵Kay Sievers
context
2012-05-31util: don't require libcap when building libsystemd-sharedKay Sievers
src/shared/util.c includes <sys/capability.h> but doesn't use anything defined there. Since <sys/capability.h> is part of libcap, not libc, don't require it. Allows systemd-without-udevd to require fewer external libraries.
2012-05-31util: introduce a proper nsec_t and make use of it where appropriateLennart Poettering
2012-05-31label: fix systemd-udev labeling of /run directory.Daniel J Walsh
systemd-udev is currently incorrectly labeling /run/udev/* content because it is using selinux prefix labeling of /dev. This patch will allow systemd-udev to use prefix labeling of /dev and /run.
2012-05-31selinux: downgrade database load time message to LOG_DEBUGLennart Poettering
2012-05-30build-sys: fix built with --disable-logindLennart Poettering
2012-05-30logind: optionally handle power, sleep and lid switch eventsLennart Poettering
This takes handling of chassis power and sleep keys as well as the lid switch over from acpid. This logic is enabled by default for power and sleep keys, but not for the lid switch. If a graphical session is in the foreground no action is taken under the assumption that the graphical session does this.
2012-05-29capabilities: when dropping capabilities system-wide also drop them from ↵Lennart Poettering
usermode helpers This hooks things up with /proc/sys/kernel/usermodehelper/bset and /proc/sys/kernel/usermodehelper/inheritable.
2012-05-24main: add configuration option to alter capability bounding set for PID 1Lennart Poettering
This also ensures that caps dropped from the bounding set are also dropped from the inheritable set, to be extra-secure. Usually that should change very little though as the inheritable set is empty for all our uses anyway.
2012-05-23manager: rework generator logicLennart Poettering
Previously generated units were always placed at the end of the search path. With this change there will be three unit dirs instead of one, to place generated entries at the beginning, in the middle and at the end of the search path: beginning: for units that need to override all configuration, regardless of user or vendor. Example use: system-update-generator uses this to temporarily redirect default.target. middle: for units that need to override vendor configuration, but not vendor configuration. Example use: /etc/fstab should override vendor supplied configuration (think /tmp), but should not override native user configuration. end: does not override anything but is available as well. Possible usage might be to convert D-Bus bus service files to native units but allowing vendor supplied native units to win.
2012-05-22log: make sure generators never log into the journal to avoid activation ↵Lennart Poettering
deadlocks This makes all generators log to kmsg by default.
2012-05-22util: make sure to fstatat() at most once in rm_rf_children()Lennart Poettering
2012-05-21util: rework in_initrd() logicLennart Poettering
Checking the device major/minor is not a good idea. Let's replace this with an explicit flag file, which we model after /etc/os-release and call /etc/initrd-release.
2012-05-21util: rm_rf_children() add root_dev parameterHarald Hoyer
if root_dev is set, remove subdirectories only, if the device is the same as the root_dev. This prevents to remove files across device boundaries.
2012-05-21util.c: add in_initrd()Harald Hoyer
in_initrd() checks, if the stat() for the device for "/" is 1, which it is for the initramfs.
2012-05-21main: corrected do_switch_root()Harald Hoyer
do_switch_root now mount moves "/dev", "/proc", "/sys", "/run" and removes the old root recursively.
2012-05-21util: fix typo in newdupFrederic Crozat
2012-05-21hostname-setup: also consider (ńone) an unset hostnameLennart Poettering
2012-05-21unit: introduce RequiredBy= setting in [Install], to complement WantedBy=Lennart Poettering
2012-05-21units: introduce new Documentation= field and make use of it everywhereLennart Poettering
This should help making the boot process a bit easier to explore and understand for the administrator. The simple idea is that "systemctl status" now shows a link to documentation alongside the other status and decriptionary information of a service. This patch adds the necessary fields to all our shipped units if we have proper documentation for them.
2012-05-15tmpfiles: if we are supposed to write a string to a file, it's OK if we ↵Lennart Poettering
can't write the trailing newline
2012-05-15install: fix inverted meaning of '--force' in systemctl enableMichal Schmidt
2012-05-14missing: Fix broken syscall(__NR_fanotify_mark... on ppc32Andreas Schwab
The same situation as on o32 mips.
2012-05-14unit: print the color status marks on the leftMichal Schmidt
The alignment of the "[ OK ]" and "[FAILED]" status marks to the right side of the terminal makes it difficult to link them with the messages on the left if your console is wide. I considered the options: 1. Align them to the 80th column regardless of the console width. Disadvantage - either: - truncating messages needlessly, not using available space; or - If the message is long, write the mark over it. => ugly 2. Write them to the 80th column for short messages, and further to the right for longer ones. Disadvantage: - jagged look 3. Write the marks on the left, before the message. Disadvantage: - Breaks tradition from RHL. Advantages: + slightly simpler code + Will annoy holy-traditionalists. I chose option 3. BTW, Debian now uses similar marks on the left with its makefile-style boot. Special values of the "status" argument to status_vprintf are: NULL - no status mark, no message indentation "" - no status mark, message indented as if the mark was there
2012-05-14job: change red [ABORT] status to yellow [DEPEND]Michal Schmidt
The red "[ABORT]" for a dependency failure is too scary. It suggests a crash. And it suggests a problem with the unit itself. Change it to a yellow "[DEPEND]" message. The color communicates the level of seriousness better.
2012-05-09util: a few updates for rm_rf()Lennart Poettering
2012-05-08path-util: there is no function path_parent()Lennart Poettering
2012-05-08logind: implement suspend/hibernate calls with inhibition logicLennart Poettering
2012-05-08sleep: implement suspend/hibernate as first class targetsLennart Poettering
2012-05-08util: split-out path-util.[ch]Kay Sievers
2012-05-08util: split-out hwclock.[ch]Kay Sievers
2012-05-07util: split-out conf-file.[ch]Kay Sievers
2012-05-07conf_files_list(): split out conf_files_list_strv()Kay Sievers
2012-05-07conf_files_list(): files-add() - do not canonicalize file namesKay Sievers
File names in /etc, /run, /usr/lib are sorted/overridden by basename. Sorting things like "/dev/null" with the basename "null" in the hash of config files breaks the ordering and the overriding logic.
2012-05-05logind: implement delay inhibitor locks in addition to block inhibitor locksLennart Poettering
This is useful to allow applications to synchronously save data before the system is suspended or shut down.
2012-05-03cgroup: fix alloca() misuse in cg_shorten_controllers()Lennart Poettering
2012-05-03dbus: handle invalid enum values betterLennart Poettering
2012-05-03hwclock: add taint flag for non-local hwclockLennart Poettering
2012-04-29util: introduce container_of() macroLucas De Marchi
This macro comes from kernel and it's useful for unwrapping structs inside another one. The generated code is actually the same to the one where this logic is used in udev, but using this macro is much cleaner and less error prone.
2012-04-22util: unify getenv() logic for other PIDLennart Poettering
2012-04-22nspawn: add -b switch to automatically look for an init binaryLennart Poettering
2012-04-22default to v102 everywhere, instead of vt100, to synchronize with agettyLennart Poettering
2012-04-22login: assing /dev/console logins to seat0Lennart Poettering
2012-04-22util: fix tty_is_vc_resolve() in a container where ↵Lennart Poettering
/sys/class/tty/console/active is misleading