]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Make kdb5_util dump work with LDAP again
authorGreg Hudson <ghudson@mit.edu>
Tue, 13 Nov 2012 03:08:05 +0000 (22:08 -0500)
committerGreg Hudson <ghudson@mit.edu>
Tue, 13 Nov 2012 03:08:05 +0000 (22:08 -0500)
The LDAP module doesn't support locking.  There's code to ignore this
in load but not in dump.  dump used to only lock for iprop dumps, but
now locks all the time after e65a16d898f3a686525e83661f4fd86c76e27bbf
(#7384), causing it to fail with LDAP.

ticket: 7445 (new)
target_version: 1.11
tags: pullup

src/kadmin/dbutil/dump.c

index b15e116f37e37e05d3c666c0fdd6fc77cbd8194a..cbd2d477a4f248320b6b8d8bd1894818dbcdcef1 100644 (file)
@@ -1480,7 +1480,8 @@ dump_db(argc, argv)
          * We grab the lock twice (once again in the iterator call),
          * but that's ok since the lock func handles incr locks held.
          */
-        if (krb5_db_lock(util_context, KRB5_LOCKMODE_SHARED)) {
+        kret = krb5_db_lock(util_context, KRB5_LOCKMODE_SHARED);
+        if (kret != 0 && kret != KRB5_PLUGIN_OP_NOTSUPP) {
             fprintf(stderr,
                     _("%s: Couldn't grab lock\n"), progname);
             goto error;