diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-13 12:28:04 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-02-13 12:28:04 +0100 |
commit | 1d9b8e58340e0fdc77158f04c36f5e6736754259 (patch) | |
tree | 059c041a15c6f1eacc42b065882af3d2f80049de /src/basic/fs-util.c | |
parent | 0655ef96fd88e3443009486256ce7bab43a27e56 (diff) |
util: drop two unused calls from src/basic/
Diffstat (limited to 'src/basic/fs-util.c')
-rw-r--r-- | src/basic/fs-util.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c index 3ef1b90edd..51268828af 100644 --- a/src/basic/fs-util.c +++ b/src/basic/fs-util.c @@ -283,24 +283,6 @@ int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid) { return 0; } -int fchmod_and_fchown(int fd, mode_t mode, uid_t uid, gid_t gid) { - assert(fd >= 0); - - /* Under the assumption that we are running privileged we - * first change the access mode and only then hand out - * ownership to avoid a window where access is too open. */ - - if (mode != MODE_INVALID) - if (fchmod(fd, mode) < 0) - return -errno; - - if (uid != UID_INVALID || gid != GID_INVALID) - if (fchown(fd, uid, gid) < 0) - return -errno; - - return 0; -} - int fchmod_umask(int fd, mode_t m) { mode_t u; int r; |