summaryrefslogtreecommitdiff
path: root/src/basic/fs-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-02-13 10:36:02 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-02-13 10:36:02 -0500
commit06e948901a6f70b4d10c90d05a174da0663d1aba (patch)
tree2c1a82e1252bc1ed09419d43c8cc46263cf186ad /src/basic/fs-util.c
parent91ba5ac7d0196074863ff08f5251689d324a6550 (diff)
parentdd422d1e5b6a62bc634ae22d0627f70d4900814b (diff)
Merge pull request #2603 from poettering/drop-compat-libs
Some spring cleaning
Diffstat (limited to 'src/basic/fs-util.c')
-rw-r--r--src/basic/fs-util.c18
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;