From 9042aa41c3c54e8dce600338cd4b796b65aaf066 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 11 Aug 1998 02:13:01 +0000 Subject: Makefile.in: Added CHECK target back in (at Herb's request). Added manpath in (although we don't currently use it). client/client.c: Added John Blair's fixes for "put -". include/nterr.h: Added NT_STATUS_NOTIFY_ENUM_DIR error code. smbd/nttrans.c: Added in devious fix for one-shot NT change notify bug. Jeremy. (This used to be commit 4ac3091e57e9ab234b3c051333ba521a92defa99) --- source3/smbd/nttrans.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source3/smbd') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index c6782cd45f..143bfc9a8b 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -20,6 +20,7 @@ */ #include "includes.h" +#include "nterr.h" extern int DEBUGLEVEL; extern int Protocol; @@ -984,6 +985,17 @@ static void change_notify_reply_packet(char *inbuf, int error_class, uint32 erro construct_reply_common(inbuf, outbuf); + /* + * If we're returning a 'too much in the directory changed' we need to + * set this is an NT error status flags. If we don't then the (probably + * untested) code in the NT redirector has a bug in that it doesn't re-issue + * the change notify.... Ah - I *love* it when I get so deeply into this I + * can even determine how MS failed to test stuff and why.... :-). JRA. + */ + + if(error_class == 0 && error_code == NT_STATUS_NOTIFY_ENUM_DIR) + SSVAL(outbuf,smb_flg2, SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES); + ERROR(error_class,error_code); send_smb(Client,outbuf); } @@ -1104,7 +1116,7 @@ Error was %s.\n", fsp->name, strerror(errno) )); */ DEBUG(5,("process_pending_change_notify_queue: directory fnum = %d, name = %s changed\n", fnum, fsp->name )); - change_notify_reply_packet(cnbp->request_buf,ERRDOS,ERROR_NOTIFY_ENUM_DIR); + change_notify_reply_packet(cnbp->request_buf,0,NT_STATUS_NOTIFY_ENUM_DIR); free((char *)ubi_slRemNext( &change_notify_queue, prev)); cnbp = (change_notify_buf *)(prev ? ubi_slNext(prev) : ubi_slFirst(&change_notify_queue)); unbecome_user(); -- cgit