summaryrefslogtreecommitdiff
path: root/src/shared/copy.c
Commit message (Collapse)AuthorAge
* util: when creating temporary file names, allow including extra id string in itLennart Poettering2017-03-14
| | | | | | | | | | | This adds a "char *extra" parameter to tempfn_xxxxxx(), tempfn_random(), tempfn_ranomd_child(). If non-NULL this string is included in the middle of the newly created file name. This is useful for being able to distuingish the kind of temporary file when we see one. This also adds tests for the three call. For now, we don't make use of this at all, but port all users over.
* util: merge change_attr_fd() and chattr_fd()Lennart Poettering2017-03-14
|
* fix gcc warnings about uninitialized variablesHarald Hoyer2015-03-27
| | | | | | | | | | | | | 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; ^
* tree-wide: there is no ENOTSUP on linuxDavid Herrmann2015-03-13
| | | | Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
* util: add rename_noreplaceAlban Crequy2015-03-10
| | | | | | | | | 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.
* util: the chattr flags field is actually unsigned, judging by kernel sourcesLennart Poettering2015-01-14
| | | | Unlike some client code suggests...
* machined: when cloning a raw disk image, also set the NOCOW flagLennart Poettering2015-01-08
|
* machinectl/machined: implement "rename", "clone", "read-only" verbs for ↵Lennart Poettering2014-12-28
| | | | machine images
* copy: try top copy atime/time/xattrs when copying filesLennart Poettering2014-12-26
|
* machinectl: add new commands for copying files from/to containersLennart Poettering2014-12-18
|
* copy: use btrfs reflinking only whe we know we copy full filesLennart Poettering2014-12-12
|
* nspawn: beef up nspawn with some btrfs magicLennart Poettering2014-12-12
| | | | | | | | This adds --template= to duplicate an OS tree as btrfs snpashot and run it This also adds --ephemeral or -x to create a snapshot of an OS tree and boot that, removing it after exit.
* copy: teach copy_bytes() btrfs reflink magicLennart Poettering2014-12-12
|
* shared: add new btrfs-util.[ch] helpers for doing common btrfs operationLennart Poettering2014-12-12
|
* treewide: sanitize loop_writeZbigniew Jędrzejewski-Szmek2014-12-09
| | | | | | | loop_write() didn't follow the usual systemd rules and returned status partially in errno and required extensive checks from callers. Some of the callers dealt with this properly, but many did not, treating partial writes as successful. Simplify things by conforming to usual rules.
* copy: change error code when hitting copy limit to EFBIGLennart Poettering2014-11-07
| | | | | After all, this is about files, not arguments, hence EFBIG is more appropriate than E2BIG
* copy: teach copy_bytes() sendfile() support, and then replace ↵Lennart Poettering2014-11-07
| | | | sendfile_full() by it
* journal/compress: add stream compression/decompression functionsZbigniew Jędrzejewski-Szmek2014-06-26
|
* coredump: never write more than the configured processing size limit to diskLennart Poettering2014-06-23
|
* copy: don't eat up error from chown()/chmod()Lennart Poettering2014-06-20
| | | | | The idea was to not fail on, nor to ignore errors from chown()/chmod(), but to proceed and simply return the most recent error...
* tmpfiles: make sure "C" doesn't copy anything if the destination already existsLennart Poettering2014-06-19
| | | | | | | | | Previously it would recursively copy the entire tree in, and descend into subdirectories even if the destination already exists. Let's do what the documentation says and not do that. If files down the tree shall be copied too, they should get their own "C" lines.
* tmpfiles: do not fail when copying an empty directoryKay Sievers2014-06-19
|
* sysusers: add minimal tool to reconstruct /etc/passwd and /etc/group from ↵Lennart Poettering2014-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | static files systemd-sysusers is a tool to reconstruct /etc/passwd and /etc/group from static definition files that take a lot of inspiration from tmpfiles snippets. These snippets should carry information about system users only. To make sure it is not misused for normal users these snippets only allow configuring UID and gecos field for each user, but do not allow configuration of the home directory or shell, which is necessary for real login users. The purpose of this tool is to enable state-less systems that can populate /etc with the minimal files necessary, solely from static data in /usr. systemd-sysuser is additive only, and will never override existing users. This tool will create these files directly, and not via some user database abtsraction layer. This is appropriate as this tool is supposed to run really early at boot, and is only useful for creating system users, and system users cannot be stored in remote databases anyway. The tool is also useful to be invoked from RPM scriptlets, instead of useradd. This allows moving from imperative user descriptions in RPM to declarative descriptions. The UID/GID for a user/group to be created can either be chosen dynamic, or fixed, or be read from the owner of a file in the file system, in order to support reconstructing the correct IDs for files that shall be owned by them. This also adds a minimal user definition file, that should be sufficient for most basic systems. Distributions are expected to patch these files and augment the contents, for example with fixed UIDs for the users where that's necessary.
* tmpfiles: add new "C" line for copying files or directoriesLennart Poettering2014-06-10