available.
* libmisc/limits.c, libmisc/entry.c, libmisc/chowntty.c,
libmisc/addgrps.c, libmisc/myname.c, libmisc/rlogin.c,
- libmisc/pwdcheck.c, src/newgrp.c, src/login_nopam.c,
+ libmisc/pwdcheck.c, src/newgrp.c, src/login_nopam.c, src/login.c,
src/userdel.c, src/lastlog.c, src/grpck.c, src/gpasswd.c,
src/newusers.c, src/chpasswd.c, src/chfn.c, src/groupmems.c,
src/usermod.c, src/expiry.c, src/groupdel.c, src/chgpasswd.c,
Note: the getpwent/getgrent calls should probably be checked also.
* src/groupdel.c, src/expiry.c: Fix typos in comments.
* src/groupmod.c: Re-indent.
- * libmisc/Makefile.am, lib/groupmem.c, lib/groupio.c, lib/pwmem.c,
+ * lib/Makefile.am, lib/groupmem.c, lib/groupio.c, lib/pwmem.c,
lib/pwio.c, lib/shadowmem.c, lib/shadowio.c: Move the __<xx>_dup
functions (used by the xget... functions) from the <xx>io.c files
to the new <xx>mem.c files. This avoid linking some utils against
(const void **) &pam_user);
if (pam_user && pam_user[0]) {
- pwd = getpwnam(pam_user);
+ pwd = xgetpwnam(pam_user);
if (pwd) {
pwent = *pwd;
failent_user = pwent.pw_name;
char buf[64];
audit_fd = audit_open ();
+ /* local, no need for xgetpwnam */
pw = getpwnam (username);
if (pw) {
snprintf (buf, sizeof (buf),
retcode =
pam_get_item (pamh, PAM_USER, (const void **) &pam_user);
setpwent ();
- pwd = getpwnam (pam_user);
+ pwd = xgetpwnam (pam_user);
if (!pwd) {
- SYSLOG ((LOG_ERR, "getpwnam(%s) failed",
+ SYSLOG ((LOG_ERR, "xgetpwnam(%s) failed",
getdef_bool ("LOG_UNKFAIL_ENAB") ?
pam_user : "UNKNOWN"));
exit (1);
#endif /* ! USE_PAM */
#ifdef USE_PAM
- if (!(pwd = getpwnam (pam_user))) {
+ if (!(pwd = xgetpwnam (pam_user))) {
pwent.pw_name = pam_user;
#else
- if (!(pwd = getpwnam (username))) {
+ if (!(pwd = xgetpwnam (username))) {
pwent.pw_name = username;
#endif
strcpy (temp_pw, "!");
#ifndef USE_PAM
spwd = NULL;
if (pwd && strcmp (pwd->pw_passwd, SHADOW_PASSWD_STRING) == 0) {
+ /* !USE_PAM, no need for xgetspnam */
spwd = getspnam (username);
if (spwd)
pwent.pw_passwd = spwd->sp_pwdp;
*/
if (spwd) { /* check for age of password */
if (expire (&pwent, spwd)) {
+ /* !USE_PAM, no need for xgetpwnam */
pwd = getpwnam (username);
+ /* !USE_PAM, no need for xgetspnam */
spwd = getspnam (username);
if (pwd)
pwent = *pwd;