mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
s3-secdesc: use SD_REVISION from security.idl.
Guenther
This commit is contained in:
@ -67,10 +67,6 @@
|
|||||||
PROTECTED_SACL_SECURITY_INFORMATION|\
|
PROTECTED_SACL_SECURITY_INFORMATION|\
|
||||||
PROTECTED_DACL_SECURITY_INFORMATION)
|
PROTECTED_DACL_SECURITY_INFORMATION)
|
||||||
|
|
||||||
#ifndef SEC_DESC_REVISION
|
|
||||||
#define SEC_DESC_REVISION 0x1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* A type to describe the mapping of generic access rights to object
|
/* A type to describe the mapping of generic access rights to object
|
||||||
specific access rights. */
|
specific access rights. */
|
||||||
|
|
||||||
|
@ -741,7 +741,7 @@ static WERROR gp_reg_generate_sd(TALLOC_CTX *mem_ctx,
|
|||||||
theacl = make_sec_acl(mem_ctx, NT4_ACL_REVISION, 6, ace);
|
theacl = make_sec_acl(mem_ctx, NT4_ACL_REVISION, 6, ace);
|
||||||
W_ERROR_HAVE_NO_MEMORY(theacl);
|
W_ERROR_HAVE_NO_MEMORY(theacl);
|
||||||
|
|
||||||
*sd = make_sec_desc(mem_ctx, SEC_DESC_REVISION,
|
*sd = make_sec_desc(mem_ctx, SD_REVISION,
|
||||||
SEC_DESC_SELF_RELATIVE |
|
SEC_DESC_SELF_RELATIVE |
|
||||||
SEC_DESC_DACL_AUTO_INHERITED | /* really ? */
|
SEC_DESC_DACL_AUTO_INHERITED | /* really ? */
|
||||||
SEC_DESC_DACL_AUTO_INHERIT_REQ, /* really ? */
|
SEC_DESC_DACL_AUTO_INHERIT_REQ, /* really ? */
|
||||||
|
@ -321,7 +321,7 @@ static NTSTATUS smb_get_nt_acl_nfs4_common(const SMB_STRUCT_STAT *sbuf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
DEBUG(10,("after make sec_acl\n"));
|
DEBUG(10,("after make sec_acl\n"));
|
||||||
*ppdesc = make_sec_desc(mem_ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
|
*ppdesc = make_sec_desc(mem_ctx, SD_REVISION, SEC_DESC_SELF_RELATIVE,
|
||||||
(security_info & OWNER_SECURITY_INFORMATION) ? &sid_owner : NULL,
|
(security_info & OWNER_SECURITY_INFORMATION) ? &sid_owner : NULL,
|
||||||
(security_info & GROUP_SECURITY_INFORMATION) ? &sid_group : NULL,
|
(security_info & GROUP_SECURITY_INFORMATION) ? &sid_group : NULL,
|
||||||
NULL, psa, &sd_size);
|
NULL, psa, &sd_size);
|
||||||
|
@ -88,7 +88,7 @@ static NTSTATUS parse_acl_blob(const DATA_BLOB *pblob,
|
|||||||
|
|
||||||
switch (xacl.version) {
|
switch (xacl.version) {
|
||||||
case 2:
|
case 2:
|
||||||
*ppdesc = make_sec_desc(ctx, SEC_DESC_REVISION,
|
*ppdesc = make_sec_desc(ctx, SD_REVISION,
|
||||||
xacl.info.sd_hs2->sd->type | SEC_DESC_SELF_RELATIVE,
|
xacl.info.sd_hs2->sd->type | SEC_DESC_SELF_RELATIVE,
|
||||||
xacl.info.sd_hs2->sd->owner_sid,
|
xacl.info.sd_hs2->sd->owner_sid,
|
||||||
xacl.info.sd_hs2->sd->group_sid,
|
xacl.info.sd_hs2->sd->group_sid,
|
||||||
@ -100,7 +100,7 @@ static NTSTATUS parse_acl_blob(const DATA_BLOB *pblob,
|
|||||||
memset(hash, '\0', XATTR_SD_HASH_SIZE);
|
memset(hash, '\0', XATTR_SD_HASH_SIZE);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
*ppdesc = make_sec_desc(ctx, SEC_DESC_REVISION,
|
*ppdesc = make_sec_desc(ctx, SD_REVISION,
|
||||||
xacl.info.sd_hs3->sd->type | SEC_DESC_SELF_RELATIVE,
|
xacl.info.sd_hs3->sd->type | SEC_DESC_SELF_RELATIVE,
|
||||||
xacl.info.sd_hs3->sd->owner_sid,
|
xacl.info.sd_hs3->sd->owner_sid,
|
||||||
xacl.info.sd_hs3->sd->group_sid,
|
xacl.info.sd_hs3->sd->group_sid,
|
||||||
|
@ -642,7 +642,7 @@ static size_t afs_to_nt_acl_common(struct afs_acl *afs_acl,
|
|||||||
if (psa == NULL)
|
if (psa == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
*ppdesc = make_sec_desc(mem_ctx, SEC_DESC_REVISION,
|
*ppdesc = make_sec_desc(mem_ctx, SD_REVISION,
|
||||||
SEC_DESC_SELF_RELATIVE,
|
SEC_DESC_SELF_RELATIVE,
|
||||||
(security_info & OWNER_SECURITY_INFORMATION)
|
(security_info & OWNER_SECURITY_INFORMATION)
|
||||||
? &owner_sid : NULL,
|
? &owner_sid : NULL,
|
||||||
|
@ -393,7 +393,7 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
|
|||||||
|
|
||||||
/* create a new struct security_descriptor with the appropriate owner and group SIDs */
|
/* create a new struct security_descriptor with the appropriate owner and group SIDs */
|
||||||
|
|
||||||
new_sec = make_sec_desc( ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
|
new_sec = make_sec_desc( ctx, SD_REVISION, SEC_DESC_SELF_RELATIVE,
|
||||||
&global_sid_Builtin_Administrators,
|
&global_sid_Builtin_Administrators,
|
||||||
&global_sid_Builtin_Administrators,
|
&global_sid_Builtin_Administrators,
|
||||||
NULL, NULL, &size_new_sec );
|
NULL, NULL, &size_new_sec );
|
||||||
@ -2693,7 +2693,7 @@ WERROR spoolss_create_default_secdesc(TALLOC_CTX *mem_ctx,
|
|||||||
|
|
||||||
if ((psa = make_sec_acl(mem_ctx, NT4_ACL_REVISION, i, ace)) != NULL) {
|
if ((psa = make_sec_acl(mem_ctx, NT4_ACL_REVISION, i, ace)) != NULL) {
|
||||||
psd = make_sec_desc(mem_ctx,
|
psd = make_sec_desc(mem_ctx,
|
||||||
SEC_DESC_REVISION,
|
SD_REVISION,
|
||||||
SEC_DESC_SELF_RELATIVE,
|
SEC_DESC_SELF_RELATIVE,
|
||||||
&global_sid_Builtin_Administrators,
|
&global_sid_Builtin_Administrators,
|
||||||
&global_sid_Builtin_Administrators,
|
&global_sid_Builtin_Administrators,
|
||||||
@ -5645,7 +5645,7 @@ static struct sec_desc_buf *construct_default_printer_sdb(TALLOC_CTX *ctx)
|
|||||||
NT5 machine. */
|
NT5 machine. */
|
||||||
|
|
||||||
if ((psa = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) != NULL) {
|
if ((psa = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) != NULL) {
|
||||||
psd = make_sec_desc(ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
|
psd = make_sec_desc(ctx, SD_REVISION, SEC_DESC_SELF_RELATIVE,
|
||||||
&global_sid_Builtin_Administrators,
|
&global_sid_Builtin_Administrators,
|
||||||
&global_sid_Builtin_Administrators,
|
&global_sid_Builtin_Administrators,
|
||||||
NULL, psa, &sd_size);
|
NULL, psa, &sd_size);
|
||||||
|
@ -65,7 +65,7 @@ static WERROR construct_registry_sd(TALLOC_CTX *ctx, struct security_descriptor
|
|||||||
return WERR_NOMEM;
|
return WERR_NOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
sd = make_sec_desc(ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
|
sd = make_sec_desc(ctx, SD_REVISION, SEC_DESC_SELF_RELATIVE,
|
||||||
&global_sid_Builtin_Administrators,
|
&global_sid_Builtin_Administrators,
|
||||||
&global_sid_System, NULL, theacl,
|
&global_sid_System, NULL, theacl,
|
||||||
&sd_size);
|
&sd_size);
|
||||||
|
@ -329,7 +329,7 @@ static struct security_descriptor* parse_acl_string(TALLOC_CTX *mem_ctx, const c
|
|||||||
if ( !(theacl = 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;
|
return NULL;
|
||||||
|
|
||||||
sd = make_sec_desc( mem_ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
|
sd = make_sec_desc( mem_ctx, SD_REVISION, SEC_DESC_SELF_RELATIVE,
|
||||||
NULL, NULL, NULL, theacl, sd_size);
|
NULL, NULL, NULL, theacl, sd_size);
|
||||||
|
|
||||||
return sd;
|
return sd;
|
||||||
|
Reference in New Issue
Block a user