components/krb5/patches/049-kpropd_no_retries.patch
changeset 5490 9bf0bc57423a
child 6599 1d033832c5e7
equal deleted inserted replaced
5489:a5031bb8b66d 5490:9bf0bc57423a
       
     1 #
       
     2 # Disable retrying in kpropd, when kadm5 interface cannot be initialized.
       
     3 #
       
     4 # When MIT kpropd cannot contact master KDC, it keeps retrying indefinitely.
       
     5 # This doesn't play well with SMF; krb5_prop service is reported as online,
       
     6 # while the daemon really just keeps failing to connect.
       
     7 #
       
     8 # This patch changes kpropd, so that it exits with error immediately.
       
     9 #
       
    10 # This is a Solaris specific change, it will not be contributed upstream.
       
    11 # Patch source: in-house
       
    12 #
       
    13 diff -pur old/src/slave/kpropd.c new/src/slave/kpropd.c
       
    14 --- old/src/slave/kpropd.c	2015-06-26 05:26:18.093175489 -0700
       
    15 +++ new/src/slave/kpropd.c	2015-07-07 05:33:21.888052914 -0700
       
    16 @@ -730,18 +730,10 @@ reinit:
       
    17  
       
    18                  usage();
       
    19              }
       
    20 -            reinit_cnt++;
       
    21              com_err(progname, retval,
       
    22 -                    _("while initializing %s interface, retrying"),
       
    23 -                    progname);
       
    24 -            backoff_time = backoff_from_master(&reinit_cnt);
       
    25 -            if (debug) {
       
    26 -                fprintf(stderr, _("Sleeping %d seconds to re-initialize "
       
    27 -                                  "kadm5 (krb5kdc not running?)\n"),
       
    28 -                        backoff_time);
       
    29 -            }
       
    30 -            sleep(backoff_time);
       
    31 -            goto reinit;
       
    32 +                    _("while initializing %s interface for %s, exiting."),
       
    33 +                    progname, iprop_svc_princstr);
       
    34 +	    exit(1);
       
    35          }
       
    36      }
       
    37