Now they are configured entirely with the configure script.
Will be working on a config file option as well.
--with-timestamp enable timestamp support
- --with-kiss-insults enable kiss insults
+ --without-insults disable insults
--uid-max=NUM set UID_MAX (default 65535)
--gid-max=NUM set GID_MAX (default 65535)
# defaults
WITHOUT_TIMESTAMP=yes
-WITHOUT_KISS_INSULTS=""
UID_MAX=65535
GID_MAX=65535
--with-shadow) WITHOUT_SHADOW=; WITHOUT_PAM=yes ;;
--without-pam) WITHOUT_PAM=yes ;;
--without-shadow) WITHOUT_SHADOW=yes ;;
- --with-kiss-insults) WITH_KISS_INSULTS=yes ;;
+ --without-insults) WITHOUT_INSULTS=yes ;;
--with-timestamp) WITHOUT_TIMESTAMP= ;;
--without-timestamp) WITHOUT_TIMESTAMP=yes ;;
--uid-max) UID_MAX=$var ;;
definsults() {
printf 'SRCS += insults.c\n' >>$CONFIG_MK
- [ -n "$WITH_KISS_INSULTS" ] && {
- printf '#define DOAS_INSULTS_KISS\n' >>$CONFIG_H
+ [ -z "$WITHOUT_INSULTS" ] && {
+ printf '#define DOAS_INSULTS\n' >>$CONFIG_H
}
return 0
}
void
authfail(void)
{
+
+#ifdef DOAS_INSULTS
printf("%s\n", getinsult());
+#endif
+
errx(1, "Authentication failed");
}
#include "config.h"
char *insults[] = {
-
/*
- * These insults were stolen from the Sudo project.
+ * These insults were stolen from the Sudo project, with some additions.
* The copyright header on those files states:
* ISC license
* Copyright (c) 1996-2018Todd C. Miller <Todd.Miller@sudo.ws>
"This man, he doesn't know when he's beaten! He doesn't know when he's winning, either. He has no... sort of... sensory apparatus...",
"There's nothing wrong with you that an expensive operation can't prolong.",
"I'm very sorry, but I'm not allowed to argue unless you've paid.",
-
-#ifdef DOAS_INSULTS_KISS
- /*
- * Insults from the KISS Linux community
- */
-
- "",
-
-#endif
+ "You are being naughty this year.",
+ "A new shipment of coal is on it's way.",
+ "Santa is not amused",
};
const char *