summaryrefslogtreecommitdiff
path: root/src/tmpfiles/tmpfiles.c
AgeCommit message (Collapse)Author
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-27util-lib: split out globbing related calls into glob-util.[ch]Lennart Poettering
2015-10-27util-lib: split out printf() helpers to stdio-util.hLennart Poettering
2015-10-27src/basic: rename audit.[ch] → audit-util.[ch] and capability.[ch] → ↵Lennart Poettering
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.
2015-10-27util-lib: split out umask-related code to umask-util.hLennart Poettering
2015-10-27util-lib: move string table stuff into its own string-table.[ch]Lennart Poettering
2015-10-27util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch]Lennart Poettering
2015-10-27util-lib: move a number of fs operations into fs-util.[ch]Lennart Poettering
2015-10-27util-lib: split out file attribute calls to chattr-util.[ch]Lennart Poettering
2015-10-27util-lib: move more file I/O related calls into fileio.[ch]Lennart Poettering
2015-10-27util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering
2015-10-26util-lib: split out user/group/uid/gid calls into user-util.[ch]Lennart Poettering
2015-10-26util-lib: split out IO related calls to io-util.[ch]Lennart Poettering
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
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.
2015-10-24util: split out escaping code into escape.[ch]Lennart Poettering
This really deserves its own file, given how much code this is now.
2015-10-24path-util: unify how we process paths specified on the command lineLennart Poettering
Let's introduce a common function that makes relative paths absolute and warns about any errors while doing so.
2015-10-24util-lib: get_current_dir_name() can return errors other than ENOMEMLennart Poettering
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.
2015-10-23tmpfiles: simplify mountpoint detectionThomas Hindoe Paaboel Andersen
No functional change. Just a simplification. A || (!A && B) is the same as A || B Introduced in 78a92a5a2306709e4587e332728a76901323ade9
2015-10-22tmpfiles: introduce "q" and "Q" for creating quota-enabled btrfs subvolumesLennart Poettering
This allows us to set up the quota group hierarchy in a reasonable way on btrfs file systems.
2015-09-29util: introduce common version() implementation and use it everywhereLennart Poettering
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.
2015-08-07util: Don't interpret quotes by default in extract_first_wordRichard Maw
This adds an EXTRACT_QUOTES option to allow the previous behaviour, of not interpreting any character inside ' or " quotes as separators.
2015-08-07util: change unquote_*_word to extract_*_wordRichard Maw
It now takes a separators argument, which defaults to WHITESPACE if NULL is passed.
2015-08-06tree-wide: fix indentationThomas Hindoe Paaboel Andersen
2015-07-22tmpfiles: downgrade errors when a file system does not support file attributesLennart Poettering
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.
2015-06-17tmpfiles: only root-owned aquota.* files are specialZbigniew Jędrzejewski-Szmek
Fixes #188.
2015-06-15tmpfiles: make sure "R" lines also remove subvolumesLennart Poettering
2015-05-15tmpfiles: use lstat() instead of stat() when checking whether a file system ↵Lennart Poettering
object already exists
2015-05-15tmpfiles: don't fail if we cannot create a subvolume because a file system ↵Lennart Poettering
is read-only but a dir already exists anyway https://bugs.freedesktop.org/show_bug.cgi?id=90281
2015-05-13util: add generic calls for prefixing a root directory to a pathLennart Poettering
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.
2015-05-06tmpfiles: try to handle read-only file systems gracefullyMichael Olbrich
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.]
2015-04-22tmpfiles: use an ordered hashmap for the tmpfiles itemsLennart Poettering
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
2015-04-21tmpfiles: consider an argument of "-" as non-specifiedLennart Poettering
2015-04-13tmpfiles: don't follow symlinks when adjusting ACLs, fille attributes, ↵Lennart Poettering
access modes or ownership
2015-04-12tmpfiles: use qsort_safeZbigniew Jędrzejewski-Szmek
2015-04-10shared: add formats-util.hRonny Chevalier
2015-04-10tmpfiles: fix build with clangThomas Hindoe Paaboel Andersen
Clang is not happy about using the cleanup attribute in switches
2015-04-10tmpfiles: add specifier expansion for L and C lines, tooLennart Poettering
2015-04-10tmpfiles: enforce ordering when executing linesLennart Poettering
Always create files first, and then adjust their ACLs, xattrs, file attributes, never the opposite. Previously the order was not deterministic, thus possibly first adjusting ACLs/xattrs/file attributes before actually creating the items.
2015-04-10tmpfiles: eat up empty columnsLennart Poettering
2015-04-10tmpfiles: substitute % specifiers in arguments for writing files and xattrsLennart Poettering
2015-04-10tmpfiles: warn if we get an argument on lines that don't take anyLennart Poettering
2015-04-10tmpfiles: mostly revert 71044f609b829d802e0eb81270e13b4f55d76476Lennart Poettering
Add a comment why returning a positive error is OK and intended in this case. (It's still a nasty hack to do this though!)
2015-04-10util: unify how we parse mode_t stringsLennart Poettering
2015-04-09tmpfiles: properly return error code from path_set_acl()Lennart Poettering
2015-04-09tmpfiles: add file attribute calls to list of glob needing commandsLennart Poettering
2015-04-08tmpfiles: rework file attribute codeLennart Poettering
- Stick to one type for the flags field: unsigned. This appears to be what the kernel uses, and there's no point in using something else. - compress the flags array by avoiding sparse entries - extend some error messages to not use abbreviated words - avoid TTOCTTOU issues by invoking fstat() after open() when applying file flags - add explanation why we need to check the file type with fstat(). - don't needlessly abbreviate "attribute" as "attrib", in particually as "chattr" abbreviates it as "attr" rather than "attrib".
2015-04-08util: merge change_attr_fd() and chattr_fd()Lennart Poettering
2015-04-07util: rework cunescape(), improve error handlingLennart Poettering
Change cunescape() to return a normal error code, so that we can distuingish OOM errors from parse errors. This also adds a flags parameter to control whether "relaxed" or normal parsing shall be done. If set no parse failures are generated, and the only reason why cunescape() can fail is OOM.
2015-04-06util: rework rm_rf() logicLennart Poettering
- Move to its own file rm-rf.c - Change parameters into a single flags parameter - Remove "honour sticky" logic, it's unused these days