Deleted Added
full compact
main.c (18267) main.c (19240)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * $Id: main.c,v 1.7 1996/09/12 02:23:33 bde Exp $
36 * $Id: main.c,v 1.8 1996/09/12 12:41:46 adam Exp $
37 */
38
39#ifndef lint
40static char copyright[] =
41"@(#) Copyright (c) 1991, 1993\n\
42 The Regents of the University of California. All rights reserved.\n";
43#endif /* not lint */
44

--- 112 unchanged lines hidden (view full) ---

157 init();
158 setstackmark(&smark);
159 procargs(argc, argv);
160 if (argv[0] && argv[0][0] == '-') {
161 state = 1;
162 read_profile("/etc/profile");
163state1:
164 state = 2;
37 */
38
39#ifndef lint
40static char copyright[] =
41"@(#) Copyright (c) 1991, 1993\n\
42 The Regents of the University of California. All rights reserved.\n";
43#endif /* not lint */
44

--- 112 unchanged lines hidden (view full) ---

157 init();
158 setstackmark(&smark);
159 procargs(argc, argv);
160 if (argv[0] && argv[0][0] == '-') {
161 state = 1;
162 read_profile("/etc/profile");
163state1:
164 state = 2;
165 read_profile(".profile");
165 if (privileged == 0)
166 read_profile(".profile");
167 else
168 read_profile("/etc/suid_profile");
166 }
167state2:
168 state = 3;
169 }
170state2:
171 state = 3;
169 if (getuid() == geteuid() && getgid() == getegid()) {
172 if (privileged == 0) {
170 if ((shinit = lookupvar("ENV")) != NULL && *shinit != '\0') {
171 state = 3;
172 read_profile(shinit);
173 }
174 }
175state3:
176 state = 4;
177 if (minusc) {

--- 185 unchanged lines hidden ---
173 if ((shinit = lookupvar("ENV")) != NULL && *shinit != '\0') {
174 state = 3;
175 read_profile(shinit);
176 }
177 }
178state3:
179 state = 4;
180 if (minusc) {

--- 185 unchanged lines hidden ---