}
/****************************************************************************
- Create a guest user_info blob, for anonymous authenticaion.
+ Create a guest user_info blob, for anonymous authentication.
****************************************************************************/
bool make_user_info_guest(const struct tsocket_address *remote_address,
return NT_STATUS_LOGON_FAILURE;
}
- session_info = make_auth_session_info(mem_ctx);
+ session_info = talloc_zero(mem_ctx, struct auth_session_info);
if (!session_info) {
return NT_STATUS_NO_MEMORY;
}
return NT_STATUS_NO_MEMORY;
}
- session_info->unix_info->guest = server_info->guest;
session_info->unix_info->system = server_info->system;
if (session_key) {
return NT_STATUS_NO_SUCH_USER;
}
- /* Set acount name */
+ /* Set account name */
tmp = talloc_strdup(mem_ctx, pwd->pw_name);
if (tmp == NULL) {
return NT_STATUS_NO_MEMORY;
/* Primary gid */
info3->base.primary_gid = BUILTIN_RID_GUESTS;
+ /* Set as guest */
+ info3->base.user_flags = NETLOGON_GUEST;
+
TALLOC_FREE(pwd);
return NT_STATUS_OK;
}
The resulting structure is a 'session_info' because
create_local_token() has already been called on it. This is quite
- nasty, as the auth subsystem isn't expect this, but the behaviour is
+ nasty, as the auth subsystem isn't expect this, but the behavior is
left as-is for now.
***************************************************************************/
/* This should not be done here (we should produce a server
* info, and later construct a session info from it), but for
- * now this does not change the previous behaviours */
+ * now this does not change the previous behavior */
status = create_local_token(tmp_ctx, *server_info, NULL, session_info);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("create_local_token failed: %s\n",
/* This element must be provided to convert back to an auth_serversupplied_info */
SMB_ASSERT(src->unix_info);
- dst->guest = src->unix_info->guest;
- dst->system = src->unix_info->system;
+ dst->guest = true;
+ dst->system = false;
/* This element must be provided to convert back to an
- * auth_serversupplied_info. This needs to be from hte
+ * auth_serversupplied_info. This needs to be from the
* auth_session_info because the group values in particular
* may change during create_local_token() processing */
SMB_ASSERT(src->unix_token);
*pwd = passwd;
- /* This is pointless -- there is no suport for differing
+ /* This is pointless -- there is no support for differing
unix and windows names. Make sure to always store the
one we actually looked up and succeeded. Have I mentioned
why I hate the 'winbind use default domain' parameter?
result->utok.gid = pwd->pw_gid;
/* We can't just trust that the primary group sid sent us is something
- * we can really use. Obtain the useable sid, and store the original
+ * we can really use. Obtain the usable sid, and store the original
* one as an additional group if it had to be replaced */
nt_status = get_primary_group_sid(mem_ctx, found_username,
&pwd, &group_sid);