summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>1999-09-28 07:27:12 +0000
committerRuslan Ermilov <ru@FreeBSD.org>1999-09-28 07:27:12 +0000
commit571d9a8ce2aaf71ebac9919b24cdbed29fceeb31 (patch)
treeee6385b552a6b5656ec894f71145cf2c1988c987 /lib/libc
parent674ba0143c35da61711d5ae6a0fbd53a949daa40 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/setmode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/gen/setmode.c b/lib/libc/gen/setmode.c
index c69d77568cdd..0bbf22df7d05 100644
--- a/lib/libc/gen/setmode.c
+++ b/lib/libc/gen/setmode.c
@@ -35,7 +35,11 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
static char sccsid[] = "@(#)setmode.c 8.2 (Berkeley) 3/25/94";
+#endif
+static const char rcsid[] =
+ "$FreeBSD$";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -255,12 +259,12 @@ getop: if ((op = *p++) != '+' && op != '-' && op != '=') {
break;
case 's':
/* If only "other" bits ignore set-id. */
- if (who & ~S_IRWXO)
+ if (!who || who & ~S_IRWXO)
perm |= S_ISUID|S_ISGID;
break;
case 't':
/* If only "other" bits ignore sticky. */
- if (who & ~S_IRWXO) {
+ if (!who || who & ~S_IRWXO) {
who |= S_ISTXT;
perm |= S_ISTXT;
}