pw_scan.c (c798532ffa445cc95e4099e94081f7220c6cf0c9) | pw_scan.c (34e9190d82ac021bae00937cc1a663920aa19309) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 1990, 1993, 1994 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 51 unchanged lines hidden (view full) --- 60 * It is believed all baseline system software that can not handle the 61 * normal ID sizes is now gone so pw_big_ids_warning is disabled for now. 62 * But the code has been left in place in case end-users want to re-enable 63 * it and/or for the next time the ID sizes get bigger but pieces of the 64 * system lag behind. 65 */ 66static int pw_big_ids_warning = 0; 67 | 1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 1990, 1993, 1994 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 51 unchanged lines hidden (view full) --- 60 * It is believed all baseline system software that can not handle the 61 * normal ID sizes is now gone so pw_big_ids_warning is disabled for now. 62 * But the code has been left in place in case end-users want to re-enable 63 * it and/or for the next time the ID sizes get bigger but pieces of the 64 * system lag behind. 65 */ 66static int pw_big_ids_warning = 0; 67 |
68void 69__pw_initpwd(struct passwd *pwd) 70{ 71 static char nul[] = ""; 72 73 memset(pwd, 0, sizeof(*pwd)); 74 pwd->pw_uid = (uid_t)-1; /* Considered least likely to lead to */ 75 pwd->pw_gid = (gid_t)-1; /* a security issue. */ 76 pwd->pw_name = nul; 77 pwd->pw_passwd = nul; 78 pwd->pw_class = nul; 79 pwd->pw_gecos = nul; 80 pwd->pw_dir = nul; 81 pwd->pw_shell = nul; 82} 83 |
|
68int 69__pw_scan(char *bp, struct passwd *pw, int flags) 70{ 71 uid_t id; 72 int root; 73 char *ep, *p, *sh; 74 unsigned long temp; 75 --- 135 unchanged lines hidden --- | 84int 85__pw_scan(char *bp, struct passwd *pw, int flags) 86{ 87 uid_t id; 88 int root; 89 char *ep, *p, *sh; 90 unsigned long temp; 91 --- 135 unchanged lines hidden --- |