The branch, master has been updated
       via  6af5e7c... s4:torture/rap/rap.c - quiet discard const warning
       via  bd3e70c... s4:torture/raw/open.c - remove unused variables and fix 
error handling
       via  a05ac30... s4:ntvfs/ipc/vfs_ipc.c - add more "const" in order to 
fix warnings
       via  6836304... s4:ntvfs/posix/pvfs_wait.c - fix a "calculated value 
unused" warning
      from  366333c... Fix bug #7448 - smbd crash when sambaLMPassword and 
sambaNTPassword entries missing from ldap.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6af5e7cde198ac21ed8030fd3744ab0ae7f15fd3
Author: Matthias Dieter Wallnöfer <[email protected]>
Date:   Fri May 21 23:23:58 2010 +0200

    s4:torture/rap/rap.c - quiet discard const warning

commit bd3e70c1bea906e942755cedfbcb467356b2a483
Author: Matthias Dieter Wallnöfer <[email protected]>
Date:   Fri May 21 23:19:23 2010 +0200

    s4:torture/raw/open.c - remove unused variables and fix error handling

commit a05ac3039b34f07b730b673c3b2c1a0a923cbd35
Author: Matthias Dieter Wallnöfer <[email protected]>
Date:   Fri May 21 23:16:43 2010 +0200

    s4:ntvfs/ipc/vfs_ipc.c - add more "const" in order to fix warnings

commit 68363049579c408e56170933cd0b5094934f7c20
Author: Matthias Dieter Wallnöfer <[email protected]>
Date:   Fri May 21 23:14:19 2010 +0200

    s4:ntvfs/posix/pvfs_wait.c - fix a "calculated value unused" warning
    
    The calculated value is "req" (!= NULL) if "talloc_reference" did work 
correctly
    or it is NULL if we ran out of memory.

-----------------------------------------------------------------------

Summary of changes:
 source4/ntvfs/ipc/vfs_ipc.c     |    4 ++--
 source4/ntvfs/posix/pvfs_wait.c |    8 +++++---
 source4/torture/rap/rap.c       |    2 +-
 source4/torture/raw/open.c      |   11 +++--------
 4 files changed, 11 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 1455424..676f545 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -249,8 +249,8 @@ static NTSTATUS ipc_open(struct ntvfs_module_context *ntvfs,
        struct tevent_req *subreq;
        const char *fname;
        const char *directory;
-       struct tsocket_address *client_addr;
-       struct tsocket_address *server_addr;
+       const struct tsocket_address *client_addr;
+       const struct tsocket_address *server_addr;
        int ret;
        DATA_BLOB delegated_creds = data_blob_null;
 
diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c
index e6977ef..876ce52 100644
--- a/source4/ntvfs/posix/pvfs_wait.c
+++ b/source4/ntvfs/posix/pvfs_wait.c
@@ -102,9 +102,11 @@ static void pvfs_wait_timeout(struct tevent_context *ev,
 
        pwait->reason = PVFS_WAIT_TIMEOUT;
 
-       talloc_reference(ev, req);
-       ntvfs_async_setup(pwait->req, pwait);
-       talloc_unlink(ev, req);
+       req = talloc_reference(ev, req);
+       if (req != NULL) {
+               ntvfs_async_setup(req, pwait);
+               talloc_unlink(ev, req);
+       }
 }
 
 
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 4468545..fb5520d 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -212,7 +212,7 @@ static NTSTATUS rap_pull_string(TALLOC_CTX *mem_ctx, struct 
ndr_pull *ndr,
                return NT_STATUS_INVALID_PARAMETER;
 
        *dest = talloc_zero_array(mem_ctx, char, len+1);
-       pull_string((char *)*dest, p, len+1, len, STR_ASCII);
+       pull_string(discard_const_p(char, *dest), p, len+1, len, STR_ASCII);
 
        return NT_STATUS_OK;
 }
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 42f693e..c8494ab 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -1882,13 +1882,10 @@ static bool test_ntcreatexdir(struct torture_context 
*tctx,
     struct smbcli_state *cli)
 {
        union smb_open io;
-       union smb_fileinfo finfo;
        const char *fname = BASEDIR "\\torture_ntcreatex.txt";
        const char *dname = BASEDIR "\\torture_ntcreatex_dir";
-       NTSTATUS status, expected_status;
-       bool ret = true;
+       NTSTATUS status;
        int i;
-       uint32_t access_mask = 0;
 
        struct {
                uint32_t open_disp;
@@ -1955,7 +1952,7 @@ static bool test_ntcreatexdir(struct torture_context 
*tctx,
                                __location__, nt_errstr(status),
                                nt_errstr(open_funcs[i].correct_status),
                                i, (int)open_funcs[i].open_disp);
-                       ret = false;
+                       return false;
                }
                /* Close and delete the file. */
                if (NT_STATUS_IS_OK(status)) {
@@ -2063,11 +2060,9 @@ static bool test_ntcreatexdir(struct torture_context 
*tctx,
            "NTCREATEX_OPTIONS_NON_DIRECTORY_FILE should be returned ");
        smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
 
-done:
-       smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
        smbcli_deltree(cli->tree, BASEDIR);
 
-       return ret;
+       return true;
 }
 
 /* basic testing of all RAW_OPEN_* calls


-- 
Samba Shared Repository

Reply via email to