From b5bec1a6d73f5939b306e157937d027a7286163c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 15 Apr 2009 01:12:13 +0200 Subject: s3-secdesc: use SEC_FLAG_MAXIMUM_ALLOWED instead of SEC_RIGHTS_MAXIMUM_ALLOWED. Guenther --- source3/utils/net_rpc.c | 8 ++++---- source3/utils/net_rpc_audit.c | 8 ++++---- source3/utils/net_rpc_join.c | 4 ++-- source3/utils/net_rpc_registry.c | 10 +++++----- source3/utils/net_rpc_rights.c | 10 +++++----- source3/utils/net_util.c | 2 +- source3/utils/netlookup.c | 2 +- source3/utils/smbcquotas.c | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 5dd3df9a69..845ceca573 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -68,7 +68,7 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx, } result = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, false, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &pol); if (!NT_STATUS_IS_OK(result)) { d_fprintf(stderr, "open_policy failed: %s\n", @@ -1668,7 +1668,7 @@ static NTSTATUS get_sid_from_name(struct cli_state *cli, } result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, false, - SEC_RIGHTS_MAXIMUM_ALLOWED, &lsa_pol); + SEC_FLAG_MAXIMUM_ALLOWED, &lsa_pol); if (!NT_STATUS_IS_OK(result)) { goto done; @@ -2485,7 +2485,7 @@ static NTSTATUS rpc_list_alias_members(struct net_context *c, } result = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, &lsa_pol); + SEC_FLAG_MAXIMUM_ALLOWED, &lsa_pol); if (!NT_STATUS_IS_OK(result)) { d_fprintf(stderr, "Couldn't open LSA policy handle\n"); @@ -3850,7 +3850,7 @@ static NTSTATUS rpc_aliaslist_dump(struct net_context *c, struct policy_handle lsa_pol; result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &lsa_pol); if (!NT_STATUS_IS_OK(result)) return result; diff --git a/source3/utils/net_rpc_audit.c b/source3/utils/net_rpc_audit.c index aa7fc7c394..823fe06f1a 100644 --- a/source3/utils/net_rpc_audit.c +++ b/source3/utils/net_rpc_audit.c @@ -88,7 +88,7 @@ static NTSTATUS rpc_audit_get_internal(struct net_context *c, } result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &pol); if (!NT_STATUS_IS_OK(result)) { @@ -170,7 +170,7 @@ static NTSTATUS rpc_audit_set_internal(struct net_context *c, } result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &pol); if (!NT_STATUS_IS_OK(result)) { @@ -229,7 +229,7 @@ static NTSTATUS rpc_audit_enable_internal_ext(struct rpc_pipe_client *pipe_hnd, union lsa_PolicyInformation *info = NULL; result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &pol); if (!NT_STATUS_IS_OK(result)) { @@ -314,7 +314,7 @@ static NTSTATUS rpc_audit_list_internal(struct net_context *c, int i; result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &pol); if (!NT_STATUS_IS_OK(result)) { diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index c2e3630641..ed0311317d 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -211,7 +211,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv) CHECK_RPC_ERR(rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &lsa_pol), "error opening lsa policy handle"); @@ -326,7 +326,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv) CHECK_RPC_ERR_DEBUG( rpccli_samr_OpenUser(pipe_hnd, mem_ctx, &domain_pol, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, user_rid, &user_pol), ("could not re-open existing user %s: %s\n", diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index 60274728f3..203a0cc9e3 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -383,7 +383,7 @@ static NTSTATUS rpc_registry_setvalue_internal(struct net_context *c, struct registry_value value; status = registry_openkey(mem_ctx, pipe_hnd, argv[0], - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &hive_hnd, &key_hnd); if (!NT_STATUS_IS_OK(status)) { d_fprintf(stderr, "registry_openkey failed: %s\n", @@ -455,7 +455,7 @@ static NTSTATUS rpc_registry_deletevalue_internal(struct net_context *c, ZERO_STRUCT(valuename); status = registry_openkey(mem_ctx, pipe_hnd, argv[0], - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &hive_hnd, &key_hnd); if (!NT_STATUS_IS_OK(status)) { d_fprintf(stderr, "registry_openkey failed: %s\n", @@ -516,7 +516,7 @@ static NTSTATUS rpc_registry_getvalue_internal(struct net_context *c, ZERO_STRUCT(valuename); status = registry_openkey(tmp_ctx, pipe_hnd, argv[0], - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &hive_hnd, &key_hnd); if (!NT_STATUS_IS_OK(status)) { d_fprintf(stderr, "registry_openkey failed: %s\n", @@ -657,7 +657,7 @@ static NTSTATUS rpc_registry_createkey_internal(struct net_context *c, } status = rpccli_winreg_Connect(pipe_hnd, mem_ctx, hive, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &hive_hnd); if (!(NT_STATUS_IS_OK(status))) { return status; @@ -727,7 +727,7 @@ static NTSTATUS rpc_registry_deletekey_internal(struct net_context *c, } status = rpccli_winreg_Connect(pipe_hnd, mem_ctx, hive, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &hive_hnd); if (!(NT_STATUS_IS_OK(status))) { return status; diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c index 10166b6d2b..abf70e7ea2 100644 --- a/source3/utils/net_rpc_rights.c +++ b/source3/utils/net_rpc_rights.c @@ -34,7 +34,7 @@ static NTSTATUS sid_to_name(struct rpc_pipe_client *pipe_hnd, char **domains = NULL, **names = NULL; result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, &pol); + SEC_FLAG_MAXIMUM_ALLOWED, &pol); if ( !NT_STATUS_IS_OK(result) ) return result; @@ -70,7 +70,7 @@ static NTSTATUS name_to_sid(struct rpc_pipe_client *pipe_hnd, } result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, &pol); + SEC_FLAG_MAXIMUM_ALLOWED, &pol); if ( !NT_STATUS_IS_OK(result) ) return result; @@ -328,7 +328,7 @@ static NTSTATUS rpc_rights_list_internal(struct net_context *c, uint16 lang_id_desc; result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, &pol); + SEC_FLAG_MAXIMUM_ALLOWED, &pol); if ( !NT_STATUS_IS_OK(result) ) return result; @@ -456,7 +456,7 @@ static NTSTATUS rpc_rights_grant_internal(struct net_context *c, goto done; result = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &dom_pol); if (!NT_STATUS_IS_OK(result)) @@ -522,7 +522,7 @@ static NTSTATUS rpc_rights_revoke_internal(struct net_context *c, return result; result = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &dom_pol); if (!NT_STATUS_IS_OK(result)) diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index 2915ffb809..8bf9aac6f2 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -45,7 +45,7 @@ NTSTATUS net_rpc_lookup_name(struct net_context *c, } result = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, false, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &pol); if (!NT_STATUS_IS_OK(result)) { d_fprintf(stderr, "open_policy failed: %s\n", diff --git a/source3/utils/netlookup.c b/source3/utils/netlookup.c index dd0efa4142..af219eb93c 100644 --- a/source3/utils/netlookup.c +++ b/source3/utils/netlookup.c @@ -131,7 +131,7 @@ static struct con_struct *create_cs(struct net_context *c, } nt_status = rpccli_lsa_open_policy(cs->lsapipe, ctx, true, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, &cs->pol); if (!NT_STATUS_IS_OK(nt_status)) { diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c index 78260acf76..1425d428ec 100644 --- a/source3/utils/smbcquotas.c +++ b/source3/utils/smbcquotas.c @@ -62,7 +62,7 @@ static bool cli_open_policy_hnd(void) if (!got_policy_hnd) { - /* Some systems don't support SEC_RIGHTS_MAXIMUM_ALLOWED, + /* Some systems don't support SEC_FLAG_MAXIMUM_ALLOWED, but NT sends 0x2000000 so we might as well do it too. */ if (!NT_STATUS_IS_OK(rpccli_lsa_open_policy(global_pipe_hnd, talloc_tos(), True, -- cgit