Merge remote-tracking branch 'sf/master'
authorClinton Ebadi <clinton@unknownlamer.org>
Sun, 22 Apr 2018 08:42:07 +0000 (04:42 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Sun, 22 Apr 2018 08:44:12 +0000 (04:44 -0400)
19 files changed:
.gitignore [new file with mode: 0644]
AUTHORS
COPYING
COPYRIGHT [deleted file]
INSTALL
Makefile.am
NEWS [new file with mode: 0644]
NOTES [deleted file]
configure.ac [moved from configure.in with 74% similarity]
debian/changelog
debian/control
debian/libapache2-mod-waklog.docs [new file with mode: 0644]
debian/rules
debian/source/format [new file with mode: 0644]
mod_waklog.c
mod_waklog.spec [new file with mode: 0644]
regen.sh
version.c [deleted file]
waklog.conf [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..bf8869b
--- /dev/null
@@ -0,0 +1,13 @@
+/configure
+/config.log
+/config.status
+/aclocal.m4
+/autom4te.cache
+/compile
+/install-sh
+/missing
+/.libs
+Makefile
+Makefile.in
+*.o
+*.la
diff --git a/AUTHORS b/AUTHORS
index 0405ef2..5987211 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,7 +1,19 @@
-Credit goes to:
+Original credits:
 
 Jarod Malestein <jarod@umich.edu>        Initial author
 Wesley Craig    <wes@umich.edu>          Initial author
 Derrick Brashear <shadow@dementia.org>   Apache2 support
 Sean Dilda <sean@duke.edu>               umich integration
 Adam Megacz <megacz@cs.berkeley.edu>     autoconf, debianization, maintainance
+
+Post-1.0, this is being maintained as an AUTHORS file for copyright purposes;
+see https://www.gnu.org/prep/maintain/html_node/Recording-Contributors.html. In
+particular, it is not for showing the purpose or time of changes, just which
+file parts were written or modified by whom, for non-trivial contributions.
+
+Russ Allbery, Jeffrey Altman:
+  rxkad-kdf support in mod_waklog.c
+Jacob Welsh <jwelsh@sinenomine.net>:
+  Many small fixes in mod_waklog.c
+  Cleanup of Makefile.am, configure.in/ac, regen.sh
+  New files mod_waklog.spec, waklog.conf, NEWS, .gitignore
diff --git a/COPYING b/COPYING
index 3ed1e7d..49adc72 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -14,4 +14,4 @@ implied warranties of any kind.
 The University of Michigan
 c/o UM Webmaster Team
 4251 Plymouth Road
-Ann Arbor, MI 48105-2785
\ No newline at end of file
+Ann Arbor, MI 48105-2785
diff --git a/COPYRIGHT b/COPYRIGHT
deleted file mode 100644 (file)
index a3d75df..0000000
--- a/COPYRIGHT
+++ /dev/null
@@ -1,10 +0,0 @@
-Copyright 2005 Regents of The University of Michigan 
-All Rights Reserved.
-
-Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of The University of Michigan not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. This software is supplied as is without expressed or implied warranties of any kind.
-
-The University of Michigan
-c/o UM Webmaster Team
-4251 Plymouth Road
-Ann Arbor, MI 48105-2785
-
diff --git a/INSTALL b/INSTALL
index 27040f5..467a864 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,8 @@
 Installation Instructions
 
+(Ideally this would be simplified by using `make dist`, but that currently
+doesn't work.)
+
 Type:
 
    ./regen.sh
@@ -12,6 +15,10 @@ Debian:
    chmod +x debian/rules
    fakeroot dpkg-buildpackage
 
+Release archive:
 
+   git archive -o mod_waklog-$VERSION.tgz --prefix=mod_waklog-$VERSION/ $VERSION
 
+RPM:
 
+   rpmbuild -ta mod_waklog-$VERSION.tgz
dissimilarity index 74%
index f02c706..57e7b8d 100644 (file)
@@ -1,30 +1,25 @@
-all: mod_waklog.so
-
-APXS = @APXS@
-INCLUDES = -I@KRB5_INC@ -I@AFS_INC@ -I@APACHE_INC@ -I@APR_INC@
-LIB = -L@AFS_LIBS@ -L@KRB5_LIBS@ -L@APACHE_LIBS@ -lkrb5 -lk5crypto  \
-       -lafsauthent -lafsrpc -lkopenafs
-
-APXSCC = `${APXS} -q CC` \
-         @WAKLOG_DEBUG@ \
-         ${INCLUDES} \
-         -DEAPI -fPIC \
-         -g \
-         `${APXS} -q CFLAGS`
-
-VERSION: mod_waklog.c
-       date '+SVN_%Y%m%d' > VERSION
-
-version.o: version.c mod_waklog.c VERSION
-       ${APXSCC} \
-           -DVERSION=\"`cat VERSION`\" \
-           -c version.c
-
-%.o: %.c
-       ${APXSCC} -c $< -o $@
-mod_waklog.so: mod_waklog.o lifetime.o version.o
-       ${APXS} -c ${LIB} mod_waklog.o lifetime.o version.o
-
-clean:
-       rm -f *.o *.so
-       rm -f mod_waklog.so
+all: mod_waklog.so
+
+APXS = @APXS@
+AM_CPPFLAGS = -I@KRB5_INC@ -I@AFS_INC@
+LIB = -L@AFS_LIBS@ -L@KRB5_LIBS@
+LIB += -lkrb5 -lk5crypto -lafsauthent -lafsrpc -lkopenafs
+
+APXSCC = `${APXS} -q CC` \
+         @WAKLOG_DEBUG@ \
+         -DVERSION=\"@VERSION@\" \
+         ${AM_CPPFLAGS} \
+         -DEAPI -fPIC \
+         -g \
+         `${APXS} -q CFLAGS` \
+         -I`${APXS} -q INCLUDEDIR` \
+         -I`${APXS} -q APR_INCLUDEDIR`
+
+.c.o:
+       ${APXSCC} -c $< -o $@
+
+mod_waklog.so: mod_waklog.o lifetime.o
+       ${APXS} -c ${LIB} mod_waklog.o lifetime.o
+
+clean:
+       rm -f *.o *.so
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..5805cef
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,51 @@
+1.1.0
+-----
+
+General changes:
+
+* Apache 2.3 and 2.4 are now supported
+* rxkad-kdf is now supported for a DES-free KDC; the minimum required version
+  of OpenAFS is now 1.6.5
+* Compiler warnings and build errors on newer platforms have been fixed
+* The autoconf build system has been somewhat modernized and simplified
+* The three-part version number is now used consistently
+
+Security bugfixes:
+
+* Fixed a bug causing long passwords not to be fully cleared from memory
+* Fixed a possible NULL pointer dereference in error logging
+
+Contributors to this release include:
+
+* Jacob Welsh of Sine Nomine Associates (http://www.sinenomine.net/)
+* Russ Allbery and Jeffrey Altman (rxkad-kdf support)
+* Ryan Jud Hughes
+
+Older versions (former NOTES file)
+----------------------------------
+
+0.6.0:
+Initial release.
+
+0.7.0:
+Removed K4 code.
+Removed extraneous #if 0's.
+Fixed bug where mod_waklog crashed if KRB5CCNAME was null.
+
+0.8.0:
+Integrate Apache 2 support.
+
+Future releases:
+0.9.0:
+Add configuration directives for Apache conf files.
+Configure support.
+Remove ticket renewal code?  Make it an option?
+
+1.0.0:
+Features working properly.
+
+1.x.x:
+Things we haven't thought of yet.
+
+
+
diff --git a/NOTES b/NOTES
deleted file mode 100644 (file)
index a77d147..0000000
--- a/NOTES
+++ /dev/null
@@ -1,28 +0,0 @@
-
-Versions:
-
-0.6.0:
-Initial release.
-
-0.7.0:
-Removed K4 code.
-Removed extraneous #if 0's.
-Fixed bug where mod_waklog crashed if KRB5CCNAME was null.
-
-0.8.0:
-Integrate Apache 2 support.
-
-Future releases:
-0.9.0:
-Add configuration directives for Apache conf files.
-Configure support.
-Remove ticket renewal code?  Make it an option?
-
-1.0.0:
-Features working properly.
-
-1.x.x:
-Things we haven't thought of yet.
-
-
-
similarity index 74%
rename from configure.in
rename to configure.ac
index 172ce66..9900d1b 100644 (file)
@@ -1,5 +1,6 @@
-AC_INIT(mod_waklog.c)
-AM_INIT_AUTOMAKE(mod_waklog_so,1.0)
+AC_INIT([mod_waklog], [1.1.0])
+AC_CONFIG_SRCDIR([mod_waklog.c])
+AM_INIT_AUTOMAKE([foreign])
 AC_PROG_CC
 AC_PROG_INSTALL
 
@@ -15,12 +16,6 @@ AC_ARG_WITH([afs-headers],
             [AFS_INC=/usr/include/afs])
 AC_SUBST(AFS_INC)
 
-AC_ARG_WITH([apr-headers],
-            [AC_HELP_STRING([--with-apr-headers],[path to apr headers])],
-            [APR_INC=$withval],
-            [APR_INC=/usr/include/apr-1.0])
-AC_SUBST(APR_INC)
-
 AC_ARG_WITH([krb5-libs],
             [AC_HELP_STRING([--with-krb5-libs],[path to krb5 libraries])],
             [KRB5_LIBS=$withval],
@@ -39,12 +34,6 @@ AC_ARG_WITH([apache-libs],
             [APACHE_LIBS=/usr/lib/])
 AC_SUBST(APACHE_LIBS)
 
-AC_ARG_WITH([apache-headers],
-            [AC_HELP_STRING([--with-apache-headers],[path to apache headers])],
-            [APACHE_INC=$withval],
-            [APACHE_INC=/usr/include/apache2])
-AC_SUBST(APACHE_INC)
-
 AC_ARG_WITH([apxs],
             [AC_HELP_STRING([--with-apxs],[path to apxs])],
             [APXS=$withval],
index 286eb45..ff9a748 100644 (file)
@@ -1,3 +1,9 @@
+libapache-mod-waklog (1.1.0) unstable; urgency=low
+
+  * New feature and bugfix release; see NEWS for details
+
+ -- Jacob Welsh <jwelsh@sinenomine.net>  Fri, 17 Jul 2015 07:25:44 -0500
+
 libapache-mod-waklog (1.06) unstable; urgency=medium
 
   * Merge sf.net version for apache2.4 build support
dissimilarity index 68%
index 411689d..05ac05d 100644 (file)
@@ -1,15 +1,16 @@
-Source: libapache-mod-waklog
-Section: web
-Priority: optional
-Maintainer: Adam Megacz <megacz@cs.berkeley.edu>
-Build-Depends: apache2-prefork-dev, libkrb5-dev, autoconf, 
- automake, libopenafs-dev (= 1.6.1-3+deb7u1~bpo60+1) | libopenafs-dev (>=
- 1.6.6), debhelper (>= 8)
-Standards-Version: 3.9.2
-
-Package: libapache2-mod-waklog
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, apache2-mpm-prefork | apache2-mpm-itk, 
- krb5-config
-Description:  AFS Authentication for Apache2
-
+Source: libapache-mod-waklog
+Section: web
+Priority: optional
+Maintainer: Jacob Welsh <jwelsh@sinenomine.net>
+Build-Depends: debhelper (>= 8), apache2-prefork-dev, libkrb5-dev, autoconf,
+ automake, libopenafs-dev
+Standards-Version: 3.9.6
+
+Package: libapache2-mod-waklog
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description:  AFS Authentication for Apache2
+ mod_waklog is an Apache module that provides aklog-like semantics for the web.
+ mod_waklog will acquire (and store in the kernel) an AFS credential when a
+ connection is opened, use the credential for the duration of the connection,
+ and will remove the credential when the connection is closed.
diff --git a/debian/libapache2-mod-waklog.docs b/debian/libapache2-mod-waklog.docs
new file mode 100644 (file)
index 0000000..9a58ad6
--- /dev/null
@@ -0,0 +1,3 @@
+README
+AUTHORS
+NEWS
index 51840de..f62e79b 100755 (executable)
@@ -8,16 +8,13 @@ else
        CFLAGS += -O2
 endif
 
-default:binary
-
-apache20:
+build-apache2:
        dh_testdir
        chmod +x regen.sh
        ./regen.sh
        ./configure \
          --with-afs-libs=/usr/lib/afs \
          --with-afs-headers=/usr/include/afs \
-         --with-apache-headers=/usr/include/apache2 \
          --with-apxs=/usr/bin/apxs2
        make clean
        $(MAKE)
@@ -27,17 +24,24 @@ apache20:
        mkdir -p debian/libapache2-mod-waklog/etc/apache2/mods-available
        cp mod_waklog.so debian/libapache2-mod-waklog/usr/lib/apache2/modules/
        cp debian/waklog.load debian/libapache2-mod-waklog/etc/apache2/mods-available
+       touch build-apache2
 
 clean:
        dh_testdir
        dh_testroot
        rm -rf build-stamp .libs
-       -$(MAKE) clean
+       [ ! -f Makefile ] || $(MAKE) clean
+       [ ! -f Makefile ] || $(MAKE) distclean
+       rm -f aclocal.m4 configure compile install-sh missing Makefile.in mod_waklog.la mod_waklog.so
        dh_clean  --exclude ./_darcs/current/Makefile.orig --exclude ./Makefile.orig
 
-binary-indep:
+build: build-indep build-arch
+build-indep:
+build-arch: build-apache2
 
-binary-arch: apache20
+binary: binary-indep binary-arch
+binary-indep: build-indep
+binary-arch: build-arch
        dh_testdir
        dh_testroot
        dh_installchangelogs 
@@ -45,7 +49,7 @@ binary-arch: apache20
        dh_installexamples
        dh_installman
        dh_link
-       #dh_strip
+       dh_strip
        dh_compress
        dh_fixperms
        dh_installdeb
@@ -54,5 +58,4 @@ binary-arch: apache20
        dh_md5sums
        dh_builddeb
 
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary build-indep build-arch
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..89ae9db
--- /dev/null
@@ -0,0 +1 @@
+3.0 (native)
index eca89ad..614cf33 100644 (file)
@@ -1271,7 +1271,6 @@ waklog_init_handler (apr_pool_t * p, apr_pool_t * plog,
                      apr_pool_t * ptemp, server_rec * s)
 {
   int rv;
-  extern char *version;
   apr_proc_t *proc;
   waklog_config *cfg;
   void *data;
@@ -1308,7 +1307,7 @@ waklog_init_handler (apr_pool_t * p, apr_pool_t * plog,
   else
     {
       log_error (APLOG_MARK, APLOG_INFO, 0, s,
-                 "mod_waklog: version %s initialized for cell %s", version, cfg->afs_cell);
+                 "mod_waklog: version %s initialized for cell %s", VERSION, cfg->afs_cell);
 
       if ( sharedspace ) {
         log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: shared memory already allocated." );
@@ -1419,7 +1418,6 @@ waklog_init_handler (apr_pool_t * p, apr_pool_t * plog,
 static void
 waklog_init (server_rec * s, MK_POOL * p)
 {
-  extern char *version;
   int pid;
   waklog_config *cfg;
   int fd = -1;
@@ -1431,7 +1429,7 @@ waklog_init (server_rec * s, MK_POOL * p)
 #endif
 
   log_error (APLOG_MARK, APLOG_DEBUG, 0, s,
-             "mod_waklog: version %s initialized.", version);
+             "mod_waklog: version %s initialized.", VERSION);
 
   if ( sharedspace ) {
     log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: shared memory already allocated." );
diff --git a/mod_waklog.spec b/mod_waklog.spec
new file mode 100644 (file)
index 0000000..94988b2
--- /dev/null
@@ -0,0 +1,52 @@
+Name:           mod_waklog
+Version:        1.1.0
+Release:        1%{?dist}
+Summary:        Apache module allowing the web server to acquire AFS credentials
+
+Group:          System Environment/Daemons
+License:        University of Michigan
+Vendor:         Sine Nomine Associates
+URL:            http://sourceforge.net/projects/modwaklog/
+Source0:        http://sourceforge.net/projects/modwaklog/files/modwaklog/mod_waklog-%{version}.tgz
+BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+BuildRequires:  openafs-authlibs-devel httpd-devel apr-devel krb5-devel automake
+Requires:       httpd
+
+%description
+mod_waklog is an Apache module that provides aklog-like semantics
+for the web.  mod_waklog will acquire (and store in the kernel) an
+AFS credential when a connection is opened, use the credential for
+the duration of the connection, and will remove the credential when
+the connection is closed.
+
+%prep
+%setup -q
+# This goes away with a proper dist tarball; likewise BuildRequires: automake
+./regen.sh
+
+%build
+./configure --libdir=%{_libdir} --with-afs-libs=%{_libdir}/afs
+make %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules/
+install .libs/mod_waklog.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules/
+
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
+install -m 644 waklog.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%{_libdir}/httpd/modules/mod_waklog.so
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/waklog.conf
+%doc README COPYING AUTHORS NEWS
+
+%changelog
+* Wed Jul 15 2015 Jacob Welsh <jwelsh@sinenomine.net> - 1.1.0-1
+- Initial RPM package
index 0e5fd2f..715ee02 100755 (executable)
--- a/regen.sh
+++ b/regen.sh
@@ -1,7 +1,5 @@
 #!/bin/sh -e
-touch aclocal.m4
-touch INSTALL NEWS AUTHORS ChangeLog COPYING
 aclocal
 autoconf
-automake -a
-automake
\ No newline at end of file
+automake --add-missing
+automake
diff --git a/version.c b/version.c
deleted file mode 100644 (file)
index 9d8b92b..0000000
--- a/version.c
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
-* Copyright (c) 2002 Regents of The University of Michigan.
-* All Rights Reserved.  See COPYRIGHT.
-*/
-
-char *version = VERSION;
diff --git a/waklog.conf b/waklog.conf
new file mode 100644 (file)
index 0000000..65915da
--- /dev/null
@@ -0,0 +1,3 @@
+LoadModule waklog_module modules/mod_waklog.so
+
+WaklogAfsCell example.com