summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-07-14 19:45:34 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-07-14 19:45:34 +0000
commit0776dea81fbf353669714a5e3ff6d62ff6303ed6 (patch)
treef12e3bde9ba20f5b0d358ec255e8913d5b36cf88
parentf7f1be32757c386ea08f6dbf65a74457b2d4c6a9 (diff)
downloadsamba-0776dea81fbf353669714a5e3ff6d62ff6303ed6.tar.gz
samba-0776dea81fbf353669714a5e3ff6d62ff6303ed6.tar.xz
samba-0776dea81fbf353669714a5e3ff6d62ff6303ed6.zip
local.h: Removed ununsed SHARE_MODES_XXX defines. Upped SMBD_RELOAD_CHECK
from 10 to 60. server.c: Removed unused code (was If 0'ed out). trans2.c: Backed out Luke's ctime->mtime change. I don't think it is correct. Left the other fixes, though. util.c: Changed veto/hide files separator back to '/'. Jeremy (jallison@whistle.com) (This used to be commit b47121624c8824d3e1d8992cb950ebad52ba5c58)
-rw-r--r--source3/include/local.h4
-rw-r--r--source3/lib/util.c10
-rw-r--r--source3/smbd/server.c20
-rw-r--r--source3/smbd/trans2.c34
4 files changed, 23 insertions, 45 deletions
diff --git a/source3/include/local.h b/source3/include/local.h
index 01eac556525..fc589d7ac0d 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -114,9 +114,7 @@
/* the following control timings of various actions. Don't change
them unless you know what you are doing. These are all in seconds */
#define DEFAULT_SMBD_TIMEOUT (60*60*24*7)
-#define SMBD_RELOAD_CHECK (10)
-#define SHARE_MODES_CHECK (10)
-#define SHARE_MODES_CLEAN (300)
+#define SMBD_RELOAD_CHECK (60)
#define IDLE_CLOSED_TIMEOUT (60)
#define DPTR_IDLE_TIMEOUT (120)
#define SMBD_SELECT_LOOP (10)
diff --git a/source3/lib/util.c b/source3/lib/util.c
index b7ad0bb5bce..9d6229dbf96 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -3507,14 +3507,14 @@ static BOOL is_in_path(char *name, char *namelist)
while (*nameptr)
{
- if ( *nameptr == '\\' )
+ if ( *nameptr == '/' )
{
- /* cope with multiple (useless) \s) */
+ /* cope with multiple (useless) /s) */
nameptr++;
continue;
}
- /* find the next \ */
- if ((name_end = strchr(nameptr,'\\')) != NULL)
+ /* find the next / */
+ if ((name_end = strchr(nameptr,'/')) != NULL)
{
*name_end = 0;
}
@@ -3526,7 +3526,7 @@ static BOOL is_in_path(char *name, char *namelist)
return True;
}
- /* oops - the last check for a \ didn't find one. */
+ /* oops - the last check for a / didn't find one. */
if (name_end == NULL)
{
DEBUG(5,("is_in_path: last name. failed\n"));
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 83bb09b11fa..41f23ed02f1 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -3887,8 +3887,6 @@ static void process(void)
int counter;
int last_keepalive=0;
int service_load_counter = 0;
- int share_check_counter = 0;
- int share_clean_counter = 0;
if (deadtime <= 0)
deadtime = DEFAULT_SMBD_TIMEOUT;
@@ -3910,8 +3908,6 @@ static void process(void)
if (counter > 365 * 3600) /* big number of seconds. */
{
counter = 0;
- share_check_counter = 0;
- share_clean_counter = 0;
service_load_counter = 0;
}
@@ -3943,22 +3939,6 @@ static void process(void)
reload_services(True);
}
-#if 0 /* JRA */
- /* check the share modes every 10 secs */
- if (counter >= share_check_counter + SHARE_MODES_CHECK)
- {
- share_check_counter = counter;
- check_share_modes();
- }
-
- /* clean the share modes every 5 minutes */
- if (counter >= share_clean_counter + SHARE_MODES_CLEAN)
- {
- share_clean_counter = counter;
- clean_share_modes();
- }
-#endif /* JRA */
-
/* automatic timeout if all connections are closed */
if (num_connections_open==0 && counter >= IDLE_CLOSED_TIMEOUT) {
DEBUG(2,("%s Closing idle connection\n",timestring()));
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index d0d3352ec4c..1b199f01ba9 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -343,7 +343,7 @@ static int get_lanman2_dir_entry(int cnum,char *path_mask,int dirtype,int info_l
size = sbuf.st_size;
mdate = sbuf.st_mtime;
adate = sbuf.st_atime;
- cdate = sbuf.st_mtime;
+ cdate = sbuf.st_ctime;
if(mode & aDIR)
size = 0;
@@ -915,10 +915,10 @@ static int call_trans2qfsinfo(char *inbuf, char *outbuf, int length, int bufsize
/* Return volume name */
int volname_len = MIN(strlen(vname),11);
data_len = l2_vol_szVolLabel + volname_len + 1;
- put_dos_date2(pdata,l2_vol_fdateCreation,st.st_mtime);
+ put_dos_date2(pdata,l2_vol_fdateCreation,st.st_ctime);
SCVAL(pdata,l2_vol_cch,volname_len);
StrnCpy(pdata+l2_vol_szVolLabel,vname,volname_len);
- DEBUG(5,("call_trans2qfsinfo : time = %x, namelen = %d, name = %s\n",st.st_mtime, volname_len,
+ DEBUG(5,("call_trans2qfsinfo : time = %x, namelen = %d, name = %s\n",st.st_ctime, volname_len,
pdata+l2_vol_szVolLabel));
break;
}
@@ -1073,7 +1073,7 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length,
case SMB_INFO_STANDARD:
case SMB_INFO_QUERY_EA_SIZE:
data_size = (info_level==1?22:26);
- put_dos_date2(pdata,l1_fdateCreation,sbuf.st_mtime); /* create = mod */
+ put_dos_date2(pdata,l1_fdateCreation,sbuf.st_ctime); /* create = inode mod */
put_dos_date2(pdata,l1_fdateLastAccess,sbuf.st_atime); /* access time */
put_dos_date2(pdata,l1_fdateLastWrite,sbuf.st_mtime); /* write time */
SIVAL(pdata,l1_cbFile,size);
@@ -1084,7 +1084,7 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length,
case SMB_INFO_QUERY_EAS_FROM_LIST:
data_size = 24;
- put_dos_date2(pdata,0,sbuf.st_mtime); /* create time = mod time */
+ put_dos_date2(pdata,0,sbuf.st_ctime); /* create time = inode mod time */
put_dos_date2(pdata,4,sbuf.st_atime);
put_dos_date2(pdata,8,sbuf.st_mtime);
SIVAL(pdata,12,size);
@@ -1101,18 +1101,18 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length,
return(ERROR(ERRDOS,ERRbadfunc)); /* os/2 needs this */
case SMB_QUERY_FILE_BASIC_INFO:
- data_size = 40; /* w95 returns 40 bytes not 36. */
- put_long_date(pdata,sbuf.st_mtime); /* create time = mod time */
+ data_size = 36; /* w95 returns 40 bytes not 36 - why ?. */
+ put_long_date(pdata,sbuf.st_ctime); /* create time = inode mod time */
put_long_date(pdata+8,sbuf.st_atime); /* access time */
put_long_date(pdata+16,sbuf.st_mtime); /* write time */
- put_long_date(pdata+24,sbuf.st_ctime); /* change time */
+ put_long_date(pdata+24,sbuf.st_mtime); /* change time */
SIVAL(pdata,32,mode);
DEBUG(5,("SMB_QFBI - "));
- DEBUG(5,("create: %s ", ctime(&sbuf.st_mtime)));
+ DEBUG(5,("create: %s ", ctime(&sbuf.st_ctime)));
DEBUG(5,("access: %s ", ctime(&sbuf.st_atime)));
DEBUG(5,("write: %s ", ctime(&sbuf.st_mtime)));
- DEBUG(5,("change: %s ", ctime(&sbuf.st_ctime)));
+ DEBUG(5,("change: %s ", ctime(&sbuf.st_mtime)));
DEBUG(5,("mode: %x\n", mode));
break;
@@ -1143,10 +1143,10 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length,
break;
case SMB_QUERY_FILE_ALL_INFO:
- put_long_date(pdata,sbuf.st_mtime); /* create time = mod time */
+ put_long_date(pdata,sbuf.st_ctime); /* create time = inode mod time */
put_long_date(pdata+8,sbuf.st_atime); /* access time */
put_long_date(pdata+16,sbuf.st_mtime); /* write time */
- put_long_date(pdata+24,sbuf.st_ctime); /* change time */
+ put_long_date(pdata+24,sbuf.st_mtime); /* change time */
SIVAL(pdata,32,mode);
pdata += 40;
SIVAL(pdata,0,size);
@@ -1300,7 +1300,7 @@ static int call_trans2setfilepathinfo(char *inbuf, char *outbuf, int length,
case SMB_SET_FILE_BASIC_INFO:
{
- /* create time */
+ /* Ignore create time at offset pdata. */
/* access time */
tvs.actime = interpret_long_date(pdata+8);
@@ -1330,10 +1330,10 @@ static int call_trans2setfilepathinfo(char *inbuf, char *outbuf, int length,
}
}
- DEBUG(3,("actime: %s " , ctime(&tvs.actime)));
- DEBUG(3,("modtime: %s ", ctime(&tvs.modtime)));
- DEBUG(3,("size: %x " , size));
- DEBUG(3,("mode: %x\n" , mode));
+ DEBUG(6,("actime: %s " , ctime(&tvs.actime)));
+ DEBUG(6,("modtime: %s ", ctime(&tvs.modtime)));
+ DEBUG(6,("size: %x " , size));
+ DEBUG(6,("mode: %x\n" , mode));
/* get some defaults (no modifications) if any info is zero. */
if (!tvs.actime) tvs.actime = st.st_atime;