]> andersk Git - moira.git/blobdiff - update/update_server.c
- Don't ifdef out auth_002; it breaks backward compatability.
[moira.git] / update / update_server.c
index f50fb525b1433dab9d3d0cc96970a15dd6bba544..63be9f773dfc74e568c4a78017a875cd25e43265 100644 (file)
@@ -25,7 +25,9 @@
 #include <unistd.h>
 #include <syslog.h>
 
+#ifdef HAVE_KRB4
 #include <des.h>
+#endif
 #include "update.h"
 
 RCSID("$Header$");
@@ -33,7 +35,9 @@ RCSID("$Header$");
 char *whoami, *hostname;
 
 int have_authorization = 0;
+#ifdef HAVE_KRB4
 des_cblock session;
+#endif
 int uid = 0;
 
 void child_handler(int signal);
@@ -45,6 +49,7 @@ struct _dt {
   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 },
@@ -238,12 +243,11 @@ void child_handler(int signal)
 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);
 }
This page took 0.099698 seconds and 4 git commands to generate.