48#error NON WINDOWS PLATFORM
67 fprintf(stderr,
"Usage:\n%s [-A|D UserGroup][-O DefaultDomain][-d]\n"
68 "-A can specify a Windows Local Group name allowed to authenticate\n"
69 "-D can specify a Windows Local Group name not allowed to authenticate\n"
70 "-O can specify the default Domain against to authenticate\n"
71 "-d enable debugging.\n"
72 "-h this message\n\n",
80 while (-1 != (opt =
getopt(argc, argv,
"dhA:D:O:"))) {
105 fprintf(stderr,
"FATAL: Unknown option: -%c\n", opt);
127 fprintf(stderr,
"FATAL: can't initialize SSPI, exiting.\n");
130 debug(
"SSPI initialized OK\n");
135 setbuf(stdout,
NULL);
136 setbuf(stderr,
NULL);
140 if (
NULL == strchr(wstr,
'\n')) {
151 if ((p = strchr(wstr,
'\n')) !=
NULL)
153 if ((p = strchr(wstr,
'\r')) !=
NULL)
158 sscanf(wstr,
"%s %s", username, password);
160 debug(
"Got %s from Squid\n", wstr);
163 if ((username[0] ==
'\0') || (password[0] ==
'\0')) {
171 debug(
"Trying to validate; %s %s\n", username, password);
int Valid_User(char *USERNAME, char *PASSWORD, const char *SERVER, char *, const char *DOMAIN)
char Default_NTDomain[DNLEN+1]
#define HELPER_INPUT_BUFFER
int main(int argc, char **argv)
void process_options(int argc, char *argv[])
static void usage(const char *name)
void debug(const char *format,...)
int getopt(int nargc, char *const *nargv, const char *ostr)
void rfc1738_unescape(char *url)
void UnloadSecurityDll(void)
HMODULE LoadSecurityDll(int mode, const char *SSP_Package)