* ss_wrapper.c (main): Make sci_idx a global. This makes certain Cygnus
authorKen Raeburn <raeburn@mit.edu>
Fri, 3 May 1996 02:20:14 +0000 (02:20 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 3 May 1996 02:20:14 +0000 (02:20 +0000)
customizations simpler.

* dump.c (restore_dump): If header indicates a beta-5 dump, process it.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7886 dc483132-0cff-0310-8789-dd5450dbe970

src/admin/edit/ChangeLog
src/admin/edit/dump.c
src/admin/edit/ss_wrapper.c

index f078f42d13c142645cab43fe5c8be1e98df49fc1..59914b172e1021d14583bc444d9efbd1c696af27 100644 (file)
@@ -1,3 +1,11 @@
+Thu May  2 22:16:01 1996  Ken Raeburn  <raeburn@cygnus.com>
+
+       * ss_wrapper.c (main): Make sci_idx a global.  This makes certain
+       Cygnus customizations simpler.
+
+       * dump.c (restore_dump): If header indicates a beta-5 dump,
+       process it.
+
 Thu Apr 11 19:32:36 1996  Richard Basch  <basch@lehman.com>
 
        * kdb5_edit.c (extract_v4_srvtab): Use the matching key_data's kvno;
index 2f6ed577c1cf22fa321ef85abaa6db075e0fb9df..42118d555aa33d123d70c96eb94a26224b294e4b 100644 (file)
@@ -1549,6 +1549,28 @@ restore_dump(programname, kcontext, dumpfile, f, verbose)
        if (f != stdin)
            fclose(f);
     }
+    else if (!strcmp (buf, k5beta_dump_header)) {
+       lineno = 1;
+       /*
+        * Process the records.
+        */
+       while (!(error = process_k5beta_record(dumpfile,
+                                              kcontext, 
+                                              f,
+                                              verbose,
+                                              &lineno)))
+           ;
+       if (error != -1)
+           fprintf(stderr, err_line_fmt, programname, lineno, dumpfile);
+       else
+           error = 0;
+
+       /*
+        * Close the input file.
+        */
+       if (f != stdin)
+           fclose(f);
+    }
     else {
        fprintf(stderr, head_bad_fmt, programname, dumpfile);
        error++;
index de6c8343627ab83c752daf837ab5c05b638912e7..c3a0720a365e30dc9bfd3016f7eba6b0ce0c328f 100644 (file)
@@ -33,13 +33,15 @@ extern ss_request_table kdb5_edit_cmds;
 extern int exit_status;
 extern FILE *scriptfile;
 
+int sci_idx;
+
 int main(argc, argv)
     int argc;
     char *argv[];
 {
     char *request;
     krb5_error_code retval;
-    int sci_idx, code = 0;
+    int code = 0;
 
     request = kdb5_edit_Init(argc, argv);
     sci_idx = ss_create_invocation("kdb5_edit", "5.0", (char *) NULL,