[prev in list] [next in list] [prev in thread] [next in thread] 

List:       proftpd-committers
Subject:    [ProFTPD-committers] CVS: proftpd/modules mod_auth.c,1.266,1.267
From:       "TJ Saunders" <castaglia () users ! sourceforge ! net>
Date:       2009-09-28 21:22:24
Message-ID: E1MsNfs-0006yw-Sd () ddv4jf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Update of /cvsroot/proftp/proftpd/modules
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26792/modules

Modified Files:
	mod_auth.c 
Log Message:

If we have trouble resolving the chroot path, make sure we log the reason why.


Index: mod_auth.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/modules/mod_auth.c,v
retrieving revision 1.266
retrieving revision 1.267
diff -u -r1.266 -r1.267
--- mod_auth.c	8 Sep 2009 20:35:30 -0000	1.266
+++ mod_auth.c	28 Sep 2009 21:22:22 -0000	1.267
@@ -946,10 +946,20 @@
 
     if ((add_userdir && *add_userdir == TRUE) &&
         strcmp(u, user) != 0) {
-      session.chroot_path = dir_realpath(p, pdircat(p, c->name, u, NULL));
+      char *userdir_path = pdircat(p, c->name, u, NULL);
+
+      session.chroot_path = dir_realpath(p, userdir_path);
+      if (session.chroot_path == NULL) {
+        pr_log_debug(DEBUG8, "error resolving '%s': %s", userdir_path,
+          strerror(errno));
+      }
 
     } else {
       session.chroot_path = dir_realpath(p, c->name);
+      if (session.chroot_path == NULL) {
+        pr_log_debug(DEBUG8, "error resolving '%s': %s", c->name,
+          strerror(errno));
+      }
     }
 
     if (session.chroot_path &&


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
ProFTPD Committers Mailing List
proftpd-committers@proftpd.org
https://lists.sourceforge.net/lists/listinfo/proftp-committers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic