diff options
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/crond.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c index b744273..1965af6 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c @@ -675,8 +675,7 @@ static void change_user(struct passwd *pas) { /* careful: we're after vfork! */ change_identity(pas); /* - initgroups, setgid, setuid */ - if (chdir(pas->pw_dir) < 0) { - bb_error_msg("can't change directory to '%s'", pas->pw_dir); + if (chdir_or_warn(pas->pw_dir) != 0) { xchdir(CRON_DIR); } } |