/*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
#include "squid.h"
#include "base64.h"
-#include "helpers/defines.h"
+#include "helper/protocol_defines.h"
#include "ntlmauth/ntlmauth.h"
#include "ntlmauth/support_bits.cci"
#include "sspwin32.h"
debug("LsaQueryInformationPolicy Error: %ld\n", status);
} else {
- /* Get name in useable format */
+ /* Get name in usable format */
DomainName = AllocStrFromLSAStr(ppdiDomainInfo->Name);
/*
break;
case 'h':
usage();
- exit(0);
+ exit(EXIT_SUCCESS);
case '?':
opt = optopt;
/* fall thru to default */
}
}
if (had_error)
- exit(1);
+ exit(EXIT_FAILURE);
}
static bool
{
struct base64_decode_ctx ctx;
base64_decode_init(&ctx);
- if (!base64_decode_update(&ctx, decodedLen, decoded, strlen(buf), reinterpret_cast<const uint8_t*>(buf)) ||
+ if (!base64_decode_update(&ctx, decodedLen, decoded, strlen(buf), buf) ||
!base64_decode_final(&ctx)) {
SEND_BH("message=\"base64 decode failed\"");
fprintf(stderr, "ERROR: base64 decoding failed for: '%s'\n", buf);
char *c = static_cast<char*>(memchr(buf, '\n', sizeof(buf)));
if (c) {
if (oversized) {
- helperfail("messge=\"illegal request received\"");
+ helperfail("message=\"illegal request received\"");
fprintf(stderr, "Illegal request received: '%s'\n", buf);
return 1;
}
if (LoadSecurityDll(SSP_NTLM, NTLM_PACKAGE_NAME) == NULL) {
fprintf(stderr, "FATAL, can't initialize SSPI, exiting.\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
debug("SSPI initialized OK\n");
while (manage_request()) {
/* everything is done within manage_request */
}
- exit(0);
+ return EXIT_SUCCESS;
}