about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2005-06-17 20:35:45 +0000
committerFlorian Westphal <fw@strlen.de>2005-06-17 20:35:45 +0000
commit04169f34cf23d382c8a420107309daea2b52d999 (patch)
treea80afd1ad364e1b2701228178960aabb3cd75314 /src
parentaec535c8b68cd0c1f8c892aad11ca6f80f354215 (diff)
downloadngircd-04169f34cf23d382c8a420107309daea2b52d999.tar.gz
ngircd-04169f34cf23d382c8a420107309daea2b52d999.zip
only chdir() to users home when running as daemon
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/ngircd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
index 41c823bc..67476776 100644
--- a/src/ngircd/ngircd.c
+++ b/src/ngircd/ngircd.c
@@ -12,7 +12,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: ngircd.c,v 1.97 2005/06/17 18:22:45 fw Exp $";
+static char UNUSED id[] = "$Id: ngircd.c,v 1.98 2005/06/17 20:35:45 fw Exp $";
 
 /**
  * @file
@@ -787,9 +787,9 @@ NGIRCd_Init( bool NGIRCd_NoDaemon )
 	}
 
 	/* Change working directory to home directory of the user
-	 * we are running as (when not running chroot()'ed!) */
+	 * we are running as (only when running in daemon mode and not in chroot) */
 	
-	if ( pwd ) {
+	if ( pwd && !NGIRCd_NoDaemon ) {
 		if( chdir( pwd->pw_dir ) == 0 ) 
 			Log( LOG_DEBUG, "Changed working directory to \"%s\" ...", pwd->pw_dir );
 		else