Calling them unconditionally can result in memory corruption.
else
die("slock: cannot retrieve password entry (make sure to suid or sgid slock)\n");
}
else
die("slock: cannot retrieve password entry (make sure to suid or sgid slock)\n");
}
rval = pw->pw_passwd;
#if HAVE_SHADOW_H
rval = pw->pw_passwd;
#if HAVE_SHADOW_H
sp = getspnam(getenv("USER"));
if(!sp)
die("slock: cannot retrieve shadow entry (make sure to suid or sgid slock)\n");
sp = getspnam(getenv("USER"));
if(!sp)
die("slock: cannot retrieve shadow entry (make sure to suid or sgid slock)\n");
rval = sp->sp_pwdp;
}
#endif
rval = sp->sp_pwdp;
}
#endif