Deleted Added
full compact
su.c (36391) su.c (39538)
1/*
2 * Copyright (c) 1988, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";
43#endif
44static const char rcsid[] =
1/*
2 * Copyright (c) 1988, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";
43#endif
44static const char rcsid[] =
45 "$Id: su.c,v 1.26 1998/05/25 03:34:52 steve Exp $";
45 "$Id: su.c,v 1.27 1998/05/26 06:39:08 danny Exp $";
46#endif /* not lint */
47
48#include <sys/param.h>
49#include <sys/time.h>
50#include <sys/resource.h>
51
52#include <err.h>
53#include <errno.h>

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

129#endif
130 char shellbuf[MAXPATHLEN];
131
132#ifdef WHEELSU
133 iswheelsu =
134#endif /* WHEELSU */
135 asme = asthem = fastlogin = 0;
136 user = "root";
46#endif /* not lint */
47
48#include <sys/param.h>
49#include <sys/time.h>
50#include <sys/resource.h>
51
52#include <err.h>
53#include <errno.h>

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

129#endif
130 char shellbuf[MAXPATHLEN];
131
132#ifdef WHEELSU
133 iswheelsu =
134#endif /* WHEELSU */
135 asme = asthem = fastlogin = 0;
136 user = "root";
137 while(optind < argc)
138 if((ch = getopt(argc, argv, ARGSTR)) != -1)
137 while((ch = getopt(argc, argv, ARGSTR)) != -1)
139 switch((char)ch) {
140#ifdef KERBEROS
141 case 'K':
142 use_kerberos = 0;
143 break;
144#endif
145 case 'f':
146 fastlogin = 1;

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

158 case 'c':
159 class = optarg;
160 break;
161#endif
162 case '?':
163 default:
164 usage();
165 }
138 switch((char)ch) {
139#ifdef KERBEROS
140 case 'K':
141 use_kerberos = 0;
142 break;
143#endif
144 case 'f':
145 fastlogin = 1;

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

157 case 'c':
158 class = optarg;
159 break;
160#endif
161 case '?':
162 default:
163 usage();
164 }
166 else
167 {
165
166 if (optind < argc)
168 user = argv[optind++];
167 user = argv[optind++];
169 break;
170 }
171
172 if (strlen(user) > MAXLOGNAME - 1) {
173 (void)fprintf(stderr, "su: username too long.\n");
174 exit(1);
175 }
176
177 if (user == NULL)
178 usage();

--- 442 unchanged lines hidden ---
168
169 if (strlen(user) > MAXLOGNAME - 1) {
170 (void)fprintf(stderr, "su: username too long.\n");
171 exit(1);
172 }
173
174 if (user == NULL)
175 usage();

--- 442 unchanged lines hidden ---