If kpropd invoked with -r option, invoke kdb5_edit with different realm
authorEzra Peisach <epeisach@mit.edu>
Sat, 20 May 1995 18:23:46 +0000 (18:23 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sat, 20 May 1995 18:23:46 +0000 (18:23 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5829 dc483132-0cff-0310-8789-dd5450dbe970

src/slave/ChangeLog
src/slave/kpropd.c

index d8650f598349d156fcae4737a4a3b7c3b9dbc708..4f2efc6748851f852fa00f5aa566cc823553478e 100644 (file)
@@ -1,5 +1,8 @@
 Sat May 20 13:46:36 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>
 
+       * kpropd.c (load_database): If realm specified then invoke
+               kdb5_edit with -r option.
+
        * kprop.M: Document -P (port) option.
 
        * kpropd.M: Document -P (port) option.
index 6005742f3f6aeb9367fb237068a3380019471aa4..0a2dac886ec1329c6bb02365624bd01b2201a595 100644 (file)
@@ -795,9 +795,10 @@ load_database(context, kdb5_edit, database_file_name)
     char *kdb5_edit;
     char *database_file_name;
 {
-       static char     *edit_av[4];
+       static char     *edit_av[10];
        int     error_ret, save_stderr;
        int     child_pid;
+       int     count;
 
        /* <sys/param.h> has been included, so BSD will be defined on
           BSD systems */
@@ -818,9 +819,14 @@ load_database(context, kdb5_edit, database_file_name)
        sprintf(request, "load_db %s %s", database_file_name, kerb_database);
        
        edit_av[0] = kdb5_edit;
-       edit_av[1] = "-R";      
-       edit_av[2] = request;
-       edit_av[3] = NULL;
+       count = 1;
+       if (realm) {
+               edit_av[count++] = "-r";        
+               edit_av[count++] = realm;       
+       }
+       edit_av[count++] = "-R";        
+       edit_av[count++] = request;
+       edit_av[count++] = NULL;
 
        switch(child_pid = fork()) {
        case -1: