43#define PROGRAM_NAME "digest_edirectory_auth"
56 if ((p = strchr(buf,
'\n')) !=
nullptr)
66 if ((requestData->
user = strtok(buf,
"\"")) ==
nullptr)
68 if ((requestData->
realm = strtok(
nullptr,
"\"")) ==
nullptr)
70 if ((requestData->
realm = strtok(
nullptr,
"\"")) ==
nullptr)
78 requestData->
error = 0;
82 if (requestData->
error) {
83 SEND_ERR(
"message=\"No such user\"");
86 printf(
"OK ha1=\"%s\"\n", requestData->
HHA1);
97 SEND_BH(
"message=\"Invalid line received\"");
114 setbuf(stdout,
nullptr);
#define HELPER_INPUT_BUFFER
static void ParseBuffer(char *buf, RequestData *requestData)
int main(int argc, char **argv)
static void DoOneRequest(char *buf)
static void GetHHA1(RequestData *requestData)
static void ProcessArguments(int argc, char **argv)
static void OutputHHA1(RequestData *requestData)
int LDAPArguments(int argc, char **argv)
void LDAPHHA1(RequestData *requestData)
int64_t strtoll(const char *nptr, char **endptr, int base)