r9010: forgot to commit the change to create_directory_handle()
authorAndrew Tridgell <tridge@samba.org>
Wed, 3 Aug 2005 18:02:45 +0000 (18:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:31:06 +0000 (13:31 -0500)
(This used to be commit 8d5238049376fb5887bdd478d7e3caa80ff1c6d0)

source4/torture/torture_util.c

index 176a8e101b6aeb5610a1eb22d7e4a357c3156d08..ffffd21fb75f750407e92f30ab3188009845f786 100644 (file)
@@ -42,7 +42,7 @@ BOOL torture_setup_dir(struct smbcli_state *cli, const char *dname)
 /*
   create a directory, returning a handle to it
 */
-int create_directory_handle(struct smbcli_tree *tree, const char *dname)
+NTSTATUS create_directory_handle(struct smbcli_tree *tree, const char *dname, int *fnum)
 {
        NTSTATUS status;
        union smb_open io;
@@ -64,13 +64,13 @@ int create_directory_handle(struct smbcli_tree *tree, const char *dname)
        io.ntcreatex.in.fname = dname;
 
        status = smb_raw_open(tree, mem_ctx, &io);
-       if (!NT_STATUS_IS_OK(status)) {
-               talloc_free(mem_ctx);
-               return -1;
+       talloc_free(mem_ctx);
+
+       if (NT_STATUS_IS_OK(status)) {
+               *fnum = io.ntcreatex.out.fnum;
        }
 
-       talloc_free(mem_ctx);
-       return io.ntcreatex.out.fnum;
+       return status;
 }
 
 /*