summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-26 00:41:34 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-26 00:41:34 +0200
commit71a2e02cf1b8523442ca67dffa34889ca708b836 (patch)
treecfa8aab8afc7ab60fa9d1add90734040e0fd5052 /source3/smbd
parente72e2773c499a3b2538be71d8be59944a6b03007 (diff)
parent7bea6684c23f34319feb393023e634b1f069f20f (diff)
downloadsamba-71a2e02cf1b8523442ca67dffa34889ca708b836.tar.gz
samba-71a2e02cf1b8523442ca67dffa34889ca708b836.tar.bz2
samba-71a2e02cf1b8523442ca67dffa34889ca708b836.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/files.c5
-rw-r--r--source3/smbd/nttrans.c15
-rw-r--r--source3/smbd/pipes.c16
3 files changed, 10 insertions, 26 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 4a27d02cfe..d3bfce7499 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -200,11 +200,6 @@ open files, %d are available.\n", request_max_open_files, real_max_open_files));
if (!file_bmap) {
exit_server("out of memory in file_init");
}
-
- /*
- * Ensure that pipe_handle_oppset is set correctly.
- */
- set_pipe_handle_offset(real_max_open_files);
}
/****************************************************************************
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index b78c946388..30841686fb 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -276,21 +276,16 @@ static void nt_open_pipe(char *fname, connection_struct *conn,
DEBUG(4,("nt_open_pipe: Opening pipe %s.\n", fname));
- /* See if it is one we want to handle. */
-
- if (!is_known_pipename(fname)) {
- reply_botherror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND,
- ERRDOS, ERRbadpipe);
- return;
- }
-
/* Strip \\ off the name. */
fname++;
- DEBUG(3,("nt_open_pipe: Known pipe %s opening.\n", fname));
-
status = np_open(req, conn, fname, &fsp);
if (!NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
+ reply_botherror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND,
+ ERRDOS, ERRbadpipe);
+ return;
+ }
reply_nterror(req, status);
return;
}
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c
index 25a1fe2e63..d971e9dc62 100644
--- a/source3/smbd/pipes.c
+++ b/source3/smbd/pipes.c
@@ -66,13 +66,6 @@ void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req)
DEBUG(4,("Opening pipe %s.\n", pipe_name));
- /* See if it is one we want to handle. */
- if (!is_known_pipename(pipe_name)) {
- reply_botherror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND,
- ERRDOS, ERRbadpipe);
- return;
- }
-
/* Strip \PIPE\ off the name. */
fname = pipe_name + PIPELEN;
@@ -86,12 +79,13 @@ void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req)
}
#endif
- /* Known pipes arrive with DIR attribs. Remove it so a regular file */
- /* can be opened and add it in after the open. */
- DEBUG(3,("Known pipe %s opening.\n",fname));
-
status = np_open(req, conn, fname, &fsp);
if (!NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
+ reply_botherror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND,
+ ERRDOS, ERRbadpipe);
+ return;
+ }
reply_nterror(req, status);
return;
}