s3:smbd: add support for SMB2 Create on IPC$
authorStefan Metzmacher <metze@samba.org>
Fri, 5 Jun 2009 08:46:30 +0000 (10:46 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 5 Jun 2009 15:53:23 +0000 (17:53 +0200)
metze

source3/smbd/smb2_create.c

index 8979073045355dd4dceb0021900bf65dbc0dfb2f..5d379ec3a5b566d9db353fe7a4d3a3712bf6b962 100644 (file)
@@ -214,7 +214,23 @@ static NTSTATUS smbd_smb2_create(struct smbd_smb2_request *req,
        }
 
        if (IS_IPC(smbreq->conn)) {
-               return NT_STATUS_NOT_IMPLEMENTED;
+               const char *pipe_name = in_name;
+
+               if (!lp_nt_pipe_support()) {
+                       return NT_STATUS_ACCESS_DENIED;
+               }
+
+               /* Strip \\ off the name. */
+               if (pipe_name[0] == '\\') {
+                       pipe_name++;
+               }
+
+               status = open_np_file(smbreq, pipe_name, &result);
+               if (!NT_STATUS_IS_OK(status)) {
+                       return status;
+               }
+               info = 0;
+               ZERO_STRUCT(sbuf);
        } else if (CAN_PRINT(smbreq->conn)) {
                status = file_new(smbreq, smbreq->conn, &result);
                if(!NT_STATUS_IS_OK(status)) {