summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb/receive.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/smb_server/smb/receive.c b/source4/smb_server/smb/receive.c
index fd80224787..f352db7488 100644
--- a/source4/smb_server/smb/receive.c
+++ b/source4/smb_server/smb/receive.c
@@ -26,6 +26,7 @@
#include "smb_server/smb_server.h"
#include "smb_server/service_smb_proto.h"
#include "ntvfs/ntvfs.h"
+#include "system/filesys.h"
/*
@@ -77,6 +78,18 @@ NTSTATUS smbsrv_recv_smb_request(void *private, DATA_BLOB blob)
smb_conn->statistics.last_request_time = cur_time;
+ /* a temporary hack to allow me to find a possible file descriptor leak in
+ build farm machines (tridge) */
+ {
+ static int maxfd;
+ int xfd = open("/dev/null", O_RDONLY);
+ close(xfd);
+ if (xfd > maxfd) {
+ maxfd = xfd;
+ DEBUG(0,("MAXFD=%d\n", maxfd));
+ }
+ }
+
/* see if its a special NBT packet */
if (CVAL(blob.data, 0) != 0) {
req = smbsrv_init_request(smb_conn);