]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/basic/SSPI/valid.h
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
12 Modified to act as a Squid authenticator module.
13 Returns OK for a successful authentication, or ERR upon error.
15 Guido Serassio, Torino - Italy
18 Antonino Iannella 2000
23 * Distributed freely under the terms of the GNU General Public License,
24 * version 2 or later. See the file COPYING for licensing details
26 * This program is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU General Public License for more details.
31 * You should have received a copy of the GNU General Public License
32 * along with this program; if not, write to the Free Software
33 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
36 #ifndef SQUID_SRC_AUTH_BASIC_SSPI_VALID_H
37 #define SQUID_SRC_AUTH_BASIC_SSPI_VALID_H
39 #include "sspi/sspwin32.h"
42 #include <sys/types.h>
45 /************* CONFIGURATION ***************/
46 /* SMB User verification function */
48 #define NTV_NO_ERROR 0
49 #define NTV_SERVER_ERROR 1
50 #define NTV_GROUP_ERROR 2
51 #define NTV_LOGON_ERROR 3
53 #ifndef LOGON32_LOGON_NETWORK
54 #define LOGON32_LOGON_NETWORK 3
57 #define NTV_DEFAULT_DOMAIN "."
59 extern char * NTAllowedGroup
;
60 extern char * NTDisAllowedGroup
;
61 extern int UseDisallowedGroup
;
62 extern int UseAllowedGroup
;
63 extern int debug_enabled
;
64 extern char Default_NTDomain
[DNLEN
+1];
65 extern const char * errormsg
;
68 * Valid_User return codes.
70 * \retval 0 User authenticated successfully.
71 * \retval 1 Server error.
72 * \retval 2 Group membership error.
73 * \retval 3 Logon error; Incorrect password or username given.
75 int Valid_User(char *UserName
, char *Password
, char *Group
);
78 #if defined(__GNUC__) /* this is really a gcc-ism */
81 #define debug(X...) if (debug_enabled) { \
82 fprintf(stderr,"nt_auth[%d](%s:%d): ", getpid(), \
83 ((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\
88 debug(char *format
,...)
93 va_start(args
,format
);
94 fprintf(stderr
, "nt_auth[%d]: ",getpid());
95 vfprintf(stderr
, format
, args
);
101 #endif /* SQUID_SRC_AUTH_BASIC_SSPI_VALID_H */