#include "islocal.h"
#include "nls.h"
#include "pathnames.h"
+#include "pwdutils.h"
#include "setpwnam.h"
#include "strutils.h"
#include "xalloc.h"
int main(int argc, char **argv)
{
- char *oldshell;
+ char *oldshell, *pwbuf;
int nullshell = 0;
const uid_t uid = getuid();
struct sinfo info = { NULL };
parse_argv(argc, argv, &info);
if (!info.username) {
- pw = getpwuid(uid);
+ pw = xgetpwuid(uid, &pwbuf);
if (!pw)
errx(EXIT_FAILURE, _("you (user %d) don't exist."),
uid);
} else {
- pw = getpwnam(info.username);
+ pw = xgetpwnam(info.username, &pwbuf);
if (!pw)
errx(EXIT_FAILURE, _("user \"%s\" does not exist."),
info.username);