POSIX requires a file be opened read-write for locking
authorRichard Basch <probe@mit.edu>
Wed, 6 Mar 1996 21:39:17 +0000 (21:39 +0000)
committerRichard Basch <probe@mit.edu>
Wed, 6 Mar 1996 21:39:17 +0000 (21:39 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7597 dc483132-0cff-0310-8789-dd5450dbe970

src/admin/edit/dump.c

index 405074c884755bb6dc5bfaa101287fa4e96a19fe..2f6ed577c1cf22fa321ef85abaa6db075e0fb9df 100644 (file)
@@ -1644,7 +1644,7 @@ load_db(argc, argv)
      * Open the dumpfile
      */
     if (dumpfile) {
-       if ((f = fopen(dumpfile, "r"))) {
+       if ((f = fopen(dumpfile, "r+"))) {
            kret = krb5_lock_file(kcontext, fileno(f), KRB5_LOCKMODE_SHARED);
        }
     }