summaryrefslogtreecommitdiffstats
path: root/bin/test/test.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-11-05 17:07:14 +0000
committerache <ache@FreeBSD.org>1994-11-05 17:07:14 +0000
commitbc1cc6dddad4bcec665d32fe6b2876b87c647fc5 (patch)
treeb1a7175f869f802dcf0b6c16ff7e86cbb5c3e4f9 /bin/test/test.c
parent019c55bcf0e551b3ee0b364701d4f6446fb2531e (diff)
downloadFreeBSD-src-bc1cc6dddad4bcec665d32fe6b2876b87c647fc5.zip
FreeBSD-src-bc1cc6dddad4bcec665d32fe6b2876b87c647fc5.tar.gz
test produce wrong results for superuser, i.e. tells
that file is unreadable when it is readable infact.
Diffstat (limited to 'bin/test/test.c')
-rw-r--r--bin/test/test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/test/test.c b/bin/test/test.c
index c13d0c6..e925c1b 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$
+ * $Id: test.c,v 1.4 1994/09/24 02:59:15 davidg Exp $
*/
#ifndef lint
@@ -348,7 +348,7 @@ expr_operator(op, sp, fs)
goto permission;
case ISEXEC:
i = S_IXOTH;
-permission: if (fs->stat.st_uid == geteuid())
+permission: if (geteuid() == 0 || fs->stat.st_uid == geteuid())
i <<= 6;
else if (fs->stat.st_gid == getegid())
i <<= 3;
OpenPOWER on IntegriCloud