diff options
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/profiles.c | 30 | ||||
-rw-r--r-- | source3/utils/sharesec.c | 6 | ||||
-rw-r--r-- | source3/utils/smbget.c | 6 |
3 files changed, 22 insertions, 20 deletions
diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c index 5dd788ad5f..bbbaaf089f 100644 --- a/source3/utils/profiles.c +++ b/source3/utils/profiles.c @@ -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 diff --git a/source3/utils/sharesec.c b/source3/utils/sharesec.c index ae2a9adf64..4be77ecadd 100644 --- a/source3/utils/sharesec.c +++ b/source3/utils/sharesec.c @@ -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; } diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c index 7c01f5db3a..042f3a98f7 100644 --- a/source3/utils/smbget.c +++ b/source3/utils/smbget.c @@ -194,7 +194,8 @@ static int smb_download_dir(const char *base, const char *name, int resume) } if(chmod(relname, remotestat.st_mode) < 0) { - fprintf(stderr, "Unable to change mode of local dir %s to %o\n", relname, remotestat.st_mode); + fprintf(stderr, "Unable to change mode of local dir %s to %o\n", relname, + (unsigned int)remotestat.st_mode); smbc_closedir(dirhandle); return 0; } @@ -471,7 +472,8 @@ static int smb_download_file(const char *base, const char *name, int recursive, if(keep_permissions && !send_stdout) { if(fchmod(localhandle, remotestat.st_mode) < 0) { - fprintf(stderr, "Unable to change mode of local file %s to %o\n", path, remotestat.st_mode); + fprintf(stderr, "Unable to change mode of local file %s to %o\n", path, + (unsigned int)remotestat.st_mode); smbc_close(remotehandle); close(localhandle); return 0; |