From 055c473f917703e7e73581a915e770f595dd76b4 Mon Sep 17 00:00:00 2001 From: Dean Jansa Date: Fri, 27 Jun 2008 16:28:54 +0000 Subject: Nate made a good point, we should not fail if we can't chdir. ssh warns, but lets you in. Don't bother checking the return of chdir(). --- qarshd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'qarshd.c') diff --git a/qarshd.c b/qarshd.c index 84be036..8cca3b5 100644 --- a/qarshd.c +++ b/qarshd.c @@ -71,11 +71,7 @@ setup_user(char *user, char *group) /* setuid is last so we can still do setgid and initgroups */ setuid(pw->pw_uid); - if (chdir(pw->pw_dir) < 0) { - syslog(LOG_WARNING, "Unable to chdir() to %s: %s\n", - pw->pw_dir, strerror(errno)); - return 0; - } + if (pw->pw_dir) chdir(pw->pw_dir); return 1; } -- cgit