Deleted Added
full compact
pw.c (285396) pw.c (285398)
1/*-
2 * Copyright (C) 1996
3 * David L. Nugent. 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

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

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#ifndef lint
28static const char rcsid[] =
1/*-
2 * Copyright (C) 1996
3 * David L. Nugent. 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

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

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#ifndef lint
28static const char rcsid[] =
29 "$FreeBSD: head/usr.sbin/pw/pw.c 285396 2015-07-11 17:01:08Z bapt $";
29 "$FreeBSD: head/usr.sbin/pw/pw.c 285398 2015-07-11 18:09:27Z bapt $";
30#endif /* not lint */
31
32#include <err.h>
33#include <fcntl.h>
34#include <locale.h>
35#include <paths.h>
36#include <stdbool.h>
37#include <sys/wait.h>

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

229 break;
230 case '7':
231 conf.v7 = true;
232 break;
233 case 'C':
234 conf.config = optarg;
235 config = conf.config;
236 break;
30#endif /* not lint */
31
32#include <err.h>
33#include <fcntl.h>
34#include <locale.h>
35#include <paths.h>
36#include <stdbool.h>
37#include <sys/wait.h>

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

229 break;
230 case '7':
231 conf.v7 = true;
232 break;
233 case 'C':
234 conf.config = optarg;
235 config = conf.config;
236 break;
237 case 'F':
238 conf.force = true;
239 break;
237 case 'N':
238 conf.dryrun = true;
239 break;
240 case 'l':
241 if (strlen(optarg) >= MAXLOGNAME)
242 errx(EX_USAGE, "new name too long: %s", optarg);
243 conf.newname = optarg;
244 break;
245 case 'P':
246 conf.pretty = true;
247 break;
248 case 'Y':
249 nis = true;
250 break;
240 case 'N':
241 conf.dryrun = true;
242 break;
243 case 'l':
244 if (strlen(optarg) >= MAXLOGNAME)
245 errx(EX_USAGE, "new name too long: %s", optarg);
246 conf.newname = optarg;
247 break;
248 case 'P':
249 conf.pretty = true;
250 break;
251 case 'Y':
252 nis = true;
253 break;
254 case 'a':
255 conf.all = true;
256 break;
251 case 'g':
252 if (which == 0) { /* for user* */
253 addarg(&arglist, 'g', optarg);
254 break;
255 }
256 if (strspn(optarg, "0123456789") != strlen(optarg))
257 errx(EX_USAGE, "-g expects a number");
258 id = strtonum(optarg, 0, LONG_MAX, &errstr);

--- 333 unchanged lines hidden ---
257 case 'g':
258 if (which == 0) { /* for user* */
259 addarg(&arglist, 'g', optarg);
260 break;
261 }
262 if (strspn(optarg, "0123456789") != strlen(optarg))
263 errx(EX_USAGE, "-g expects a number");
264 id = strtonum(optarg, 0, LONG_MAX, &errstr);

--- 333 unchanged lines hidden ---