diff options
author | Xavier Hernandez <xhernandez@datalab.es> | 2017-01-10 17:21:56 +0100 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2017-02-18 12:22:29 -0500 |
commit | 621fedf8aeb3e972db33b3eefa6cbdbef104d6a6 (patch) | |
tree | af15bcd0f4c927c1bcc271bc441c90fea7a39f54 /libglusterfs/src/syscall.h | |
parent | 3cda64115596f0501bb58209f819655bced22c18 (diff) |
posix: Fix creation of files with S_ISVTX on FreeBSD
On FreeBSD the S_ISVTX flag is completely ignored when creating a
regular file. Since gluster needs to create files with this flag set,
specialy for DHT link files, it's necessary to force the flag.
This fix does this by calling fchmod() after creating a file that
must have this flag set.
Change-Id: I51eecfe4642974df6106b9084a0b144835a4997a
BUG: 1411228
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: https://review.gluster.org/16417
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'libglusterfs/src/syscall.h')
-rw-r--r-- | libglusterfs/src/syscall.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libglusterfs/src/syscall.h b/libglusterfs/src/syscall.h index 1a2658b94f1..b1bcad138c5 100644 --- a/libglusterfs/src/syscall.h +++ b/libglusterfs/src/syscall.h @@ -63,8 +63,12 @@ sys_fstat (int fd, struct stat *buf); int sys_fstatat (int dirfd, const char *pathname, struct stat *buf, int flags); + +int +sys_open (const char *pathname, int flags, int mode); + int -sys_openat (int dirfd, const char *pathname, int flags, ...); +sys_openat (int dirfd, const char *pathname, int flags, int mode); DIR *sys_opendir (const char *name); |