]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
On failures other than bad parameters in the config file, sleep and sun-iprop
authorKen Raeburn <raeburn@mit.edu>
Mon, 23 Jun 2008 23:43:27 +0000 (23:43 +0000)
committerKen Raeburn <raeburn@mit.edu>
Mon, 23 Jun 2008 23:43:27 +0000 (23:43 +0000)
then try again, rather than exiting.  This includes the case of not
being able to reach a KDC to get credentials.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/sun-iprop@20463 dc483132-0cff-0310-8789-dd5450dbe970

src/slave/kpropd.c

index 82de726b5f028ab478856bae454ebe39cc44d44b..fd46819a1826e74e00ea673a7c48132a50354682 100644 (file)
@@ -632,13 +632,21 @@ reinit:
                        (void) sleep(backoff_time);
                        goto reinit;
                } else {
+                       if (retval == KADM5_BAD_CLIENT_PARAMS ||
+                           retval == KADM5_BAD_SERVER_PARAMS) {
+                           com_err(progname, retval,
+                                   _("while initializing %s interface"),
+                                   progname);
+
+                           usage();
+                       }
+                       reinit_cnt++;
                        com_err(progname, retval,
-                                _("while initializing %s interface"),
+                                _("while initializing %s interface, retrying"),
                                progname);
-                       if (retval == KADM5_BAD_CLIENT_PARAMS ||
-                           retval == KADM5_BAD_SERVER_PARAMS)
-                               usage();
-                       exit(1);
+                       backoff_time = backoff_from_master(&reinit_cnt);
+                       sleep(backoff_time);
+                       goto reinit;
                 }
        }