--without-pam disable pam support
--without-shadow disable shadow support
- --without-timestamp disable timestamp support
+ --with-timestamp enable timestamp support
--help, -h display this help and exit
EOF
}
authmethod() {
- #
- # Check for bsd_auth.h.
- #
- src='
-#include <bsd_auth.h>
-int main(void) {
- return 0;
-}'
- check_func "bsd_auth_h" "$src" && {
- have_bsd_auth_h=1
- printf 'bsd\n'
- return 0
- }
-
#
# Check for pam_appl.h.
#
[ -z "$WITHOUT_PAM" ] && check_func "pam_appl_h" "$src" && {
printf 'SRCS += pam.c\n' >>$CONFIG_MK
printf 'LDFLAGS += -lpam\n' >>$CONFIG_MK
+ printf 'CPPFLAGS += -DUSE_PAM\n' >>$CONFIG_MK
printf 'pam\n'
return 0
}
return 0;
}'
[ -z "$WITHOUT_SHADOW" ] && check_func "shadow_h" "$src" && {
+ printf 'SRCS += shadow.c\n' >>$CONFIG_MK
printf 'LDFLAGS += -lcrypt\n' >>$CONFIG_MK
+ printf 'CPPFLAGS += -DUSE_SHADOW\n' >>$CONFIG_MK
printf 'shadow\n'
return 0
}
persistmethod() {
[ -z "$WITHOUT_TIMESTAMP" ] && {
- printf 'CFLAGS += -DPERSIST_TIMESTAMP\n' >>$CONFIG_MK
- printf 'SRCS += persist_timestamp.c\n' >>$CONFIG_MK
+ printf 'CPPFLAGS += -DUSE_TIMESTAMP\n' >>$CONFIG_MK
+ printf 'SRCS += timestamp.c\n' >>$CONFIG_MK
printf 'timestamp\n'
return 0
}
printf 'OPENBSD += setresuid.o\n' >>$CONFIG_MK
}
-#
-# Check for pledge().
-#
-src='
-#include <unistd.h>
-int main(void) {
- pledge("", NULL);
- return 0;
-}'
-check_func "pledge" "$src" || {
- printf 'OPENBSD += pledge-noop.o\n' >>$CONFIG_MK
-}
-
#
# Check for closefrom().
#