cleanup patch for bug 977 so we don't display incorrect debug messages
authorGerald Carter <jerry@samba.org>
Sat, 31 Jan 2004 14:44:27 +0000 (14:44 +0000)
committerGerald Carter <jerry@samba.org>
Sat, 31 Jan 2004 14:44:27 +0000 (14:44 +0000)
source/smbd/password.c

index 36e3fb473828d57af6e351ceb55f7646e05f2e93..10c6aadb1fc49d66c34461d9b252134853646653 100644 (file)
@@ -250,17 +250,21 @@ int register_vuid(auth_serversupplied_info *server_info, DATA_BLOB session_key,
                return -1;
        }
 
-       /* Register a home dir service for this user */
-       if ((!vuser->guest) && vuser->unix_homedir && *(vuser->unix_homedir)) {
-               DEBUG(3, ("Adding/updating homes service for user '%s' using home directory: '%s'\n", 
-                         vuser->user.unix_name, vuser->unix_homedir));
+       /* Register a home dir service for this user iff
+          (a) This is not a guest connection,
+          (b) we have a home directory defined, and
+          (c) there s not an existing static share by that name */
+
+       if ( (!vuser->guest) 
+               && vuser->unix_homedir 
+               && *(vuser->unix_homedir) 
+               && (lp_servicenumber(vuser->user.unix_name) == -1) ) 
+       {
+                       DEBUG(3, ("Adding/updating homes service for user '%s' using home directory: '%s'\n", 
+                               vuser->user.unix_name, vuser->unix_homedir));
 
-               /* only add the home directory if there doesn't exist a static share by that name */
-               if ( lp_servicenumber(vuser->user.unix_name) == -1 ) {
                        vuser->homes_snum = add_home_service(vuser->user.unix_name, 
                                vuser->user.unix_name, vuser->unix_homedir);
-               }
-
        } else {
                vuser->homes_snum = -1;
        }