s3:auth: rename "guest" methods to "anonymous"
authorStefan Metzmacher <metze@samba.org>
Thu, 1 Mar 2018 14:04:17 +0000 (15:04 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 19 Mar 2018 19:30:49 +0000 (20:30 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/auth/auth.c
source3/auth/auth_builtin.c

index 4df74f9f39fc38a328851c5aacd80c86b6ce68f5..e0011a47eb333a499a4b478d55dce8c035a92b87 100644 (file)
@@ -513,20 +513,20 @@ NTSTATUS make_auth3_context_for_ntlm(TALLOC_CTX *mem_ctx,
                break;
        case ROLE_DOMAIN_MEMBER:
                DEBUG(5,("Making default auth method list for server role = 'domain member'\n"));
-               methods = "guest sam winbind sam_ignoredomain";
+               methods = "anonymous sam winbind sam_ignoredomain";
                break;
        case ROLE_DOMAIN_BDC:
        case ROLE_DOMAIN_PDC:
                DEBUG(5,("Making default auth method list for DC\n"));
-               methods = "guest sam winbind sam_ignoredomain";
+               methods = "anonymous sam winbind sam_ignoredomain";
                break;
        case ROLE_STANDALONE:
                DEBUG(5,("Making default auth method list for server role = 'standalone server', encrypt passwords = yes\n"));
                if (lp_encrypt_passwords()) {
-                       methods = "guest sam_ignoredomain";
+                       methods = "anonymous sam_ignoredomain";
                } else {
                        DEBUG(5,("Making default auth method list for server role = 'standalone server', encrypt passwords = no\n"));
-                       methods = "guest unix";
+                       methods = "anonymous unix";
                }
                break;
        default:
index a2d95a77330fe193b0ec140e6627e57303648f0a..8a5c4b747234857f5e7a2591906852b97989fcb6 100644 (file)
 #define DBGC_CLASS DBGC_AUTH
 
 /**
- * Return a guest logon for guest users (username = "")
+ * Return a guest logon for anonymous users (username = "")
  *
  * Typically used as the first module in the auth chain, this allows
  * guest logons to be dealt with in one place.  Non-guest logons 'fail'
  * and pass onto the next module.
  **/
 
-static NTSTATUS check_guest_security(const struct auth_context *auth_context,
-                                    void *my_private_data, 
-                                    TALLOC_CTX *mem_ctx,
-                                    const struct auth_usersupplied_info *user_info,
-                                    struct auth_serversupplied_info **server_info)
+static NTSTATUS check_anonymous_security(const struct auth_context *auth_context,
+                               void *my_private_data,
+                               TALLOC_CTX *mem_ctx,
+                               const struct auth_usersupplied_info *user_info,
+                               struct auth_serversupplied_info **server_info)
 {
        DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name));
 
@@ -86,7 +86,7 @@ static NTSTATUS check_guest_security(const struct auth_context *auth_context,
 
 /* Guest modules initialisation */
 
-static NTSTATUS auth_init_guest(struct auth_context *auth_context, const char *options, auth_methods **auth_method) 
+static NTSTATUS auth_init_anonymous(struct auth_context *auth_context, const char *options, auth_methods **auth_method)
 {
        struct auth_methods *result;
 
@@ -94,8 +94,8 @@ static NTSTATUS auth_init_guest(struct auth_context *auth_context, const char *o
        if (result == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
-       result->auth = check_guest_security;
-       result->name = "guest";
+       result->auth = check_anonymous_security;
+       result->name = "anonymous";
 
         *auth_method = result;
        return NT_STATUS_OK;
@@ -169,7 +169,7 @@ static NTSTATUS auth_init_name_to_ntstatus(struct auth_context *auth_context, co
 
 NTSTATUS auth_builtin_init(TALLOC_CTX *mem_ctx)
 {
-       smb_register_auth(AUTH_INTERFACE_VERSION, "guest", auth_init_guest);
+       smb_register_auth(AUTH_INTERFACE_VERSION, "anonymous", auth_init_anonymous);
 #ifdef DEVELOPER
        smb_register_auth(AUTH_INTERFACE_VERSION, "name_to_ntstatus", auth_init_name_to_ntstatus);
 #endif