Skip Menu |
 

Subject: kdb5_util load requires that the dumpfile be writable.
kdb5_util load requires that the dumpfile be writable. This is lame since one may want to
restore one's database from read-only backup media (such as a CD).

The code responsible for this bug is in krb5/src/kadmin/dbutil/dump.c in load_db(). I believe
the dumpfile is only being opened read/write so it can be locked. If the file is read-only you
shouldn't need to lock it so this should not be a fatal error.
From: Ken Raeburn <raeburn@MIT.EDU>
Subject: Re: [krbdev.mit.edu #3218] kdb5_util load requires that the dumpfile be writable.
Date: Fri, 21 Oct 2005 19:41:10 -0400
To: rt-comment@krbdev.mit.edu
RT-Send-Cc:
On Oct 21, 2005, at 18:46, Alexandra Ellwood via RT wrote:
Show quoted text
> The code responsible for this bug is in krb5/src/kadmin/dbutil/
> dump.c in load_db(). I believe
> the dumpfile is only being opened read/write so it can be locked.
> If the file is read-only you
> shouldn't need to lock it so this should not be a fatal error.

You would want to stop another process from modifying the file while
you're in the process of reading it. On a CD, it wouldn't be an
issue, but an NFS volume mounted read-only, or a file that's had
"chmod 600" run on it during the load process, would be another matter.

But I think we can get a shared lock with read-only access, so that
should be okay.
From: tlyu@mit.edu
Subject: SVN Commit
* src/kadmin/dbutil/dump.c (load_db): Open the dumpfile as
read-only; we only get a shared lock, so no reason to open for
writing for the sake of getting a lock.

Commit By: tlyu



Revision: 18893
Changed Files:
U trunk/src/kadmin/dbutil/dump.c
From: tlyu@mit.edu
Subject: SVN Commit
pull up r18893 from trunk

r18893@cathode-dark-space: tlyu | 2006-12-01 12:09:42 -0500
ticket: 3218

* src/kadmin/dbutil/dump.c (load_db): Open the dumpfile as
read-only; we only get a shared lock, so no reason to open for
writing for the sake of getting a lock.



Commit By: tlyu



Revision: 18963
Changed Files:
_U branches/krb5-1-6/
U branches/krb5-1-6/src/kadmin/dbutil/dump.c