00001 /* 00002 Unix SMB/CIFS implementation. 00003 Password and authentication handling 00004 Copyright (C) Andrew Bartlett 2001 00005 Copyright (C) Jelmer Vernooij 2003 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00020 */ 00021 00022 #include "includes.h" 00023 00024 #undef DBGC_CLASS 00025 #define DBGC_CLASS DBGC_AUTH 00026 00027 static NTSTATUS check_skel_security(const struct auth_context *auth_context, 00028 void *my_private_data, 00029 TALLOC_CTX *mem_ctx, 00030 const auth_usersupplied_info *user_info, 00031 auth_serversupplied_info **server_info) 00032 { 00033 if (!user_info || !auth_context) { 00034 return NT_STATUS_LOGON_FAILURE; 00035 } 00036 00037 /* Insert your authentication checking code here, 00038 * and return NT_STATUS_OK if authentication succeeds */ 00039 00040 /* For now, just refuse all connections */ 00041 return NT_STATUS_LOGON_FAILURE; 00042 } 00043 00044 /* module initialisation */ 00045 NTSTATUS auth_init_skel(struct auth_context *auth_context, const char *param, auth_methods **auth_method) 00046 { 00047 if (!make_auth_methods(auth_context, auth_method)) { 00048 return NT_STATUS_NO_MEMORY; 00049 } 00050 00051 (*auth_method)->auth = check_skel_security; 00052 (*auth_method)->name = "skel"; 00053 return NT_STATUS_OK; 00054 } 00055 00056 NTSTATUS init_module(void) 00057 { 00058 return smb_register_auth(AUTH_INTERFACE_VERSION, "skel", auth_init_skel); 00059 }