44#define PROGRAM_NAME "digest_ldap_auth"
57 if ((p = strchr(buf,
'\n')) !=
nullptr)
67 if ((requestData->
user = strtok(buf,
"\"")) ==
nullptr)
69 if ((requestData->
realm = strtok(
nullptr,
"\"")) ==
nullptr)
71 if ((requestData->
realm = strtok(
nullptr,
"\"")) ==
nullptr)
79 requestData->
error = 0;
83 if (requestData->
error) {
84 SEND_ERR(
"message=\"No such user\"");
87 printf(
"OK ha1=\"%s\"\n", requestData->
HHA1);
98 SEND_BH(
"message=\"Invalid line received\"");
115 setbuf(stdout,
nullptr);
static void ParseBuffer(char *buf, RequestData *requestData)
static void DoOneRequest(char *buf)
static void GetHHA1(RequestData *requestData)
static void ProcessArguments(int argc, char **argv)
static void OutputHHA1(RequestData *requestData)
#define HELPER_INPUT_BUFFER
int main(int argc, char **argv)
int LDAPArguments(int argc, char **argv)
void LDAPHHA1(RequestData *requestData)
int64_t strtoll(const char *nptr, char **endptr, int base)