summaryrefslogtreecommitdiff
path: root/src/shared
AgeCommit message (Collapse)Author
2015-04-19Remove gnutls checkAndy Wingo
2015-04-19Remove libcryptsetup supportAndy Wingo
2015-04-19Remove elfutils checksAndy Wingo
2015-04-19Remove libaudit supportAndy Wingo
2015-04-19Remove gcrypt checksAndy Wingo
2015-04-19Remove compression supportAndy Wingo
2015-04-19Remove IMA supportAndy Wingo
2015-04-19Remove kmod supportAndy Wingo
2015-04-19Remove quotaon/quotacheck checksAndy Wingo
2015-04-08Compiling.Andy Wingo
2015-04-08Remove libiptc thingsAndy Wingo
2015-04-08Remove SysV compatAndy Wingo
2015-04-08Remove utmp thingsAndy Wingo
2015-04-01shared: set - make argument to set_remove() constTom Gundersen
2015-03-31ARM: detect-virt: detect QEMU/KVMAndrew Jones
QEMU/KVM guests do not have hypervisor nodes, but they do have fw-cfg nodes (since qemu v2.3.0-rc0). fw-cfg nodes are documented, see kernel doc Documentation/devicetree/bindings/arm/fw-cfg.txt, and therefore we should be able to rely on it in this detection. Unfortunately, we currently don't have enough information in the DT, or elsewhere, to determine if we're using KVM acceleration with QEMU or not, so we can only report 'qemu' at this time, even if KVM is in use. This shouldn't really matter in practice though, because if detect-virt is used interactively it will be clear to the user whether or not KVM acceleration is present by the overall speed of the guest. If used by a script, then the script's behavior should not change whether it's 'qemu' or 'kvm'. QEMU emulated guests and QEMU/KVM guests of the same type should behave identically, only the speed at which they run should differ.
2015-03-31ARM: detect-virt: detect XenAndrew Jones
2015-03-31detect-virt: use /proc/device-treeAndrew Jones
Kernel doc Documentation/ABI/testing/sysfs-firmware-ofw says that the /proc/device-tree symlink should be used, as opposed to directly accessing /sys/firmware/devicetree/base. The former is ABI, but not the later.
2015-03-27fix gcc warnings about uninitialized variablesHarald Hoyer
like: src/shared/install.c: In function ‘unit_file_lookup_state’: src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized] return r < 0 ? r : state; ^ src/shared/install.c:1796:13: note: ‘r’ was declared here int r; ^
2015-03-26util: rework word parsing and c unescaping codeLennart Poettering
When parsing words from input files, optionally automatically unescape the passed strings, controllable via a new flags parameter. Make use of this in tmpfiles, and port everything else over, too. This improves parsing quite a bit, since we no longer have to process the same string multiple times with different calls, where an earlier call might corrupt the input for a later call.
2015-03-25fstab-generator: don't accept missing root=, but accept root=noneTobias Hunger
And other non-device entries (like fstab does). Mount whatever the user asked to be mounted on / on the kernel command line. Do less sanity check and do *not* bail out when the mount device looks strange or does not exist. This basically makes the changes for deviceless filesystems from yesterday unnecessary and is in line with what we do for filesystems set up in fstab. Remove some code that is now dead (reverting fb02a2775a65 and b0438462). [tomegun: - change patch title/description a bit. - don't touch the /usr logic, that would be a separate change and we don't currently have a convincing use-case for that. - don't bail out on /sys ro. This only makes sense in containers, where we would not be doing this anyway. If there is a use-case we could consider that as a separate patch.]
2015-03-24timedate: remove daylight saving time handling and tzfile parserKay Sievers
We planned to support (the conceptually broken) daylight saving time/local time features in the kernel, SCSI, networking, FAT filesystem, but it turned out to be a race we cannot win and do not want to get involved. Systemd should not fiddle with daylight saving time or parse timezone information itself. Leave everything to glibc or tools like date(1) and do not make any promises or raise expectations that systemd should handle anything like this.
2015-03-24fstab-generator: Do not check deviceless filesystemsTobias Hunger
There is no need to check those.
2015-03-24fstab-generator: Support root on tmpfs (or other deviceless FS)Tobias Hunger
This allows for stateless systems.
2015-03-21missing.h: add more btrfs types and definesMichael Olbrich
2015-03-21shared/mkdir: do not set errno in addition to return valueZbigniew Jędrzejewski-Szmek
All callers look at the return value anyway.
2015-03-19Add change_attr_fd()Goffredo Baroncelli
Add change_attr_fd() function to modify the file/directory attribute.
2015-03-19strv: return NULL from strv_free()David Herrmann
We always return NULL/invalid-object from destructors, fix strv_free() to do the same.
2015-03-16shared: add path_compare(), an ordering path comparisonMichal Schmidt
... and make path_equal() a simple wrapper around it.
2015-03-16shared - reinstate plymouth_running()Tom Gundersen
This will be used by fsckd. This reverts part of 031886edfc6e96ab778c241035a8d00fb0de99d3.
2015-03-16core: Remove explicit Plymouth integrationJasper St. Pierre
Even if plymouth is running, it might have not displayed the splash yet, so we'll see a few lines on fbcon when we should have otherwise had nothing. Plymouth integration was added to systemd in commit 6faa11140bf776cdaeb8d22d01816e6e48296971. That same day, Plymouth got systemd integration [0]. As such, the Plymouth integration has always been obsolete, and was probably only for older Plymouth's. But I can't imagine anybody running a Plymouth from 2011 with a systemd from 2015. Remove the Plymouth/systemd integration, and let Plymouth's code tell systemd to print the details. [0] http://cgit.freedesktop.org/plymouth/commit/?id=537c16422cd49f1beeaab1ad39846a00018faec1 Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> Cc: Daniel Drake <dsd@endlessm.com> Cc: Ray Strode <rstrode@redhat.com>
2015-03-15util: check asprintf return valueZbigniew Jędrzejewski-Szmek
CID #1237546.
2015-03-14sysv-generator: initialize LookupPaths just onceZbigniew Jędrzejewski-Szmek
With debugging on, sysv-generator would print the full set of lookup paths for *every* sysv script. While at it, pass LookupPaths as a pointer in sysv-generator, and constify it everywhere.
2015-03-14util: remove redundant debug messageZbigniew Jędrzejewski-Szmek
mar 14 20:05:34 fedora22 systemd[4058]: /usr/lib/systemd/system-generators/kdump-dep-generator.sh will be executed. mar 14 20:05:34 fedora22 systemd[4058]: Spawned /usr/lib/systemd/system-generators/kdump-dep-generator.sh as 4059. The second line already says everything.
2015-03-13selinux: fix SEGV during switch-root if SELinux policy loadedWill Woods
If you've got SELinux policy loaded, label_hnd is your labeling handle. When systemd is shutting down, we free that handle via mac_selinux_finish(). But: switch_root() calls mkdir_p_label(), which tries to look up a label using that freed handle, and so we get a bunch of garbage and eventually SEGV in libselinux. (This doesn't happen in the switch-root from initramfs to real root because there's no SELinux policy loaded in initramfs, so label_hnd is NULL and we never attempt any lookups.) So: make sure that mac_selinux_finish() actually sets label_hnd to NULL, so nobody tries to use it after it becomes invalid. https://bugzilla.redhat.com/show_bug.cgi?id=1185604
2015-03-13Use space after a silencing (void)Zbigniew Jędrzejewski-Szmek
We were using a space more often than not, and this way is codified in CODING_STYLE.
2015-03-13Check that EWOULDBLOCK is the same as EAGAINZbigniew Jędrzejewski-Szmek
It certainly is everywhere on Linux, but as a courtesy to people doing some strange cross-compilation, check that the assumption holds.
2015-03-13tree-wide: there is no ENOTSUP on linuxDavid Herrmann
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
2015-03-11socket-util: refactor error handling in sockaddr_prettyZbigniew Jędrzejewski-Szmek
2015-03-11sysctl: move property handling to shared/Kay Sievers
2015-03-10util: add rename_noreplaceAlban Crequy
renameat2() exists since Linux 3.15 but btrfs support for the flag RENAME_NOREPLACE was added later. This patch implements a fallback when renameat2() returns EINVAL. EINVAL is the error returned when the filesystem does not support one of the flags.
2015-03-10path-util: fix path_is_mount_point() for symlinksHarald Hoyer
path_is_mount_point() compares the mount_id of a directory and the mount_id of the parent directory. When following symlinks, the function to get the parent directory does not take the symlink into account. /bin -> /usr/bin with /usr being a mountpoint: mount_id of /bin with AT_SYMLINK_FOLLOW != mount_id of /
2015-03-10shared: the btrfs quota field is called "referenced" not "referred"Lennart Poettering
2015-03-10add REMOTE_ADDR and REMOTE_PORT for Accept=yesShawn Landden
2015-03-10Add type specifier for intThomas Hindoe Paaboel Andersen
2015-03-10logs-show: fix check of loop_read_exactThomas Hindoe Paaboel Andersen
just a typo fix
2015-03-09Introduce loop_read_exact helperZbigniew Jędrzejewski-Szmek
Usually when using loop_read(), we want to read the full buffer. Add a helper that mirrors loop_write(), and returns 0 when full buffer was read, and an error otherwise. Use -ENODATA for the short read, to distinguish it from a read error.
2015-03-09efivars: itialize variableZbigniew Jędrzejewski-Szmek
Introduced a few commits ago.
2015-03-09Add missing includesZbigniew Jędrzejewski-Szmek
audit.h uses uint32_t and bool. log.h uses abs.
2015-03-09efivars: use greedy_reallocZbigniew Jędrzejewski-Szmek
2015-03-09efivars: use more _cleanup_Zbigniew Jędrzejewski-Szmek
Also rename r to buf, since r is customarily reserved for the return value.