From: "Vladimir N. Oleynik" Date: Tue, 10 Jan 2006 12:35:43 +0000 (-0000) Subject: can use TMPDIR if user's HOMEDIR do not found. Noticed by Bernhard X-Git-Tag: 1_1_0~359 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24f819fd74290363c714ada4869cd2f154adc0ab;p=platform%2Fupstream%2Fbusybox.git can use TMPDIR if user's HOMEDIR do not found. Noticed by Bernhard --- diff --git a/miscutils/crontab.c b/miscutils/crontab.c index 89e1377..df94c85 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c @@ -342,7 +342,7 @@ ChangeUser(const char *user, short dochdir) * Obtain password entry and change privileges */ - if ((pas = getpwnam(user)) == 0) { + if ((pas = getpwnam(user)) == NULL) { bb_perror_msg_and_die("failed to get uid for %s", user); return(-1); } @@ -357,7 +357,7 @@ ChangeUser(const char *user, short dochdir) if (dochdir) { if (chdir(pas->pw_dir) < 0) { - bb_perror_msg_and_die("chdir failed: %s %s", user, pas->pw_dir); + bb_perror_msg("chdir failed: %s %s", user, pas->pw_dir); if (chdir(TMPDIR) < 0) { bb_perror_msg_and_die("chdir failed: %s %s", user, TMPDIR); return(-1);