r19669: set_share_security does not need a mem_ctx passed
authorVolker Lendecke <vlendec@samba.org>
Sat, 11 Nov 2006 18:07:51 +0000 (18:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:15:46 +0000 (12:15 -0500)
(This used to be commit 53eaa603eb84047263c27d57b8c0f5ce8e157189)

source3/lib/sharesec.c
source3/param/loadparm.c
source3/rpc_server/srv_srvsvc_nt.c
source3/utils/sharesec.c

index 81b383d1670f8804967ecc37ef11071b5cfbe061..e3216aa4594e50bdef8b4927c7348e02460c5744 100644 (file)
@@ -145,7 +145,7 @@ SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char *servicename,
  Store a security descriptor in the share db.
  ********************************************************************/
 
-BOOL set_share_security(TALLOC_CTX *ctx, const char *share_name, SEC_DESC *psd)
+BOOL set_share_security(const char *share_name, SEC_DESC *psd)
 {
        prs_struct ps;
        TALLOC_CTX *mem_ctx = NULL;
index 68dd9d5a97ab2c766d7f7a3cde7e2e8e047c3b95..cb9f8306b04c519794dadd826f9494353cccb42a 100644 (file)
@@ -4608,7 +4608,7 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i
        }
 
        /* Write the ACL of the new/modified share. */
-       if (!set_share_security(ctx, service_name, psd)) {
+       if (!set_share_security(service_name, psd)) {
                 DEBUG(0, ("process_usershare_file: Failed to set share "
                        "security for user share %s\n",
                        service_name ));
index c4a6c1103ebce5469d9b099273b047eadb6eaaf0..35938d087e289f657137868438723c7688583556 100644 (file)
@@ -1542,7 +1542,7 @@ WERROR _srvsvc_NetShareSetInfo(pipes_struct *p, const char *server_unc, const ch
                                            &sd_size);
 
                if (old_sd && !sec_desc_equal(old_sd, psd)) {
-                       if (!set_share_security(p->mem_ctx, share_name, psd))
+                       if (!set_share_security(share_name, psd))
                                DEBUG(0,("_srv_net_share_set_info: Failed to change security info in share %s.\n",
                                        share_name ));
                }
@@ -1691,7 +1691,7 @@ WERROR _srvsvc_NetShareAdd(pipes_struct *p, const char *server_unc, uint32_t lev
                return WERR_ACCESS_DENIED;
 
        if (psd) {
-               if (!set_share_security(p->mem_ctx, share_name, psd)) {
+               if (!set_share_security(share_name, psd)) {
                        DEBUG(0,("_srv_net_share_add: Failed to add security info to share %s.\n", share_name ));
                }
        }
index 5749cf2f555888259977b6169895cb166604a397..11882ff07a43da07a66a3c49805d304623d0d848 100644 (file)
@@ -402,7 +402,7 @@ int main(int argc, const char *argv[])
                                return -1;
                        }
                        
-                       if ( !set_share_security( ctx, lp_servicename(snum), secdesc ) ) {
+                       if ( !set_share_security( lp_servicename(snum), secdesc ) ) {
                                fprintf( stderr, "Failed to store acl for share [%s]\n", sharename );
                                return 2;
                        }