More warning fixes for Solaris.
authorJeremy Allison <jra@samba.org>
Mon, 23 Feb 2009 23:44:34 +0000 (15:44 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 23 Feb 2009 23:44:34 +0000 (15:44 -0800)
Jeremy.

source3/libgpo/gpo_reg.c
source3/modules/vfs_solarisacl.c
source3/rpc_server/srv_svcctl_nt.c
source3/services/services_db.c
source3/utils/profiles.c
source3/utils/sharesec.c

index 3d385de..9367bca 100644 (file)
@@ -691,7 +691,7 @@ static WERROR gp_reg_generate_sd(TALLOC_CTX *mem_ctx,
        SEC_ACE ace[6];
        uint32_t mask;
 
-       SEC_ACL *acl = NULL;
+       SEC_ACL *theacl = NULL;
 
        uint8_t inherit_flags;
 
@@ -735,15 +735,15 @@ static WERROR gp_reg_generate_sd(TALLOC_CTX *mem_ctx,
                     SEC_ACE_TYPE_ACCESS_ALLOWED,
                     mask, inherit_flags);
 
-       acl = make_sec_acl(mem_ctx, NT4_ACL_REVISION, 6, ace);
-       W_ERROR_HAVE_NO_MEMORY(acl);
+       theacl = make_sec_acl(mem_ctx, NT4_ACL_REVISION, 6, ace);
+       W_ERROR_HAVE_NO_MEMORY(theacl);
 
        *sd = make_sec_desc(mem_ctx, SEC_DESC_REVISION,
                            SEC_DESC_SELF_RELATIVE |
                            SEC_DESC_DACL_AUTO_INHERITED | /* really ? */
                            SEC_DESC_DACL_AUTO_INHERIT_REQ, /* really ? */
                            NULL, NULL, NULL,
-                           acl, sd_size);
+                           theacl, sd_size);
        W_ERROR_HAVE_NO_MEMORY(*sd);
 
        return WERR_OK;
index 7bdfe84..cafb077 100644 (file)
@@ -51,11 +51,12 @@ static bool solaris_add_to_acl(SOLARIS_ACL_T *solaris_acl, int *count,
 static bool solaris_acl_get_file(const char *name, SOLARIS_ACL_T *solarisacl, 
                int *count);
 static bool solaris_acl_get_fd(int fd, SOLARIS_ACL_T *solarisacl, int *count);
-static bool solaris_acl_sort(SOLARIS_ACL_T acl, int count);
+static bool solaris_acl_sort(SOLARIS_ACL_T theacl, int count);
 static SMB_ACL_PERM_T solaris_perm_to_smb_perm(const SOLARIS_PERM_T perm);
 static SOLARIS_PERM_T smb_perm_to_solaris_perm(const SMB_ACL_PERM_T perm);
+#if 0
 static bool solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count);
-
+#endif
 
 /* public functions - the api */
 
@@ -347,7 +348,6 @@ static bool smb_acl_to_solaris_acl(SMB_ACL_T smb_acl,
 {
        bool ret = False;
        int i;
-       int check_which, check_rc;
 
        DEBUG(10, ("entering smb_acl_to_solaris_acl\n"));
        
@@ -717,6 +717,7 @@ static bool solaris_acl_sort(SOLARIS_ACL_T solaris_acl, int count)
        return True;
 }
 
+#if 0
 /*
  * acl check function:
  *   unused at the moment but could be used to get more
@@ -746,7 +747,7 @@ static bool solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count)
        }
        return True;
 }
-
+#endif
 
 /* VFS operations structure */
 
index 33bf3d0..b90a189 100644 (file)
@@ -139,7 +139,7 @@ static SEC_DESC* construct_scm_sd( TALLOC_CTX *ctx )
        SEC_ACE ace[2];
        size_t i = 0;
        SEC_DESC *sd;
-       SEC_ACL *acl;
+       SEC_ACL *theacl;
        size_t sd_size;
 
        /* basic access for Everyone */
@@ -155,12 +155,12 @@ static SEC_DESC* construct_scm_sd( TALLOC_CTX *ctx )
 
        /* create the security descriptor */
 
-       if ( !(acl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) )
+       if ( !(theacl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) )
                return NULL;
 
        if ( !(sd = make_sec_desc(ctx, SECURITY_DESCRIPTOR_REVISION_1,
                                  SEC_DESC_SELF_RELATIVE, NULL, NULL, NULL,
-                                 acl, &sd_size)) )
+                                 theacl, &sd_size)) )
                return NULL;
 
        return sd;
index 6d1b5d5..ef975cf 100644 (file)
@@ -91,7 +91,7 @@ static SEC_DESC* construct_service_sd( TALLOC_CTX *ctx )
        SEC_ACE ace[4];
        size_t i = 0;
        SEC_DESC *sd = NULL;
-       SEC_ACL *acl = NULL;
+       SEC_ACL *theacl = NULL;
        size_t sd_size;
 
        /* basic access for Everyone */
@@ -109,12 +109,12 @@ static SEC_DESC* construct_service_sd( TALLOC_CTX *ctx )
 
        /* create the security descriptor */
 
-       if ( !(acl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) )
+       if ( !(theacl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) )
                return NULL;
 
        if ( !(sd = make_sec_desc(ctx, SECURITY_DESCRIPTOR_REVISION_1,
                                  SEC_DESC_SELF_RELATIVE, NULL, NULL, NULL,
-                                 acl, &sd_size)) )
+                                 theacl, &sd_size)) )
                return NULL;
 
        return sd;
index 5dd788a..bbbaaf0 100644 (file)
@@ -57,7 +57,7 @@ static void verbose_output(const char *format, ...)
 
 static bool swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 )
 {
-       SEC_ACL *acl;
+       SEC_ACL *theacl;
        int i;
        bool update = False;
 
@@ -78,30 +78,30 @@ static bool swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 )
                        sid_string_tos(sd->group_sid));
        }
 
-       acl = sd->dacl;
-       verbose_output("  DACL: %d entries:\n", acl->num_aces);
-       for ( i=0; i<acl->num_aces; i++ ) {
+       theacl = sd->dacl;
+       verbose_output("  DACL: %d entries:\n", theacl->num_aces);
+       for ( i=0; i<theacl->num_aces; i++ ) {
                verbose_output("    Trustee SID: %s\n", 
-                       sid_string_tos(&acl->aces[i].trustee));
-               if ( sid_equal( &acl->aces[i].trustee, s1 ) ) {
-                       sid_copy( &acl->aces[i].trustee, s2 );
+                       sid_string_tos(&theacl->aces[i].trustee));
+               if ( sid_equal( &theacl->aces[i].trustee, s1 ) ) {
+                       sid_copy( &theacl->aces[i].trustee, s2 );
                        update = True;
                        verbose_output("    New Trustee SID: %s\n", 
-                               sid_string_tos(&acl->aces[i].trustee));
+                               sid_string_tos(&theacl->aces[i].trustee));
                }
        }
 
 #if 0
-       acl = sd->sacl;
-       verbose_output("  SACL: %d entries: \n", acl->num_aces);
-       for ( i=0; i<acl->num_aces; i++ ) {
+       theacl = sd->sacl;
+       verbose_output("  SACL: %d entries: \n", theacl->num_aces);
+       for ( i=0; i<theacl->num_aces; i++ ) {
                verbose_output("    Trustee SID: %s\n", 
-                       sid_string_tos(&acl->aces[i].trustee));
-               if ( sid_equal( &acl->aces[i].trustee, s1 ) ) {
-                       sid_copy( &acl->aces[i].trustee, s2 );
+                       sid_string_tos(&theacl->aces[i].trustee));
+               if ( sid_equal( &theacl->aces[i].trustee, s1 ) ) {
+                       sid_copy( &theacl->aces[i].trustee, s2 );
                        update = True;
                        verbose_output("    New Trustee SID: %s\n", 
-                               sid_string_tos(&acl->aces[i].trustee));
+                               sid_string_tos(&theacl->aces[i].trustee));
                }
        }
 #endif
index ae2a9ad..4be77ec 100644 (file)
@@ -298,7 +298,7 @@ static SEC_DESC* parse_acl_string(TALLOC_CTX *mem_ctx, const char *szACL, size_t
 {
        SEC_DESC *sd = NULL;
        SEC_ACE *ace;
-       SEC_ACL *acl;
+       SEC_ACL *theacl;
        int num_ace;
        const char *pacl;
        int i;
@@ -326,11 +326,11 @@ static SEC_DESC* parse_acl_string(TALLOC_CTX *mem_ctx, const char *szACL, size_t
                pacl++;
        }
 
-       if ( !(acl = make_sec_acl( mem_ctx, NT4_ACL_REVISION, num_ace, ace )) )
+       if ( !(theacl = make_sec_acl( mem_ctx, NT4_ACL_REVISION, num_ace, ace )) )
                return NULL;
 
        sd = make_sec_desc( mem_ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
-               NULL, NULL, NULL, acl, sd_size);
+               NULL, NULL, NULL, theacl, sd_size);
 
        return sd;
 }