From d464f08166fc85ba34d53b8162249a8e25059c64 Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 21 Feb 2010 09:54:57 +0000 Subject: [PATCH] fix faulty logic in previous change. --- bin/sh/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/sh/main.c b/bin/sh/main.c index b323f7fb1a17..77ef4dda9475 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\ #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 @@ state1: } 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);