r13675: * patch from Bjoern JACKE <samba@j3e.de> to remove the
authorGerald Carter <jerry@samba.org>
Fri, 24 Feb 2006 16:00:53 +0000 (16:00 +0000)
committerGerald Carter <jerry@samba.org>
Fri, 24 Feb 2006 16:00:53 +0000 (16:00 +0000)
  artificial RO bit on directories in user profiles when
  profile acls = yes.

source/smbd/trans2.c

index 9c46fec7909203be740bcf8ff69a56f8a44998be..6da71039f05d53a4c9fb4bb4e34fdf96de93bd62 100644 (file)
@@ -1146,7 +1146,8 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
                                continue;
                        }
 
-                       file_size = get_file_size(sbuf);
+                       if (!(mode & aDIR))
+                               file_size = get_file_size(sbuf);
                        allocation_size = get_allocation_size(conn,NULL,&sbuf);
                        mdate = sbuf.st_mtime;
                        adate = sbuf.st_atime;
@@ -1158,13 +1159,6 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
                                adate &= ~1;
                        }
 
-                       if(mode & aDIR) {
-                               /* This is necessary, as otherwise the
-                                * desktop.ini file in this folder is
-                                * ignored */
-                               mode |= (lp_profile_acls(SNUM(conn)) ? aRONLY : 0);
-                               file_size = 0;
-                       }
 
                        DEBUG(5,("get_lanman2_dir_entry found %s fname=%s\n",pathreal,fname));
          
@@ -2915,13 +2909,8 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
                mode = FILE_ATTRIBUTE_NORMAL;
 
        fullpathname = fname;
-       file_size = get_file_size(sbuf);
-       if (mode & aDIR) {
-               /* This is necessary, as otherwise the desktop.ini file in
-                * this folder is ignored */
-               mode |= (lp_profile_acls(SNUM(conn)) ? aRONLY : 0);
-               file_size = 0;
-       }
+       if (!(mode & aDIR))
+               file_size = get_file_size(sbuf);
 
        /* Pull any EA list from the data portion. */
        if (info_level == SMB_INFO_QUERY_EAS_FROM_LIST) {