#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
-#include <time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
#include <ctype.h>
#include <string.h>
#include <errno.h>
if (strlen(pw) != (MD5_HEXSTRING_SIZE-1))
{
- cprintf("%d Auth string of length %d is the wrong length (should be %d).\n", ERROR, strlen(pw), MD5_HEXSTRING_SIZE-1);
+ cprintf("%d Auth string of length %ld is the wrong length (should be %d).\n", ERROR, (long)strlen(pw), MD5_HEXSTRING_SIZE-1);
return;
}
- make_apop_string(CC->usersupp.password, CC->cs_nonce, hexstring);
+ make_apop_string(CC->usersupp.password, CC->cs_nonce, hexstring, sizeof hexstring);
if (!strcmp(hexstring, pw))
{
char *Dynamic_Module_Init(void)
{
CtdlRegisterProtoHook(cmd_pas2, "PAS2", "APOP-based login");
- return "$(RCSID)";
+ return "$Id$";
}