aboutsummaryrefslogtreecommitdiff
path: root/libbb/setup_environment.c
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-09-06 18:36:50 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-09-06 18:36:50 +0000
commit601d93b47b8ac41f1fd763db15f05b6419c0b398 (patch)
tree768c23fe79bb81583de7376a4d744632d888d303 /libbb/setup_environment.c
parent05fa38a6084b2f829750451d934f18c4dad62776 (diff)
downloadbusybox-w32-601d93b47b8ac41f1fd763db15f05b6419c0b398.tar.gz
busybox-w32-601d93b47b8ac41f1fd763db15f05b6419c0b398.tar.bz2
busybox-w32-601d93b47b8ac41f1fd763db15f05b6419c0b398.zip
Implement optional syslog logging using ordinary
bb_xx_msg calls, and convert networking/* to it. The rest of bbox will be converted gradually. git-svn-id: svn://busybox.net/trunk/busybox@16058 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb/setup_environment.c')
-rw-r--r--libbb/setup_environment.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libbb/setup_environment.c b/libbb/setup_environment.c
index dfab786d9..a14649625 100644
--- a/libbb/setup_environment.c
+++ b/libbb/setup_environment.c
@@ -60,10 +60,7 @@ void setup_environment ( const char *shell, int loginshell, int changeenv, const
60 * Some systems default to HOME=/ 60 * Some systems default to HOME=/
61 */ 61 */
62 if ( chdir ( pw-> pw_dir )) { 62 if ( chdir ( pw-> pw_dir )) {
63 if ( chdir ( "/" )) { 63 xchdir ( "/" );
64 syslog ( LOG_WARNING, "unable to cd to %s' for user %s'\n", pw-> pw_dir, pw-> pw_name );
65 bb_error_msg_and_die ( "cannot cd to home directory or /" );
66 }
67 fputs ( "warning: cannot change to home directory\n", stderr ); 64 fputs ( "warning: cannot change to home directory\n", stderr );
68 } 65 }
69 66