summaryrefslogtreecommitdiffstats
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-08-03 19:07:55 +0000
committerJeremy Allison <jra@samba.org>1998-08-03 19:07:55 +0000
commit7448091da6ee11709b8e5117ff6810515567f88a (patch)
tree3fd35134c9636b00e3737e718a0cb04eaf902064 /source3/smbd/server.c
parent103857e8e33c724805baf5283335dc4e3901f007 (diff)
downloadsamba-7448091da6ee11709b8e5117ff6810515567f88a.tar.gz
samba-7448091da6ee11709b8e5117ff6810515567f88a.tar.xz
samba-7448091da6ee11709b8e5117ff6810515567f88a.zip
First implementation of ChangeNotify - this version only checks
for changes in the directory modify timestamps. A better version will look at the requested client flags, and create a hash that represents the current state of the directory, and check against this instead. debug.c: Added lp_timestamp_logs() function. loadparm.c: Added "change notify timeout" in seconds (default 60) - this is the scan rate for a directory. Added ""timestamp logs" boolean - default True. Turns off log timestamps (so I can read them :-). nttrans.c: ChangeNotify implementation. server.c: ChangeNotify implementation. shmem_sysv.c: Added exits on shmem errors (without them smbd can core dump if some calls fail). smb.h: Added ChangeNotify flags for future use. util.c: Tidied up typedef. Jeremy. (This used to be commit a0748c3f53974483680ebe2ea4f556ece8d7fa43)
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 2fc6bd2007e..97a1a79239b 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1475,6 +1475,8 @@ void close_directory(int fnum)
change notify requests and free
any pertaining to this fnum. */
+ remove_pending_change_notify_requests_by_fid(fnum);
+
/*
* Do the code common to files and directories.
*/
@@ -1532,6 +1534,9 @@ int open_directory(int fnum,int cnum,char *fname, int smb_ofun, int unixmode, in
*action = FILE_WAS_OPENED;
}
+ DEBUG(5,("open_directory: opening directory %s, fnum = %d\n",
+ fname, fnum ));
+
/*
* Setup the files_struct for it.
*/
@@ -4029,7 +4034,7 @@ int reply_nt1(char *outbuf)
/*
other valid capabilities which we may support at some time...
- CAP_LARGE_FILES|CAP_NT_SMBS|CAP_RPC_REMOTE_APIS;
+ CAP_LARGE_FILES|
CAP_LARGE_READX|CAP_STATUS32|CAP_LEVEL_II_OPLOCKS;
*/
@@ -5116,6 +5121,12 @@ machine %s in domain %s.\n", global_myname, global_myworkgroup ));
trust_password_unlock();
global_machine_pasword_needs_changing = False;
}
+
+ /*
+ * Check to see if we have any change notifies
+ * outstanding on the queue.
+ */
+ process_pending_change_notify_queue(t);
}
if(got_smb)