aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/test/test.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/test/test.c b/bin/test/test.c
index 3218a42a47e1..a7785ac4ad6b 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) {