freebsd-ports/net/tac_plus-libradius/files/patch-pwlib.c
Olli Hauer a7c2ab5fef - fix build on FreeBSD9
( "struct utmp" was replaced with "struct utmpx" on FreeBSD-9 )

PR:		ports/160264
Submitted by:	ohauer
Approved by:	maintainer timeout
2011-09-20 22:04:09 +00:00

34 lines
809 B
C

--- ./pwlib.c.orig 2001-03-16 14:42:54.000000000 +0100
+++ ./pwlib.c 2011-08-29 00:31:55.000000000 +0200
@@ -40,6 +40,10 @@
#include "ldap.h"
#endif /* LDAP */
+#ifdef USE_RADIUS
+#include "radius.h"
+#endif
+
/* Generic password verification routines for des, file and cleartext
passwords */
@@ -177,6 +181,20 @@
break;
#endif
+#ifdef USE_RADIUS
+ case (S_radius):
+ if (radius_verify(name,passwd,file)==1) {
+ data->status = TAC_PLUS_AUTHEN_STATUS_FAIL;
+ return (0);
+ } else {
+ data->status = TAC_PLUS_AUTHEN_STATUS_PASS;
+ }
+ exp_date = NULL;
+ set_expiration_status(exp_date, data);
+ return (data->status == TAC_PLUS_AUTHEN_STATUS_PASS);
+ break;
+#endif
+
#ifdef USE_PAM
case (S_pam):