s3:smbd: only strip \\ off the name if present (for ntcreatex)
authorStefan Metzmacher <metze@samba.org>
Mon, 28 May 2012 14:40:36 +0000 (16:40 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 28 May 2012 17:51:58 +0000 (19:51 +0200)
metze

source3/smbd/nttrans.c

index 168ef56553cd65f29dc0a4742daa4d309b4b5001..53e17139915e8dd40db7919b4bc73567e547d2ae 100644 (file)
@@ -291,8 +291,10 @@ static void nt_open_pipe(char *fname, connection_struct *conn,
 
        DEBUG(4,("nt_open_pipe: Opening pipe %s.\n", fname));
 
-       /* Strip \\ off the name. */
-       fname++;
+       /* Strip \\ off the name if present. */
+       while (fname[0] == '\\') {
+               fname++;
+       }
 
        status = open_np_file(req, fname, &fsp);
        if (!NT_STATUS_IS_OK(status)) {