Skip Menu |
 

Date: Tue, 25 Sep 2012 16:14:52 -0500
Subject: kdb5_util load needs an iprop safety net
From: Nico Williams <nico@cryptonector.com>
To: krb5-bugs@mit.edu
kdb5_util load should not accept non-iprop dumps when a) iprop
is enabled and b) there exists a ulog (or possibly: there exists
a ulog with actual first and last sno/timestamp values).
From: ghudson@mit.edu
Subject: SVN Commit

kdb5_util load needs iprop safety net

https://github.com/krb5/krb5/commit/f6235d9bf3ca20f506c807aa0280e2e8a5ddf1ca
Author: Nicolas Williams <nico@cryptonector.com>
Committer: Greg Hudson <ghudson@mit.edu>
Commit: f6235d9bf3ca20f506c807aa0280e2e8a5ddf1ca
Branch: master
src/kadmin/dbutil/dump.c | 51 ++++++++++++++++++++++++++++++++-------------
1 files changed, 36 insertions(+), 15 deletions(-)
From: ghudson@mit.edu
Subject: SVN Commit

Fix iprop safety net in kdb5_util load

The error message was missing a newline, and the exit behavior causes
the database to be destroyed.

https://github.com/krb5/krb5/commit/b264161818eba43263b4d7f137dbae6b266907f0
Author: Greg Hudson <ghudson@mit.edu>
Commit: b264161818eba43263b4d7f137dbae6b266907f0
Branch: master
src/kadmin/dbutil/dump.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
The first patch for this issue predates the 1.11 branch and does not need
to be backported anywhere. The second patch fixes bugs in the first patch
and needs to be backported to 1.11.
From: tlyu@mit.edu
Subject: SVN Commit

Fix iprop safety net in kdb5_util load

The error message was missing a newline, and the exit behavior causes
the database to be destroyed.

(cherry picked from commit b264161818eba43263b4d7f137dbae6b266907f0)

https://github.com/krb5/krb5/commit/f16751c9806c0ef9bbbd86eaca937b364cb2ebee
Author: Greg Hudson <ghudson@mit.edu>
Committer: Tom Yu <tlyu@mit.edu>
Commit: f16751c9806c0ef9bbbd86eaca937b364cb2ebee
Branch: krb5-1.11
src/kadmin/dbutil/dump.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
I have two questions about this.

First, is the code intended to apply to masters, slaves, or both? As
the code change was written, it will apply only to masters, because
slaves always have kdb_first_time set to zero. If we want it to apply
to both, checking for kdb_last_sno != 0 would detect whether the ulog is
non-empty on the master or has ever received updates on the slave.

Second, after looking at the iprop code in detail, I'm questioning
whether the safety net is necessary or just annoying. Can I have more
detail on the reasoning behind adding it?

On the master, loading a non-iprop dump will reinitialize the ulog
header which will cause full resyncs to the slaves, which seems fine to
me. And I can certainly see wanting to restore from a backup on a
master KDC running iprop.

On a slave, loading a non-iprop dump would be weird, but perhaps kpropd
isn't working at the moment and you need to manually propagate an
update. The slave will take a full resync from the master as soon as
kpropd starts working again, since the slave's ulog header will be
reinitialized.