Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh fix faulty logic in previous change.



details:   https://anonhg.NetBSD.org/src/rev/f93ac88d84df
branches:  trunk
changeset: 752260:f93ac88d84df
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Feb 21 09:54:57 2010 +0000

description:
fix faulty logic in previous change.

diffstat:

 bin/sh/main.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 1fce58384685 -r f93ac88d84df bin/sh/main.c
--- a/bin/sh/main.c     Sun Feb 21 09:52:08 2010 +0000
+++ b/bin/sh/main.c     Sun Feb 21 09:54:57 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.55 2010/02/20 23:15:17 christos Exp $       */
+/*     $NetBSD: main.c,v 1.56 2010/02/21 09:54:57 christos Exp $       */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.7 (Berkeley) 7/19/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.55 2010/02/20 23:15:17 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.56 2010/02/21 09:54:57 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -187,7 +187,8 @@
        }
 state2:
        state = 3;
-       if (iflag && posix && getuid() == geteuid() && getgid() == getegid()) {
+       if ((iflag || !posix) &&
+           getuid() == geteuid() && getgid() == getegid()) {
                if ((shinit = lookupvar("ENV")) != NULL && *shinit != '\0') {
                        state = 3;
                        read_profile(shinit);



Home | Main Index | Thread Index | Old Index