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.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; |
165 if (privileged == 0) 166 read_profile(".profile"); 167 else 168 read_profile("/etc/suid_profile"); |
169 } 170state2: 171 state = 3; |
172 if (privileged == 0) { |
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 --- |