INN commit: branches/2.5 (authprogs/ckpasswd.c doc/pod/news.pod)

INN Commit rra at isc.org
Thu Aug 1 20:10:57 UTC 2013


    Date: Thursday, August 1, 2013 @ 13:10:57
  Author: iulius
Revision: 9524

ckpasswd:  use Berkeley DB ndbm compatibility layer first

On a few systems like Fedora 18 ppc64, the GNU dbm library
shipped as ndbm.h is not usable.

ckpasswd.c: In function 'password_dbm':
ckpasswd.c:165:5: warning: passing argument 1 of 'dbm_open' discards 'const' qualifier from pointer target type [enabled by default]
     database = dbm_open(file, O_RDONLY, 0600);
     ^
In file included from ckpasswd.c:30:0:
/usr/include/ndbm.h:55:14: note: expected 'char *' but argument is of type 'const char *'
 extern DBM  *dbm_open (char *file, int flags, int mode);
              ^
ckpasswd.o: In function `password_dbm':
/home/iulius/autobuild/inn/authprogs/ckpasswd.c:165: undefined reference to `dbm_open'
/home/iulius/autobuild/inn/authprogs/ckpasswd.c:170: undefined reference to `dbm_fetch'
/home/iulius/autobuild/inn/authprogs/ckpasswd.c:177: undefined reference to `dbm_close'
/home/iulius/autobuild/inn/authprogs/ckpasswd.c:172: undefined reference to `dbm_close'
collect2: error: ld returned 1 exit status

Modified:
  branches/2.5/authprogs/ckpasswd.c
  branches/2.5/doc/pod/news.pod

----------------------+
 authprogs/ckpasswd.c |   11 ++++++++---
 doc/pod/news.pod     |    6 ++++++
 2 files changed, 14 insertions(+), 3 deletions(-)

Modified: authprogs/ckpasswd.c
===================================================================
--- authprogs/ckpasswd.c	2013-08-01 20:09:20 UTC (rev 9523)
+++ authprogs/ckpasswd.c	2013-08-01 20:10:57 UTC (rev 9524)
@@ -25,12 +25,17 @@
 #include <pwd.h>
 #include <grp.h>
 
+
+/*
+**  If compiling with Berkeley DB, use its ndbm compatibility layer
+**  in preference to other libraries.
+*/
 #if defined(HAVE_DBM) || defined(HAVE_BDB_DBM)
-# if HAVE_NDBM_H
-#  include <ndbm.h>
-# elif HAVE_BDB_DBM
+# if HAVE_BDB_DBM
 #  define DB_DBM_HSEARCH 1
 #  include <db.h>
+# elif HAVE_NDBM_H
+#  include <ndbm.h>
 # elif HAVE_GDBM_NDBM_H
 #  include <gdbm-ndbm.h>
 # elif HAVE_DB1_NDBM_H

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2013-08-01 20:09:20 UTC (rev 9523)
+++ doc/pod/news.pod	2013-08-01 20:10:57 UTC (rev 9524)
@@ -52,6 +52,12 @@
 
 =item *
 
+If compiling with S<Berkeley DB>, use its ndbm compatibility layer for
+B<ckpasswd> in preference to the GNU dbm library that appears to be
+broken on a few systems.
+
+=item *
+
 Fixed a Perl warning in B<inncheck>; using C<defined(@array)> has been
 deprecated since S<Perl 5.16>.
 



More information about the inn-committers mailing list