diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-06-01 20:30:56 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-06-07 23:34:28 +1000 |
commit | 7a021df96deaf6dbe9f1abdfc16f6276e4a192fa (patch) | |
tree | 21d1f7f53c4d2f40883332548d3fb3e41c358556 | |
parent | 23159453d3e61e2ad47fe6f86f3763280a11ea0c (diff) | |
download | samba-7a021df96deaf6dbe9f1abdfc16f6276e4a192fa.tar.gz samba-7a021df96deaf6dbe9f1abdfc16f6276e4a192fa.tar.bz2 samba-7a021df96deaf6dbe9f1abdfc16f6276e4a192fa.zip |
s3:auth Rename user_info->internal_username -> user_info->mapped.account_name
This is closer to the structure I want for a common struct
auth_usersupplied_info.
Andrew Bartlett
-rw-r--r-- | source3/auth/auth.c | 14 | ||||
-rw-r--r-- | source3/auth/auth_builtin.c | 8 | ||||
-rw-r--r-- | source3/auth/auth_domain.c | 4 | ||||
-rw-r--r-- | source3/auth/auth_netlogond.c | 2 | ||||
-rw-r--r-- | source3/auth/auth_sam.c | 2 | ||||
-rw-r--r-- | source3/auth/auth_server.c | 4 | ||||
-rw-r--r-- | source3/auth/auth_unix.c | 6 | ||||
-rw-r--r-- | source3/auth/auth_wbc.c | 6 | ||||
-rw-r--r-- | source3/auth/auth_winbind.c | 4 | ||||
-rw-r--r-- | source3/auth/check_samsec.c | 4 | ||||
-rw-r--r-- | source3/auth/user_info.c | 6 | ||||
-rw-r--r-- | source3/include/auth.h | 2 |
12 files changed, 31 insertions, 31 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c index eeb18c5c42..2801fc32dc 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -217,7 +217,7 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context, user_info->client_domain, user_info->client.account_name, user_info->workstation_name)); DEBUG(3, ("check_ntlm_password: mapped user is: [%s]\\[%s]@[%s]\n", - user_info->domain, user_info->internal_username, user_info->workstation_name)); + user_info->domain, user_info->mapped.account_name, user_info->workstation_name)); if (auth_context->challenge.length != 8) { DEBUG(0, ("check_ntlm_password: Invalid challenge stored for this auth context - cannot continue\n")); @@ -298,10 +298,10 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context, if (NT_STATUS_IS_OK(nt_status)) { DEBUG((*server_info)->guest ? 5 : 2, - ("check_ntlm_password: %sauthentication for user [%s] -> [%s] -> [%s] succeeded\n", - (*server_info)->guest ? "guest " : "", + ("check_ntlm_password: %sauthentication for user [%s] -> [%s] -> [%s] succeeded\n", + (*server_info)->guest ? "guest " : "", user_info->client.account_name, - user_info->internal_username, + user_info->mapped.account_name, unix_username)); } @@ -310,10 +310,10 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context, /* failed authentication; check for guest lapping */ - DEBUG(2, ("check_ntlm_password: Authentication for user [%s] -> [%s] FAILED with error %s\n", - user_info->client.account_name, user_info->internal_username, + DEBUG(2, ("check_ntlm_password: Authentication for user [%s] -> [%s] FAILED with error %s\n", + user_info->client.account_name, user_info->mapped.account_name, nt_errstr(nt_status))); - ZERO_STRUCTP(server_info); + ZERO_STRUCTP(server_info); return nt_status; } diff --git a/source3/auth/auth_builtin.c b/source3/auth/auth_builtin.c index 02a4682542..bf6d7015ac 100644 --- a/source3/auth/auth_builtin.c +++ b/source3/auth/auth_builtin.c @@ -40,10 +40,10 @@ static NTSTATUS check_guest_security(const struct auth_context *auth_context, /* mark this as 'not for me' */ NTSTATUS nt_status = NT_STATUS_NOT_IMPLEMENTED; - DEBUG(10, ("Check auth for: [%s]\n", user_info->internal_username)); + DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name)); - if (!(user_info->internal_username - && *user_info->internal_username)) { + if (!(user_info->mapped.account_name + && *user_info->mapped.account_name)) { nt_status = make_server_info_guest(NULL, server_info); } @@ -91,7 +91,7 @@ static NTSTATUS check_name_to_ntstatus_security(const struct auth_context *auth_ fstring user; long error_num; - DEBUG(10, ("Check auth for: [%s]\n", user_info->internal_username)); + DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name)); fstrcpy(user, user_info->client.account_name); diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index ec6b3ea059..30d81a6c12 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -393,7 +393,7 @@ static NTSTATUS check_ntdomain_security(const struct auth_context *auth_context, return NT_STATUS_INVALID_PARAMETER; } - DEBUG(10, ("Check auth for: [%s]\n", user_info->internal_username)); + DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name)); /* * Check that the requested domain is not our own machine name. @@ -463,7 +463,7 @@ static NTSTATUS check_trustdomain_security(const struct auth_context *auth_conte return NT_STATUS_INVALID_PARAMETER; } - DEBUG(10, ("Check auth for: [%s]\n", user_info->internal_username)); + DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name)); /* * Check that the requested domain is not our own machine name or domain name. diff --git a/source3/auth/auth_netlogond.c b/source3/auth/auth_netlogond.c index 7fea6a53fa..bb900ce4a2 100644 --- a/source3/auth/auth_netlogond.c +++ b/source3/auth/auth_netlogond.c @@ -170,7 +170,7 @@ static NTSTATUS check_netlogond_security(const struct auth_context *auth_context struct named_mutex *mutex = NULL; const char *ncalrpcsock; - DEBUG(10, ("Check auth for: [%s]\n", user_info->internal_username)); + DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name)); ncalrpcsock = lp_parm_const_string( GLOBAL_SECTION_SNUM, "auth_netlogond", "socket", NULL); diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index 324295f924..97ffc28fe7 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -72,7 +72,7 @@ static NTSTATUS auth_samstrict_auth(const struct auth_context *auth_context, return NT_STATUS_LOGON_FAILURE; } - DEBUG(10, ("Check auth for: [%s]\n", user_info->internal_username)); + DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name)); is_local_name = is_myname(user_info->domain); is_my_domain = strequal(user_info->domain, lp_workgroup()); diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c index 9d31905d6b..f50f37a6ff 100644 --- a/source3/auth/auth_server.c +++ b/source3/auth/auth_server.c @@ -281,7 +281,7 @@ static NTSTATUS check_smbserver_security(const struct auth_context *auth_context NTSTATUS nt_status = NT_STATUS_NOT_IMPLEMENTED; bool locally_made_cli = False; - DEBUG(10, ("Check auth for: [%s]\n", user_info->internal_username)); + DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name)); cli = state->cli; @@ -427,7 +427,7 @@ use this machine as the password server.\n")); fstring real_username; struct passwd *pass; - if ( (pass = smb_getpwnam( NULL, user_info->internal_username, + if ( (pass = smb_getpwnam( NULL, user_info->mapped.account_name, real_username, True )) != NULL ) { /* if a real user check pam account restrictions */ diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c index 2bc2b06f15..c94ec2f1e0 100644 --- a/source3/auth/auth_unix.c +++ b/source3/auth/auth_unix.c @@ -91,15 +91,15 @@ static NTSTATUS check_unix_security(const struct auth_context *auth_context, NTSTATUS nt_status; struct passwd *pass = NULL; - DEBUG(10, ("Check auth for: [%s]\n", user_info->internal_username)); + DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name)); become_root(); - pass = Get_Pwnam_alloc(talloc_tos(), user_info->internal_username); + pass = Get_Pwnam_alloc(talloc_tos(), user_info->mapped.account_name); /** @todo This call assumes a ASCII password, no charset transformation is done. We may need to revisit this **/ nt_status = pass_check(pass, - pass ? pass->pw_name : user_info->internal_username, + pass ? pass->pw_name : user_info->mapped.account_name, (char *)user_info->plaintext_password.data, user_info->plaintext_password.length-1, lp_update_encrypted() ? diff --git a/source3/auth/auth_wbc.c b/source3/auth/auth_wbc.c index cbdcb86182..4242193af0 100644 --- a/source3/auth/auth_wbc.c +++ b/source3/auth/auth_wbc.c @@ -61,7 +61,7 @@ static NTSTATUS check_wbc_security(const struct auth_context *auth_context, } /* Send off request */ - DEBUG(10, ("Check auth for: [%s]", user_info->internal_username)); + DEBUG(10, ("Check auth for: [%s]", user_info->mapped.account_name)); params.account_name = user_info->client.account_name; params.domain_name = user_info->domain; @@ -73,13 +73,13 @@ static NTSTATUS check_wbc_security(const struct auth_context *auth_context, /* Handle plaintext */ if (!user_info->encrypted) { DEBUG(3,("Checking plaintext password for %s.\n", - user_info->internal_username)); + user_info->mapped.account_name)); params.level = WBC_AUTH_USER_LEVEL_PLAIN; params.password.plaintext = (char *)user_info->plaintext_password.data; } else { DEBUG(3,("Checking encrypted password for %s.\n", - user_info->internal_username)); + user_info->mapped.account_name)); params.level = WBC_AUTH_USER_LEVEL_RESPONSE; memcpy(params.password.response.challenge, diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c index 49ae3a9364..6d4b889ca9 100644 --- a/source3/auth/auth_winbind.c +++ b/source3/auth/auth_winbind.c @@ -43,11 +43,11 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, return NT_STATUS_INVALID_PARAMETER; } - DEBUG(10, ("Check auth for: [%s]", user_info->internal_username)); + DEBUG(10, ("Check auth for: [%s]", user_info->mapped.account_name)); if (!auth_context) { DEBUG(3,("Password for user %s cannot be checked because we have no auth_info to get the challenge from.\n", - user_info->internal_username)); + user_info->mapped.account_name)); return NT_STATUS_INVALID_PARAMETER; } diff --git a/source3/auth/check_samsec.c b/source3/auth/check_samsec.c index a60d124cb4..04ec10f1e8 100644 --- a/source3/auth/check_samsec.c +++ b/source3/auth/check_samsec.c @@ -388,12 +388,12 @@ NTSTATUS check_sam_security(const DATA_BLOB *challenge, /* get the account information */ become_root(); - ret = pdb_getsampwnam(sampass, user_info->internal_username); + ret = pdb_getsampwnam(sampass, user_info->mapped.account_name); unbecome_root(); if (ret == False) { DEBUG(3,("check_sam_security: Couldn't find user '%s' in " - "passdb.\n", user_info->internal_username)); + "passdb.\n", user_info->mapped.account_name)); TALLOC_FREE(sampass); return NT_STATUS_NO_SUCH_USER; } diff --git a/source3/auth/user_info.c b/source3/auth/user_info.c index 09c780c7f8..ca492d4135 100644 --- a/source3/auth/user_info.c +++ b/source3/auth/user_info.c @@ -58,8 +58,8 @@ NTSTATUS make_user_info(struct auth_usersupplied_info **user_info, return NT_STATUS_NO_MEMORY; } - (*user_info)->internal_username = SMB_STRDUP(internal_username); - if ((*user_info)->internal_username == NULL) { + (*user_info)->mapped.account_name = SMB_STRDUP(internal_username); + if ((*user_info)->mapped.account_name == NULL) { free_user_info(user_info); return NT_STATUS_NO_MEMORY; } @@ -118,7 +118,7 @@ void free_user_info(struct auth_usersupplied_info **user_info) (*user_info)->client.account_name)); } SAFE_FREE((*user_info)->client.account_name); - SAFE_FREE((*user_info)->internal_username); + SAFE_FREE((*user_info)->mapped.account_name); SAFE_FREE((*user_info)->client_domain); SAFE_FREE((*user_info)->domain); SAFE_FREE((*user_info)->workstation_name); diff --git a/source3/include/auth.h b/source3/include/auth.h index e7f8e54dd4..7a69e46c3c 100644 --- a/source3/include/auth.h +++ b/source3/include/auth.h @@ -29,7 +29,7 @@ struct auth_usersupplied_info { bool encrypted; struct { char *account_name; /* username before mapping */ - } client; + } client, mapped; bool was_mapped; /* Did the username map actually match? */ char *client_domain; /* domain name string */ |