diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-02-21 10:25:52 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-02-22 16:20:10 +1100 |
commit | 2e69e894566d32001120d76d7ba58cdacb56d279 (patch) | |
tree | 2ac3ab5945d6bc9ed9ac4757c05dd8a72057e1ec /source3/rpc_server/svcctl | |
parent | 985c7da604ac30e67ee4b5a829935074900d6f26 (diff) | |
download | samba-2e69e894566d32001120d76d7ba58cdacb56d279.tar.gz samba-2e69e894566d32001120d76d7ba58cdacb56d279.tar.bz2 samba-2e69e894566d32001120d76d7ba58cdacb56d279.zip |
s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_info
These variables, of type struct auth_serversupplied_info were poorly
named when added into 2001, and in good consistant practice, this has
extended all over the codebase in the years since.
The structure is also not ideal for it's current purpose. Originally
intended to convey the results of the authentication modules, it
really describes all the essential attributes of a session. This
rename will reduce the volume of a future patch to replaced these with
a struct auth_session_info, with auth_serversupplied_info confined to
the lower levels of the auth subsystem, and then eliminated.
(The new structure will be the output of create_local_token(), and the
change in struct definition will ensure that this is always run, populating
local groups and privileges).
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/rpc_server/svcctl')
-rw-r--r-- | source3/rpc_server/svcctl/srv_svcctl_nt.c | 32 | ||||
-rw-r--r-- | source3/rpc_server/svcctl/srv_svcctl_reg.c | 2 |
2 files changed, 17 insertions, 17 deletions
diff --git a/source3/rpc_server/svcctl/srv_svcctl_nt.c b/source3/rpc_server/svcctl/srv_svcctl_nt.c index a7af089e7e..e8890e062b 100644 --- a/source3/rpc_server/svcctl/srv_svcctl_nt.c +++ b/source3/rpc_server/svcctl/srv_svcctl_nt.c @@ -278,7 +278,7 @@ WERROR _svcctl_OpenSCManagerW(struct pipes_struct *p, return WERR_NOMEM; se_map_generic( &r->in.access_mask, &scm_generic_map ); - status = svcctl_access_check( sec_desc, p->server_info->security_token, + status = svcctl_access_check( sec_desc, p->session_info->security_token, r->in.access_mask, &access_granted ); if ( !NT_STATUS_IS_OK(status) ) return ntstatus_to_werror( status ); @@ -310,12 +310,12 @@ WERROR _svcctl_OpenServiceW(struct pipes_struct *p, return WERR_BADFID; /* - * Perform access checks. Use the system server_info in order to ensure + * Perform access checks. Use the system session_info in order to ensure * that we retrieve the security descriptor */ sec_desc = svcctl_get_secdesc(p->mem_ctx, p->msg_ctx, - get_server_info_system(), + get_session_info_system(), service); if (sec_desc == NULL) { DEBUG(0, ("_svcctl_OpenServiceW: Failed to get a valid security " @@ -324,7 +324,7 @@ WERROR _svcctl_OpenServiceW(struct pipes_struct *p, } se_map_generic( &r->in.access_mask, &svc_generic_map ); - status = svcctl_access_check( sec_desc, p->server_info->security_token, + status = svcctl_access_check( sec_desc, p->session_info->security_token, r->in.access_mask, &access_granted ); if ( !NT_STATUS_IS_OK(status) ) return ntstatus_to_werror( status ); @@ -367,7 +367,7 @@ WERROR _svcctl_GetServiceDisplayNameW(struct pipes_struct *p, display_name = svcctl_lookup_dispname(p->mem_ctx, p->msg_ctx, - p->server_info, + p->session_info, service); if (!display_name) { display_name = ""; @@ -406,7 +406,7 @@ WERROR _svcctl_QueryServiceStatus(struct pipes_struct *p, static int enumerate_status(TALLOC_CTX *ctx, struct messaging_context *msg_ctx, - struct auth_serversupplied_info *server_info, + struct auth_serversupplied_info *session_info, struct ENUM_SERVICE_STATUSW **status) { int num_services = 0; @@ -428,7 +428,7 @@ static int enumerate_status(TALLOC_CTX *ctx, display_name = svcctl_lookup_dispname(ctx, msg_ctx, - server_info, + session_info, svcctl_ops[i].name); st[i].display_name = talloc_strdup(st, display_name ? display_name : ""); @@ -466,7 +466,7 @@ WERROR _svcctl_EnumServicesStatusW(struct pipes_struct *p, num_services = enumerate_status(p->mem_ctx, p->msg_ctx, - p->server_info, + p->session_info, &services); if (num_services == -1 ) { return WERR_NOMEM; @@ -667,7 +667,7 @@ WERROR _svcctl_QueryServiceStatusEx(struct pipes_struct *p, static WERROR fill_svc_config(TALLOC_CTX *ctx, struct messaging_context *msg_ctx, - struct auth_serversupplied_info *server_info, + struct auth_serversupplied_info *session_info, const char *name, struct QUERY_SERVICE_CONFIG *config) { @@ -678,12 +678,12 @@ static WERROR fill_svc_config(TALLOC_CTX *ctx, config->displayname = svcctl_lookup_dispname(mem_ctx, msg_ctx, - server_info, + session_info, name); result = svcctl_get_string_value(mem_ctx, msg_ctx, - server_info, + session_info, name, "ObjectName"); if (result != NULL) { @@ -692,7 +692,7 @@ static WERROR fill_svc_config(TALLOC_CTX *ctx, result = svcctl_get_string_value(mem_ctx, msg_ctx, - server_info, + session_info, name, "ImagePath"); if (result != NULL) { @@ -749,7 +749,7 @@ WERROR _svcctl_QueryServiceConfigW(struct pipes_struct *p, wresult = fill_svc_config(p->mem_ctx, p->msg_ctx, - p->server_info, + p->session_info, info->name, r->out.query); if ( !W_ERROR_IS_OK(wresult) ) @@ -798,7 +798,7 @@ WERROR _svcctl_QueryServiceConfig2W(struct pipes_struct *p, description = svcctl_lookup_description(p->mem_ctx, p->msg_ctx, - p->server_info, + p->session_info, info->name); desc_buf.description = description; @@ -921,7 +921,7 @@ WERROR _svcctl_QueryServiceObjectSecurity(struct pipes_struct *p, /* Lookup the security descriptor and marshall it up for a reply */ sec_desc = svcctl_get_secdesc(p->mem_ctx, p->msg_ctx, - get_server_info_system(), + get_session_info_system(), info->name); if (sec_desc == NULL) { return WERR_NOMEM; @@ -997,7 +997,7 @@ WERROR _svcctl_SetServiceObjectSecurity(struct pipes_struct *p, /* store the new SD */ - if (!svcctl_set_secdesc(p->msg_ctx, p->server_info, info->name, sec_desc)) + if (!svcctl_set_secdesc(p->msg_ctx, p->session_info, info->name, sec_desc)) return WERR_ACCESS_DENIED; return WERR_OK; diff --git a/source3/rpc_server/svcctl/srv_svcctl_reg.c b/source3/rpc_server/svcctl/srv_svcctl_reg.c index 84c5f434ee..f4876222fb 100644 --- a/source3/rpc_server/svcctl/srv_svcctl_reg.c +++ b/source3/rpc_server/svcctl/srv_svcctl_reg.c @@ -574,7 +574,7 @@ bool svcctl_init_winreg(struct messaging_context *msg_ctx) } status = dcerpc_winreg_int_hklm_openkey(tmp_ctx, - get_server_info_system(), + get_session_info_system(), msg_ctx, &h, key, |