summaryrefslogtreecommitdiff
path: root/source3/smbd/pipes.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-19 20:27:56 +0200
committerVolker Lendecke <vl@samba.org>2008-07-19 20:27:56 +0200
commit2e7cb1a5ccf8ae513a432cef9ccebfcebe4241ac (patch)
tree109595ca3c7c7134931cf25555fbd6908eef9721 /source3/smbd/pipes.c
parent6fd4fedb3f81dbc256da57a0e943018d3a489d83 (diff)
downloadsamba-2e7cb1a5ccf8ae513a432cef9ccebfcebe4241ac.tar.gz
samba-2e7cb1a5ccf8ae513a432cef9ccebfcebe4241ac.tar.bz2
samba-2e7cb1a5ccf8ae513a432cef9ccebfcebe4241ac.zip
Introduce is_known_pipename
This scans the list of pipes registered via rpc_pipe_register_commands instead of using static tables. (This used to be commit 283e6039989adea1c8921b3600b410cb67b6492a)
Diffstat (limited to 'source3/smbd/pipes.c')
-rw-r--r--source3/smbd/pipes.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c
index 6b4b83d97d..4fdcdcc557 100644
--- a/source3/smbd/pipes.c
+++ b/source3/smbd/pipes.c
@@ -44,9 +44,6 @@ struct pipe_dbrec {
fstring user;
};
-
-extern struct pipe_id_info pipe_names[];
-
/****************************************************************************
Reply to an open and X on a named pipe.
This code is basically stolen from reply_open_and_X with some
@@ -59,7 +56,6 @@ void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req)
char *pipe_name = NULL;
smb_np_struct *p;
int size=0,fmode=0,mtime=0,rmode=0;
- int i;
TALLOC_CTX *ctx = talloc_tos();
/* XXXX we need to handle passed times, sattr and flags */
@@ -82,13 +78,7 @@ 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. */
- for( i = 0; pipe_names[i].client_pipe ; i++ ) {
- if( strequal(pipe_name,pipe_names[i].client_pipe)) {
- break;
- }
- }
-
- if (pipe_names[i].client_pipe == NULL) {
+ if (!is_known_pipename(pipe_name)) {
reply_botherror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND,
ERRDOS, ERRbadpipe);
return;