summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-12-21 07:31:15 +0000
committerobache <obache@pkgsrc.org>2014-12-21 07:31:15 +0000
commit2325f24e34e85dcd459633fe321a223aeb02b8c8 (patch)
treecf8e98f31a78195466754dfd51685a924ac2b4b9 /security
parent202ec6085b91ebdd6318154904a08bbe4521f556 (diff)
downloadpkgsrc-2325f24e34e85dcd459633fe321a223aeb02b8c8.tar.gz
Fixes build failure, checking "fixed array != NULL".
Diffstat (limited to 'security')
-rw-r--r--security/pam-af/distinfo3
-rw-r--r--security/pam-af/patches/patch-pam__af__tool_pam__af__tool.c38
2 files changed, 40 insertions, 1 deletions
diff --git a/security/pam-af/distinfo b/security/pam-af/distinfo
index 42a3125bede..c2e6d911b24 100644
--- a/security/pam-af/distinfo
+++ b/security/pam-af/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2012/04/07 01:53:18 obache Exp $
+$NetBSD: distinfo,v 1.10 2014/12/21 07:31:15 obache Exp $
SHA1 (pam_af-1.0.2.tar.bz2) = e3856a33d79beafa8d4e8cb44b19cbf79a3ed422
RMD160 (pam_af-1.0.2.tar.bz2) = 0c4163d811ba83de32e9b4633780ac76c8d10d8f
@@ -6,3 +6,4 @@ Size (pam_af-1.0.2.tar.bz2) = 17991 bytes
SHA1 (patch-aa) = 9c8e44c7b25e268777967c742a6946abe0c80316
SHA1 (patch-ab) = 2d42056f2972a34d2ec681f3c408cfdfc7c26d67
SHA1 (patch-ad) = 0f46fecfec3b920a08e2c22c14ada368214d6a69
+SHA1 (patch-pam__af__tool_pam__af__tool.c) = af061bc8766cbf8406dd7a8ce95240e708085bba
diff --git a/security/pam-af/patches/patch-pam__af__tool_pam__af__tool.c b/security/pam-af/patches/patch-pam__af__tool_pam__af__tool.c
new file mode 100644
index 00000000000..7b9f16cc667
--- /dev/null
+++ b/security/pam-af/patches/patch-pam__af__tool_pam__af__tool.c
@@ -0,0 +1,38 @@
+$NetBSD: patch-pam__af__tool_pam__af__tool.c,v 1.1 2014/12/21 07:31:15 obache Exp $
+
+* fixed array will never be NULL. check the first element instead.
+
+--- pam_af_tool/pam_af_tool.c.orig 2011-08-24 07:53:32.000000000 +0000
++++ pam_af_tool/pam_af_tool.c
+@@ -722,11 +722,11 @@ handle_rulelist(argc, argv)
+
+ printf("\t\t<locktime>%ldS</locktime>\n", hstent->locktime);
+
+- if (hstent->lock_cmd != NULL)
++ if (*hstent->lock_cmd != 0)
+ printf("\t\t<lockcmd>%s</lockcmd>\n", \
+ hstent->lock_cmd);
+
+- if (hstent->unlock_cmd != NULL)
++ if (*hstent->unlock_cmd != 0)
+ printf("\t\t<unlockcmd>%s</unlockcmd>\n", \
+ hstent->unlock_cmd);
+
+@@ -1237,7 +1237,7 @@ lock_host(host, force)
+ ((hstrec.num >= hstent->attempts) || force != 0)) {
+ hstrec.locked_for = hstent->locktime;
+ hstrec.last_attempt = time(NULL);
+- if (hstent->lock_cmd != NULL)
++ if (*hstent->lock_cmd != 0)
+ (void)exec_cmd(hstent->lock_cmd, env);
+
+ /* Free asprintf-allocated buffer */
+@@ -1326,7 +1326,7 @@ unlock_host(host, force)
+ force != 0) && hstrec.locked_for != 0) {
+ hstrec.locked_for = 0;
+ hstrec.num = 0;
+- if (hstent->unlock_cmd != NULL)
++ if (*hstent->unlock_cmd != 0)
+ (void)exec_cmd(hstent->unlock_cmd, env);
+
+ /* Free asprintf-allocated buffer */