-/*
+/*
Unix SMB/CIFS implementation.
Password and authentication handling
Copyright (C) Andrew Bartlett 2001-2002
Copyright (C) Stefan Metzmacher 2005
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/***************************************************************************
Set a fixed challenge
***************************************************************************/
-_PUBLIC_ NTSTATUS auth_context_set_challenge(struct auth4_context *auth_ctx, const uint8_t chal[8], const char *set_by)
+_PUBLIC_ NTSTATUS auth_context_set_challenge(struct auth4_context *auth_ctx, const uint8_t chal[8], const char *set_by)
{
auth_ctx->challenge.set_by = talloc_strdup(auth_ctx, set_by);
NT_STATUS_HAVE_NO_MEMORY(auth_ctx->challenge.set_by);
{
if (auth_ctx->challenge.data.length == 8) {
- DEBUG(5, ("auth_get_challenge: returning previous challenge by module %s (normal)\n",
+ DEBUG(5, ("auth_get_challenge: returning previous challenge by module %s (normal)\n",
auth_ctx->challenge.set_by));
memcpy(chal, auth_ctx->challenge.data.data, 8);
return NT_STATUS_OK;
* interesting details in the user_info_dc struct.
*
* The return value takes precedence over the contents of the user_info_dc
- * struct. When the return is other than NT_STATUS_OK the contents
+ * struct. When the return is other than NT_STATUS_OK the contents
* of that structure is undefined.
*
- * @param auth_ctx Supplies the challenges and some other data.
- * Must be created with auth_context_create(), and the challenges should be
- * filled in, either at creation or by calling the challenge generation
- * function auth_get_challenge().
+ * @param auth_ctx Supplies the challenges and some other data.
+ * Must be created with auth_context_create(), and the challenges should be
+ * filled in, either at creation or by calling the challenge generation
+ * function auth_get_challenge().
*
* @param user_info Contains the user supplied components, including the passwords.
*
_PUBLIC_ NTSTATUS auth_check_password(struct auth4_context *auth_ctx,
TALLOC_CTX *mem_ctx,
- const struct auth_usersupplied_info *user_info,
+ const struct auth_usersupplied_info *user_info,
struct auth_user_info_dc **user_info_dc,
uint8_t *pauthoritative)
{
* interesting details in the user_info_dc struct.
*
* The return value takes precedence over the contents of the user_info_dc
- * struct. When the return is other than NT_STATUS_OK the contents
+ * struct. When the return is other than NT_STATUS_OK the contents
* of that structure is undefined.
*
* @param mem_ctx The memory context the request should operate on
* async receive function
*
* The return value takes precedence over the contents of the user_info_dc
- * struct. When the return is other than NT_STATUS_OK the contents
+ * struct. When the return is other than NT_STATUS_OK the contents
* of that structure is undefined.
*
*
session_info_flags |= AUTH_SESSION_INFO_AUTHENTICATED;
}
- status = auth_generate_session_info_wrapper(auth_ctx, mem_ctx,
+ status = auth_generate_session_info_wrapper(auth_ctx, mem_ctx,
user_info_dc,
user_info_dc->info->account_name,
session_info_flags, session_info);
Make a auth_info struct for the auth subsystem
- Allow the caller to specify the methods to use, including optionally the SAM to use
***************************************************************************/
-_PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char * const *methods,
+_PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char * const *methods,
struct tevent_context *ev,
struct imessaging_context *msg,
struct loadparm_context *lp_ctx,
static int num_backends;
/*
- register a AUTH backend.
+ register a AUTH backend.
The 'name' can be later used by other backends to find the operations
structure for this backend.
const struct auth_operations *ops)
{
struct auth_operations *new_ops;
-
+
if (auth_backend_byname(ops->name) != NULL) {
/* its already registered! */
- DEBUG(0,("AUTH backend '%s' already registered\n",
+ DEBUG(0,("AUTH backend '%s' already registered\n",
ops->name));
return NT_STATUS_OBJECT_NAME_COLLISION;
}
num_backends++;
- DEBUG(3,("AUTH backend '%s' registered\n",
+ DEBUG(3,("AUTH backend '%s' registered\n",
ops->name));
return NT_STATUS_OK;
#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
STATIC_auth4_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_auth4_MODULES };
-
+
if (initialized) return NT_STATUS_OK;
initialized = true;
-
+
run_init_functions(NULL, static_init);
-
- return NT_STATUS_OK;
+
+ return NT_STATUS_OK;
}
-/*
+/*
Unix SMB/CIFS implementation.
Authentication utility functions
Copyright (C) Andrew Tridgell 1992-1998
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
-_PUBLIC_ struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx,
+_PUBLIC_ struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx)
{
NTSTATUS nt_status;
/**
* prints a struct auth_session_info security token to debug output.
*/
-void auth_session_info_debug(int dbg_lev,
+void auth_session_info_debug(int dbg_lev,
const struct auth_session_info *session_info)
{
if (!session_info) {
DEBUG(dbg_lev, ("Session Info: (NULL)\n"));
- return;
+ return;
}
security_token_debug(DBGC_AUTH, dbg_lev,