Squid Web Cache
v8/master
Loading...
Searching...
No Matches
valid.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2026 The Squid Software Foundation and contributors
3
*
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.
7
*/
8
9
/*
10
NT_auth - Version 2.0
11
12
Modified to act as a Squid authenticator module.
13
Returns OK for a successful authentication, or ERR upon error.
14
15
Guido Serassio, Torino - Italy
16
17
Uses code from -
18
Antonino Iannella 2000
19
Andrew Tridgell 1997
20
Richard Sharpe 1996
21
Bill Welliver 1999
22
23
* Distributed freely under the terms of the GNU General Public License,
24
* version 2 or later. See the file COPYING for licensing details
25
*
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.
30
*
31
* You should have received a copy of the GNU General Public License along
32
* with this program; if not, see <https://www.gnu.org/licenses/>.
33
*/
34
35
#ifndef SQUID_SRC_AUTH_BASIC_SSPI_VALID_H
36
#define SQUID_SRC_AUTH_BASIC_SSPI_VALID_H
37
38
#include "
sspi/sspwin32.h
"
39
40
#include <lm.h>
41
#include <sys/types.h>
42
#undef debug
43
44
/************* CONFIGURATION ***************/
45
/* SMB User verification function */
46
47
#define NTV_NO_ERROR 0
48
#define NTV_SERVER_ERROR 1
49
#define NTV_GROUP_ERROR 2
50
#define NTV_LOGON_ERROR 3
51
52
#ifndef LOGON32_LOGON_NETWORK
53
#define LOGON32_LOGON_NETWORK 3
54
#endif
55
56
#define NTV_DEFAULT_DOMAIN "."
57
58
extern
char
*
NTAllowedGroup
;
59
extern
char
*
NTDisAllowedGroup
;
60
extern
int
UseDisallowedGroup
;
61
extern
int
UseAllowedGroup
;
62
extern
int
debug_enabled
;
63
extern
char
Default_NTDomain
[DNLEN+1];
64
extern
const
char
*
errormsg
;
65
74
int
Valid_User
(
char
*UserName,
char
*Password,
char
*Group);
75
76
/* Debugging stuff */
77
#if defined(__GNUC__)
/* this is really a gcc-ism */
78
#include <
unistd.h
>
79
static
char
*__foo;
80
#define debug(X...) if (debug_enabled) { \
81
fprintf(stderr,"nt_auth[%d](%s:%d): ", getpid(), \
82
((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\
83
__LINE__);\
84
fprintf(stderr,X); }
85
#else
/* __GNUC__ */
86
static
void
87
debug
(
char
*format,...)
88
{
89
if
(
debug_enabled
) {
90
va_list args;
91
92
va_start(args,format);
93
fprintf(stderr,
"nt_auth[%d]: "
,getpid());
94
vfprintf(stderr, format, args);
95
va_end(args);
96
}
97
}
98
#endif
/* __GNUC__ */
99
100
#endif
/* SQUID_SRC_AUTH_BASIC_SSPI_VALID_H */
101
sspwin32.h
unistd.h
debug_enabled
int debug_enabled
Definition
debug.cc:13
NTAllowedGroup
char * NTAllowedGroup
Definition
basic_sspi_auth.cc:45
Valid_User
int Valid_User(char *UserName, char *Password, char *Group)
Definition
valid.cc:119
UseAllowedGroup
int UseAllowedGroup
Definition
basic_sspi_auth.cc:48
debug
static void debug(char *format,...)
Definition
valid.h:87
NTDisAllowedGroup
char * NTDisAllowedGroup
Definition
basic_sspi_auth.cc:46
UseDisallowedGroup
int UseDisallowedGroup
Definition
basic_sspi_auth.cc:47
errormsg
const char * errormsg
Definition
valid.cc:43
Default_NTDomain
char Default_NTDomain[DNLEN+1]
Definition
valid.cc:42
squid
src
auth
basic
SSPI
valid.h
Generated by
1.9.8