From 07898368fca08de4fcc33fee270ec6acf853b5f3 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 22 Dec 2008 03:49:30 +0000 Subject: [PATCH] Some cleanup from Shawn Emery: Use INITIAL_TIMER macros instead of hardcoding values; reset 'gfd' when turning off the alarm. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21563 dc483132-0cff-0310-8789-dd5450dbe970 --- src/slave/kpropd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slave/kpropd.c b/src/slave/kpropd.c index 2de921255..a6fb4907a 100644 --- a/src/slave/kpropd.c +++ b/src/slave/kpropd.c @@ -458,7 +458,7 @@ void doit(fd) fprintf(stderr, "doit: setting resync alarm to 5s\n"); signal(SIGALRM, resync_alarm); gfd = fd; - if (alarm(5) != 0) { + if (alarm(INITIAL_TIMER) != 0) { if (debug) { fprintf(stderr, _("%s: alarm already set\n"), progname); @@ -508,6 +508,7 @@ void doit(fd) * Turn off alarm upon successful authentication from master. */ alarm(0); + gfd = -1; if (!authorized_principal(kpropd_context, client, etype)) { char *name; -- 2.26.2