From: Ken Raeburn Date: Fri, 3 May 1996 02:20:14 +0000 (+0000) Subject: * ss_wrapper.c (main): Make sci_idx a global. This makes certain Cygnus X-Git-Tag: krb5-1.0-beta6~156 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2ab71167aa0c7bcec4d60cc1fbb838aaf073613f;p=krb5.git * 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7886 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/admin/edit/ChangeLog b/src/admin/edit/ChangeLog index f078f42d1..59914b172 100644 --- a/src/admin/edit/ChangeLog +++ b/src/admin/edit/ChangeLog @@ -1,3 +1,11 @@ +Thu May 2 22:16:01 1996 Ken Raeburn + + * 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 * kdb5_edit.c (extract_v4_srvtab): Use the matching key_data's kvno; diff --git a/src/admin/edit/dump.c b/src/admin/edit/dump.c index 2f6ed577c..42118d555 100644 --- a/src/admin/edit/dump.c +++ b/src/admin/edit/dump.c @@ -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++; diff --git a/src/admin/edit/ss_wrapper.c b/src/admin/edit/ss_wrapper.c index de6c83436..c3a0720a3 100644 --- a/src/admin/edit/ss_wrapper.c +++ b/src/admin/edit/ss_wrapper.c @@ -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,