summaryrefslogtreecommitdiff
path: root/source3/smbd/pipes.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-10-25 15:23:36 +0200
committerVolker Lendecke <vl@samba.org>2008-10-25 15:23:36 +0200
commitf87219d6e6e049a6d233696d126ea231cbbc1672 (patch)
tree585fce98a2f0ec1cf00db7a4cb139ab950a6399d /source3/smbd/pipes.c
parent1ad54998a971b58f870263b4b8d6e051d627c79e (diff)
downloadsamba-f87219d6e6e049a6d233696d126ea231cbbc1672.tar.gz
samba-f87219d6e6e049a6d233696d126ea231cbbc1672.tar.bz2
samba-f87219d6e6e049a6d233696d126ea231cbbc1672.zip
Move the is_known_pipename check into np_open
Diffstat (limited to 'source3/smbd/pipes.c')
-rw-r--r--source3/smbd/pipes.c16
1 files changed, 5 insertions, 11 deletions
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;
}