aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2006-01-10 12:35:43 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2006-01-10 12:35:43 +0000
commit24f819fd74290363c714ada4869cd2f154adc0ab (patch)
tree2703bef5779fba84ca7a2249aa535ea9f179d2ec /miscutils
parentbc059bc7fa4383813f0772a380b59a643af79636 (diff)
downloadbusybox-24f819fd74290363c714ada4869cd2f154adc0ab.tar.gz
can use TMPDIR if user's HOMEDIR do not found. Noticed by Bernhard
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/crontab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/crontab.c b/miscutils/crontab.c
index 89e13775f..df94c855a 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);