Port to Debian Buster and OpenAFS 1.8 master debian/2.05
authorClinton Ebadi <clinton@unknownlamer.org>
Sat, 15 Feb 2020 17:40:41 +0000 (12:40 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Sat, 15 Feb 2020 17:40:41 +0000 (12:40 -0500)
libopenafs-dev links against heimdal instead of krb5 now, update
Makefile to link against that.

MAXPATHLEN is no longer defined, use POSIX PATH_MAX instead.

Makefile
debian/changelog
debian/control
nss_afs.c

index ab6f436..e02ce0d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,11 @@
 SYS=$(shell uname)
 CC=gcc
 MAJORVERSION=2
-MINORVERSION=0.3
+MINORVERSION=0.5
 LIBNAMES=libnss_afs.so.$(MAJORVERSION)
 EXTRALIBS=-lresolv
 AFSROOT=/usr
+HEIMDALLIB=/usr/lib/$(shell gcc -dumpmachine)/heimdal
 
 # LIMIT_USERNAME_CHARS=n will cut down usernames to
 # a maximum of n characters
@@ -17,8 +18,8 @@ all: $(LIBNAMES) nss_afs_test
 #      -lubik -lauth -lrxkad -lrxstat -lrx -ldes -lcom_err -laudit
 # $(AFSROOT)/lib/afs/util.a
 
-LDFLAGS=-L$(AFSROOT)/lib/afs -L$(AFSROOT)/lib -lafsauthent_pic -lafsrpc_pic -lpthread -lkrb5 \
-        -lk5crypto -lsys -lnsl $(EXTRALIBS) -g
+LDFLAGS=-L$(AFSROOT)/lib/afs -L$(AFSROOT)/lib -L$(HEIMDALLIB) -lafsauthent_pic -lafsrpc_pic -lpthread \
+        -lhcrypto -lroken -lsys -lnsl $(EXTRALIBS) -g
 
 nss_afs.o: nss_afs.c
        $(CC) $(CFLAGS) -c nss_afs.c
index f4c905d..800b6f0 100644 (file)
@@ -1,3 +1,11 @@
+libnss-afs (2.05) unstable; urgency=medium
+
+  * Update for changes in libopenafs 1.8.x, 1.8.2 is the minimum required version now
+  * Build against heimdal, drop krb5 dependencies
+  * Update packaging for Debian Buster
+
+ -- Clinton Ebadi <clinton@unknownlamer.org>  Sat, 15 Feb 2020 12:34:56 -0500
+
 libnss-afs (2.04) unstable; urgency=medium
 
   * Update for changes in libopenafs, 1.6.18 is minimum required version now
index a57ecf6..5033ba2 100755 (executable)
@@ -2,9 +2,9 @@ Source: libnss-afs
 Section: libs
 Priority: extra
 Maintainer: Adam Megacz <megacz@hcoop.net>
-Build-Depends: debhelper (>= 10.0.0), libopenafs-dev (>= 1.6.18),
- libc6-dev (>= 2.3.6), libkrb5-dev (>= 1.8)
-Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 10.0.0), libopenafs-dev (>= 1.8.2),
+ libc6-dev (>= 2.3.6), heimdal-multidev (>= 1.7~git20150920)
+Standards-Version: 4.5.0
 
 Package: libnss-afs
 Architecture: any
index 10d8a08..a9326d4 100644 (file)
--- a/nss_afs.c
+++ b/nss_afs.c
@@ -40,6 +40,7 @@
 #include <fcntl.h>
 #include <getopt.h>
 #include <grp.h>
+#include <limits.h>
 #include <netinet/in.h>
 #include <nss.h>
 #include <pthread.h>
@@ -87,8 +88,8 @@ extern struct ubik_client *pruclient;
 
 int  afs_initialized = 0;
 char cellname[MAXCELLNAMELEN];
-char homedir_prefix[MAXPATHLEN];
-char cell_root[MAXPATHLEN];
+char homedir_prefix[PATH_MAX];
+char cell_root[PATH_MAX];
 int  homedir_prefix_len=0;
 char homedirs_method=0;
 char shells_method=0;