summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-08-30 05:38:38 +0000
committerderaadt <deraadt@openbsd.org>2015-08-30 05:38:38 +0000
commit2697479bfbbf213acb3ba53d4ba350a0eee5d29f (patch)
tree70b91a57a1e70952bf3091425c086162de812a9c
parentsize for free(); ok krw (diff)
downloadwireguard-openbsd-2697479bfbbf213acb3ba53d4ba350a0eee5d29f.tar.xz
wireguard-openbsd-2697479bfbbf213acb3ba53d4ba350a0eee5d29f.zip
For *chmod, allow S_ISTXT in tame mode. I am evaluating what to
do about S_ISUID and SISGID... maybe we should mask them and allow the operation to happen?
-rw-r--r--sys/kern/vfs_syscalls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 45d8a1085e1..d4f80c69b0e 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.223 2015/08/22 20:18:50 deraadt Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.224 2015/08/30 05:38:38 deraadt Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -1987,7 +1987,7 @@ dofchmodat(struct proc *p, int fd, const char *path, mode_t mode, int flag)
if (mode & ~(S_IFMT | ALLPERMS))
return (EINVAL);
if ((p->p_p->ps_flags & PS_TAMED) &&
- (mode & (S_ISUID|S_ISGID|S_ISTXT)))
+ (mode & (S_ISUID|S_ISGID)))
return (tame_fail(p, EPERM, TAME_FATTR));
if (flag & ~AT_SYMLINK_NOFOLLOW)
return (EINVAL);