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

INN Commit rra at isc.org
Thu Aug 1 20:09:21 UTC 2013


    Date: Thursday, August 1, 2013 @ 13:09:20
  Author: iulius
Revision: 9523

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:
  trunk/authprogs/ckpasswd.c
  trunk/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 18:51:26 UTC (rev 9522)
+++ authprogs/ckpasswd.c	2013-08-01 20:09:20 UTC (rev 9523)
@@ -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 18:51:26 UTC (rev 9522)
+++ doc/pod/news.pod	2013-08-01 20:09:20 UTC (rev 9523)
@@ -181,6 +181,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