From ac126ea8186364bddfec340189a377978d52c7ae Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 12 Oct 2008 23:01:38 +0200 Subject: Use "struct files_struct" for pipes instead of smb_np_struct --- source3/smbd/nttrans.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'source3/smbd/nttrans.c') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 6361f7949a..c5e4dc3dfb 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -268,7 +268,8 @@ bool is_ntfs_stream_name(const char *fname) static void nt_open_pipe(char *fname, connection_struct *conn, struct smb_request *req, int *ppnum) { - smb_np_struct *p = NULL; + files_struct *fsp; + NTSTATUS status; DEBUG(4,("nt_open_pipe: Opening pipe %s.\n", fname)); @@ -285,19 +286,13 @@ static void nt_open_pipe(char *fname, connection_struct *conn, DEBUG(3,("nt_open_pipe: Known pipe %s opening.\n", fname)); - p = open_rpc_pipe_p(fname, conn, req->vuid); - if (!p) { - reply_doserror(req, ERRSRV, ERRnofids); + status = np_open(req, conn, fname, &fsp); + if (!NT_STATUS_IS_OK(status)) { + reply_nterror(req, status); return; } - /* TODO: Add pipe to db */ - - if ( !store_pipe_opendb( p ) ) { - DEBUG(3,("nt_open_pipe: failed to store %s pipe open.\n", fname)); - } - - *ppnum = p->pnum; + *ppnum = fsp->fnum; return; } -- cgit