From 04f635f8fc186865b2e099b61c0df27e7f48b37d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 24 Feb 2006 16:00:53 +0000 Subject: r13675: * patch from Bjoern JACKE to remove the artificial RO bit on directories in user profiles when profile acls = yes. (This used to be commit b698e83a82f96db4a4a6ffa4b61af50c943deff0) --- source3/smbd/trans2.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 9c46fec790..6da71039f0 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -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) { -- cgit