summaryrefslogtreecommitdiffstats
path: root/source/smbd/process.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-06-20 03:17:37 +0000
committerAndrew Tridgell <tridge@samba.org>2001-06-20 03:17:37 +0000
commit42af02e5e9eedfa9720938b46f2cffdcad50b2a9 (patch)
tree1cbbc743e809b97f294758b25e9ed7b931116b51 /source/smbd/process.c
parent31e14218e7b250e720537fcff0f13d98e3ea77e3 (diff)
downloadsamba-42af02e5e9eedfa9720938b46f2cffdcad50b2a9.tar.gz
samba-42af02e5e9eedfa9720938b46f2cffdcad50b2a9.tar.xz
samba-42af02e5e9eedfa9720938b46f2cffdcad50b2a9.zip
merged close-share smbcontrol from head
Diffstat (limited to 'source/smbd/process.c')
-rw-r--r--source/smbd/process.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/smbd/process.c b/source/smbd/process.c
index 34510515700..edd4ee53e7e 100644
--- a/source/smbd/process.c
+++ b/source/smbd/process.c
@@ -693,6 +693,12 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
if (!(flags & AS_USER))
unbecome_user();
+ /* does this protocol need a valid tree connection? */
+ if ((flags & AS_USER) && !conn) {
+ return ERROR(ERRSRV, ERRinvnid);
+ }
+
+
/* does this protocol need to be run as the connected user? */
if ((flags & AS_USER) && !become_user(conn,session_tag)) {
if (flags & AS_GUEST)
@@ -1197,6 +1203,9 @@ void smbd_process(void)
/* re-initialise the timezone */
TimeInit();
+ /* register our message handlers */
+ message_register(MSG_SMB_FORCE_TDIS, msg_force_tdis);
+
while (True) {
int deadtime = lp_deadtime()*60;
int select_timeout = setup_select_timeout();