diff options
| author | Ruslan Ermilov <ru@FreeBSD.org> | 1999-09-22 13:02:50 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@FreeBSD.org> | 1999-09-22 13:02:50 +0000 |
| commit | bd8beb9b80ebb0480e0ad92bb6ce49c490942c18 (patch) | |
| tree | afc09b153673acb869b0a795e318867cec361b74 | |
| parent | fbf6ea790a3eb1e72e6f7e987a14f78793cba297 (diff) | |
Notes
| -rw-r--r-- | lib/libc/gen/setmode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/gen/setmode.c b/lib/libc/gen/setmode.c index c69d77568cddf..0bbf22df7d050 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; } |
