summaryrefslogtreecommitdiffstats
path: root/src/tmpfiles (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use "return log_error_errno" in more places"Zbigniew Jędrzejewski-Szmek2016-07-231-3/+2
|
* tmpfiles: make sure to always initialize "r" correctly.Lennart Poettering2016-06-211-1/+1
|
* Fix FS_EXTENT_FL description (#3381)kpengboy2016-05-291-1/+1
|
* tmpfiles: add new 'e' action which cleans up a dir without creating itZbigniew Jędrzejewski-Szmek2016-04-201-41/+15
| | | | | | | | I wanted to add a config line that would empty a directory without creating it if doesn't exist. Existing actions don't allow this. v2: properly add 'e' to needs_glob() and takes_ownership()
* tmpfiles: shorten some long error messagesZbigniew Jędrzejewski-Szmek2016-04-201-3/+3
| | | | Also don't print %m when the message already contains all the info.
* tmpfiles: interpret "-" as stdinZbigniew Jędrzejewski-Szmek2016-04-201-9/+17
|
* tree-wide: use SET_FLAG() macro to make code more clearAlexander Kuleshov2016-03-051-4/+1
|
* Merge pull request #2781 from keszybz/selinux-and-warningsLennart Poettering2016-03-031-1/+1
|\ | | | | Selinux loading fix and warning cleanups
| * selinux: always try to load the full selinux dbZbigniew Jędrzejewski-Szmek2016-03-021-1/+1
| | | | | | | | | | https://github.com/systemd/systemd/pull/2508#issuecomment-190901170 Maybe fixes https://bugzilla.redhat.com/show_bug.cgi?id=1308771.
* | tree-wide: no need to pass excess flags to open()/openat() if O_PATH is passedAlexander Kuleshov2016-03-011-2/+2
|/ | | | | | | | | | As described in the documentation: When O_PATH is specified in flags, flag bits other than O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW are ignored. So, we can remove unnecessary flags in a case when O_PATH is passed to the open() or openat().
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* tmpfiles: don't skip path_set_perms on errorEvgeny Vereshchagin2016-02-011-13/+10
| | | | fixes #2196
* tree-wide: check if errno is greater than zero (2)Zbigniew Jędrzejewski-Szmek2016-01-131-1/+1
| | | | | Compare errno with zero in a way that tells gcc that (if the condition is true) errno is positive.
* tmpfiles: create subvolumes for "v", "q", and "Q" only if / is a subvolumeLennart Poettering2015-11-161-2/+22
| | | | | | | | | | | | | | | | It's not a good idea to create subvolumes for parts of the OS tree (such as /home, or /var) if the root directory is not a subvolume too. We shouldn't assume control of "heavier" objects such as subvolumes, if the originating object (the root directory) is a "light-weight" object, i.e. a plain directory. Effectively this means that chroot() environments that are run on a plain directory do not have to deal with problems around systemd creating subvolumes that cannot be removed with a simple "rm" anymore. However, if the chroot manager creates a proper subvolume for such an environment it will also get further subvolumes placed in there, under the assumption that the manager understands the concept of subvolumes in that case.
* tmpfiles: don't consider it a problem if quota is not enabled on btrfsLennart Poettering2015-11-101-0/+4
| | | | | | | If quota is not enabled on a btrfs file system, accept that, and only log a debug message, but do not consider this a reason for failure. Fixes: #1809
* defs: rework CONF_DIRS_NULSTR() macroLennart Poettering2015-11-101-1/+1
| | | | | | | | | | | | The macro is generically useful for putting together search paths, hence let's make it truly generic, by dropping the implicit ".d" appending it does, and leave that to the caller. Also rename it from CONF_DIRS_NULSTR() to CONF_PATHS_NULSTR(), since it's not strictly about dirs that way, but any kind of file system path. Also, mark CONF_DIR_SPLIT_USR() as internal macro by renaming it to _CONF_PATHS_SPLIT_USR() so that the leading underscore indicates that it's internal.
* util-lib: move CONF_DIRS_NULSTR definition to def.hLennart Poettering2015-11-031-0/+1
| | | | | | After all, this is not some compiler or C magic, but something very specific to how systemd works, hence let's move it into def.h, and out of macro.h
* mount-util: move fstype_is_network() and name_to_handle_at() definitions overLennart Poettering2015-10-271-0/+1
|
* util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split out globbing related calls into glob-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split out printf() helpers to stdio-util.hLennart Poettering2015-10-271-0/+1
|
* src/basic: rename audit.[ch] → audit-util.[ch] and capability.[ch] → ↵Lennart Poettering2015-10-271-1/+1
| | | | | | | | | capability-util.[ch] The files are named too generically, so that they might conflict with the upstream project headers. Hence, let's add a "-util" suffix, to clarify that this are just our utility headers and not any official upstream headers.
* util-lib: split out umask-related code to umask-util.hLennart Poettering2015-10-271-0/+1
|
* util-lib: move string table stuff into its own string-table.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: move a number of fs operations into fs-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split out file attribute calls to chattr-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: move more file I/O related calls into fileio.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split out user/group/uid/gid calls into user-util.[ch]Lennart Poettering2015-10-261-0/+1
|
* util-lib: split out IO related calls to io-util.[ch]Lennart Poettering2015-10-261-0/+1
|
* util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering2015-10-251-0/+1
| | | | | There are more than enough to deserve their own .c file, hence move them over.
* util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2015-10-241-0/+1
| | | | | | | | | | | | | | string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
* util: split out escaping code into escape.[ch]Lennart Poettering2015-10-241-0/+1
| | | | This really deserves its own file, given how much code this is now.
* path-util: unify how we process paths specified on the command lineLennart Poettering2015-10-241-5/+2
| | | | | Let's introduce a common function that makes relative paths absolute and warns about any errors while doing so.
* util-lib: get_current_dir_name() can return errors other than ENOMEMLennart Poettering2015-10-241-5/+5
| | | | | | | | | get_current_dir_name() can return a variety of errors, not just ENOMEM, hence don't blindly turn its errors to ENOMEM, but return correct errors in path_make_absolute_cwd(). This trickles down into a couple of other functions, some of which receive unrelated minor fixes too with this commit.
* tmpfiles: simplify mountpoint detectionThomas Hindoe Paaboel Andersen2015-10-231-2/+1
| | | | | | | No functional change. Just a simplification. A || (!A && B) is the same as A || B Introduced in 78a92a5a2306709e4587e332728a76901323ade9
* tmpfiles: introduce "q" and "Q" for creating quota-enabled btrfs subvolumesLennart Poettering2015-10-221-8/+35
| | | | | This allows us to set up the quota group hierarchy in a reasonable way on btrfs file systems.
* util: introduce common version() implementation and use it everywhereLennart Poettering2015-09-291-26/+23
| | | | | | This also allows us to drop build.h from a ton of files, hence do so. Since we touched the #includes of those files, let's order them properly according to CODING_STYLE.
* util: Don't interpret quotes by default in extract_first_wordRichard Maw2015-08-071-2/+2
| | | | | This adds an EXTRACT_QUOTES option to allow the previous behaviour, of not interpreting any character inside ' or " quotes as separators.
* util: change unquote_*_word to extract_*_wordRichard Maw2015-08-071-2/+3
| | | | | It now takes a separators argument, which defaults to WHITESPACE if NULL is passed.
* tree-wide: fix indentationThomas Hindoe Paaboel Andersen2015-08-061-2/+2
|
* tmpfiles: downgrade errors when a file system does not support file attributesLennart Poettering2015-07-221-3/+4
| | | | | | | | | | | | | | | | | This downgrades errors from setting file attributes via tmpfiles to warnings and makes them non-fatal. Also, as a special case, if a file system does not support file attributes at all, then the message is downgraded to debug, so that it is not seen at all. With this change reiserfs should not see any messages at all anymore (since it apparently does not implement file attributes at all), but XFS will still get a warning but no failure. The warning is something the XFS kernel folks should fix though, by adjusting their file attributes behaviour to be identical to ext234's. Fixes #560.
* tmpfiles: only root-owned aquota.* files are specialZbigniew Jędrzejewski-Szmek2015-06-171-3/+4
| | | | Fixes #188.
* tmpfiles: make sure "R" lines also remove subvolumesLennart Poettering2015-06-151-1/+1
|
* tmpfiles: use lstat() instead of stat() when checking whether a file system ↵Lennart Poettering2015-05-151-5/+6
| | | | object already exists
* tmpfiles: don't fail if we cannot create a subvolume because a file system ↵Lennart Poettering2015-05-151-6/+11
| | | | | | is read-only but a dir already exists anyway https://bugs.freedesktop.org/show_bug.cgi?id=90281
* util: add generic calls for prefixing a root directory to a pathLennart Poettering2015-05-131-1/+1
| | | | | | | | So far a number of utilities implemented their own calls for this, unify them in prefix_root() and prefix_roota(). The former uses heap memory, the latter allocates from the stack via alloca(). Port over most users of a --root= logic.
* tmpfiles: try to handle read-only file systems gracefullyMichael Olbrich2015-05-061-2/+11
| | | | | | | | | | | On read-only filesystems trying to create the target will not fail with EEXIST but with EROFS. Handle EROFS by checking if the target already exists, and if empty when truncating. This avoids reporting errors if tmpfiles doesn't actually needs to do anything. [zj: revert condition to whitelist rather then blacklisting, and add goto to avoid stat'ting twice.]
* tmpfiles: use an ordered hashmap for the tmpfiles itemsLennart Poettering2015-04-221-18/+18
| | | | | | | | | | | | We should try to execute them in the same order they appear in the configuration files, as it is documented. Hence move to an ordered hashmap. (Note though, that this still doesn't execute them completely in order: we will still apply non-glob lines before glob-lines, and reorder lines prefixing each other and that apply to the same paths). http://lists.freedesktop.org/archives/systemd-devel/2015-March/029055.html