diff options
author | ache <ache@FreeBSD.org> | 1994-11-05 20:24:49 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-11-05 20:24:49 +0000 |
commit | b3950642a84692264886729af9232937fac80548 (patch) | |
tree | d60f854f1ecd354fa65a99ca0f319e6874e7076a /bin/test/test.c | |
parent | 1745c06559d8564dfa0b18bc024934cd37855d73 (diff) | |
download | FreeBSD-src-b3950642a84692264886729af9232937fac80548.zip FreeBSD-src-b3950642a84692264886729af9232937fac80548.tar.gz |
Fix root -w case according to manpage (-x & -r cases already accords)
Pointed by Bruce.
Diffstat (limited to 'bin/test/test.c')
-rw-r--r-- | bin/test/test.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/test/test.c b/bin/test/test.c index 3218a42..a7785ac 100644 --- a/bin/test/test.c +++ b/bin/test/test.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: test.c,v 1.6 1994/11/05 17:28:03 ache Exp $ + * $Id: test.c,v 1.7 1994/11/05 17:31:23 ache Exp $ */ #ifndef lint @@ -347,9 +347,12 @@ exist: i = S_IROTH; goto permission; case ISWRITE: - if (geteuid() == 0) - goto exist; - i = S_IWOTH; + if (geteuid() != 0) + i = S_IWOTH; + else { + i = S_IWOTH|S_IWGRP|S_IWUSR; + goto filebit; + } goto permission; case ISEXEC: if (geteuid() != 0) { |