The branch, v3-6-test has been updated
       via  bbf0762 s3: Use cli_ntcreate to when listing snapshots
       via  87151e4 s3: Fix Coverity ID 2041, "UNUSED_VALUE"
      from  c9f1cd6 s3: Fix Coverity ID 2217: RESOURCE_LEAK

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit bbf0762dc1244f4627b590b478703a16ceb1f604
Author: Volker Lendecke <[email protected]>
Date:   Wed Mar 30 13:19:46 2011 +0200

    s3: Use cli_ntcreate to when listing snapshots
    
    This works for directories as well
    
    Autobuild-User: Volker Lendecke <[email protected]>
    Autobuild-Date: Wed Mar 30 14:37:02 CEST 2011 on sn-devel-104
    (cherry picked from commit 25b43d317f7e59002323c8804bea7a75623d3513)

commit 87151e4238fa280fc3438b9ac80fb60eaf9ee00c
Author: Günther Deschner <[email protected]>
Date:   Wed Mar 30 12:39:36 2011 +0200

    s3: Fix Coverity ID 2041, "UNUSED_VALUE"
    
    Guenther
    
    Autobuild-User: Günther Deschner <[email protected]>
    Autobuild-Date: Wed Mar 30 13:49:35 CEST 2011 on sn-devel-104
    (cherry picked from commit 65c9d2e6216f71f258ea796d0959bf7e1e4d8732)

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

Summary of changes:
 source3/client/client.c                   |    6 +++++-
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c |   14 ++++++++++----
 2 files changed, 15 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/client.c b/source3/client/client.c
index 000970e..749a987 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1712,7 +1712,11 @@ static int do_allinfo(const char *name)
                         (unsigned long long)streams[i].size);
        }
 
-       status = cli_open(cli, name, O_RDONLY, DENY_NONE, &fnum);
+       status = cli_ntcreate(cli, name, 0,
+                             CREATE_ACCESS_READ, 0,
+                             FILE_SHARE_READ|FILE_SHARE_WRITE
+                             |FILE_SHARE_DELETE,
+                             FILE_OPEN, 0x0, 0x0, &fnum);
        if (!NT_STATUS_IS_OK(status)) {
                /*
                 * Ignore failure, it does not hurt if we can't list
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c 
b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index f0a105e..6d77ff0 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -489,16 +489,20 @@ static void init_srv_share_info_1007(struct pipes_struct 
*p,
  ********************************************************************/
 
 static void init_srv_share_info_1501(struct pipes_struct *p,
-                                    struct sec_desc_buf *r,
+                                    struct sec_desc_buf **r,
                                     int snum)
 {
        struct security_descriptor *sd;
+       struct sec_desc_buf *sd_buf = NULL;
        size_t sd_size;
        TALLOC_CTX *ctx = p->mem_ctx;
 
        sd = get_share_security(ctx, lp_servicename(snum), &sd_size);
+       if (sd) {
+               sd_buf = make_sec_desc_buf(p->mem_ctx, sd_size, sd);
+       }
 
-       r = make_sec_desc_buf(p->mem_ctx, sd_size, sd);
+       *r = sd_buf;
 }
 
 /*******************************************************************
@@ -744,7 +748,9 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct 
*p,
                for (snum = 0; snum < num_services; snum++) {
                        if (allowed[snum] &&
                            (resume_handle <= (i + valid_share_count++)) ) {
-                               init_srv_share_info_1501(p, 
&ctr.ctr1501->array[i++], snum);
+                               struct sec_desc_buf *sd_buf = NULL;
+                               init_srv_share_info_1501(p, &sd_buf, snum);
+                               ctr.ctr1501->array[i++] = *sd_buf;
                        }
                }
 
@@ -1478,7 +1484,7 @@ WERROR _srvsvc_NetShareGetInfo(struct pipes_struct *p,
                        init_srv_share_info_1007(p, info->info1007, snum);
                        break;
                case 1501:
-                       init_srv_share_info_1501(p, info->info1501, snum);
+                       init_srv_share_info_1501(p, &info->info1501, snum);
                        break;
                default:
                        DEBUG(5,("_srvsvc_NetShareGetInfo: unsupported switch 
value %d\n",


-- 
Samba Shared Repository

Reply via email to