INN commit: trunk/contrib (Makefile README auth_pass.c)

INN Commit rra at isc.org
Sun Sep 21 12:17:00 UTC 2014


    Date: Sunday, September 21, 2014 @ 05:17:00
  Author: iulius
Revision: 9701

Add compilation rules for contrib/auth_pass.c

Use the right socklen_t type, and add crypt.h header if available.

Modified:
  trunk/contrib/Makefile
  trunk/contrib/README
  trunk/contrib/auth_pass.c

-------------+
 Makefile    |    4 +++-
 README      |    5 +++++
 auth_pass.c |    7 ++++++-
 3 files changed, 14 insertions(+), 2 deletions(-)

Modified: Makefile
===================================================================
--- Makefile	2014-09-21 09:15:25 UTC (rev 9700)
+++ Makefile	2014-09-21 12:17:00 UTC (rev 9701)
@@ -9,7 +9,8 @@
 top           = ..
 CFLAGS        = $(GCFLAGS)
 
-ALL	      = archivegz backlogstat cleannewsgroups delayer expirectl \
+ALL	      = archivegz auth_pass backlogstat cleannewsgroups \
+		delayer expirectl \
 		findreadgroups makeexpctl makestorconf mlockfile newsresp \
 		pullart reset-cnfs respool stathist thdexpire \
 		tunefeed
@@ -35,6 +36,7 @@
 
 STORELIBS	= $(LIBSTORAGE) $(LIBINN) $(STORAGE_LIBS) $(LIBS)
 
+auth_pass:	auth_pass.o	; $(LINK) auth_pass.o $(LIBINN) $(CRYPT_LIBS)
 expirectl:	expirectl.o	; $(LINK) expirectl.o
 mlockfile:	mlockfile.o	; $(LINK) mlockfile.o
 newsresp:	newsresp.o	; $(LINK) newsresp.o $(LIBS)

Modified: README
===================================================================
--- README	2014-09-21 09:15:25 UTC (rev 9700)
+++ README	2014-09-21 12:17:00 UTC (rev 9701)
@@ -40,6 +40,11 @@
     database.  Could also be easily modified to check against any other
     type of database that Perl's DBI module can talk to.
 
+auth_pass
+
+    A sample authorization program for use with the (deprecated) AUTHINFO
+    GENERIC command in nnrpd.
+
 backlogstat
 
     Prints informations about the current state of innfeed's backlog, if

Modified: auth_pass.c
===================================================================
--- auth_pass.c	2014-09-21 09:15:25 UTC (rev 9700)
+++ auth_pass.c	2014-09-21 12:17:00 UTC (rev 9701)
@@ -39,7 +39,12 @@
 #include <netdb.h>
 #include <pwd.h>
 
+#if HAVE_CRYPT_H
+# include <crypt.h>
+#endif
 
+
+int
 main(int argc, char** argv)
 /*+
  * Abstract:
@@ -64,7 +69,7 @@
  */
 {
     struct hostent *	hp;
-    int			length;
+    socklen_t			length;
     char		password[256];
     char		peername[1024];
     struct passwd *	pwd;



More information about the inn-committers mailing list