#include <unistd.h>
#include <syslog.h>
+#ifdef HAVE_KRB4
#include <des.h>
+#endif
#include "update.h"
RCSID("$Header$");
char *whoami, *hostname;
int have_authorization = 0;
+#ifdef HAVE_KRB4
des_cblock session;
+#endif
int uid = 0;
void child_handler(int signal);
void (*proc)(int, char *);
} dispatch_table[] = {
{ "AUTH_002", auth_002 },
+ { "AUTH_003", auth_003 },
{ "XFER_002", xfer_002 },
{ "XFER_003", xfer_003 },
{ "EXEC_002", exec_002 },
static void syslog_com_err_proc(const char *progname, long code,
const char *fmt, va_list args)
{
- char *buf;
- int bufsiz = 1024;
+ char buf[BUFSIZ + 1];
- buf = malloc(bufsiz + 1);
- buf[bufsiz] = '\0';
+ buf[BUFSIZ] = '\0';
- vsnprintf(buf, bufsiz, fmt, args);
- syslog(LOG_NOTICE, "%s", buf);
+ vsnprintf(buf, BUFSIZ, fmt, args);
+ syslog(LOG_NOTICE, "%s: %s %s", progname ? progname : "",
+ code ? error_message(code) : "", buf);
}