diff options
author | Volker Lendecke <vl@samba.org> | 2008-07-19 20:27:56 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-07-19 20:27:56 +0200 |
commit | 2e7cb1a5ccf8ae513a432cef9ccebfcebe4241ac (patch) | |
tree | 109595ca3c7c7134931cf25555fbd6908eef9721 /source3/smbd/nttrans.c | |
parent | 6fd4fedb3f81dbc256da57a0e943018d3a489d83 (diff) | |
download | samba-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/nttrans.c')
-rw-r--r-- | source3/smbd/nttrans.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 12f4da627b..149e6ecbd9 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -23,27 +23,6 @@ extern int max_send; extern enum protocol_types Protocol; -static const char *known_nt_pipes[] = { - "\\LANMAN", - "\\srvsvc", - "\\samr", - "\\wkssvc", - "\\NETLOGON", - "\\ntlsa", - "\\ntsvcs", - "\\lsass", - "\\lsarpc", - "\\winreg", - "\\initshutdown", - "\\spoolss", - "\\netdfs", - "\\rpcecho", - "\\svcctl", - "\\eventlog", - "\\unixinfo", - NULL -}; - static char *nttrans_realloc(char **ptr, size_t size) { if (ptr==NULL) { @@ -291,25 +270,12 @@ static void nt_open_pipe(char *fname, connection_struct *conn, struct smb_request *req, int *ppnum) { smb_np_struct *p = NULL; - int i; DEBUG(4,("nt_open_pipe: Opening pipe %s.\n", fname)); /* See if it is one we want to handle. */ - if (lp_disable_spoolss() && strequal(fname, "\\spoolss")) { - reply_botherror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND, - ERRDOS, ERRbadpipe); - return; - } - - for( i = 0; known_nt_pipes[i]; i++ ) { - if( strequal(fname,known_nt_pipes[i])) { - break; - } - } - - if ( known_nt_pipes[i] == NULL ) { + if (!is_known_pipename(fname)) { reply_botherror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND, ERRDOS, ERRbadpipe); return; |