]> andersk Git - moira.git/blobdiff - reg_svr/requests.c
dereference NULL bug
[moira.git] / reg_svr / requests.c
index 4cd675d5d74aab91edfdbdd957fc12932719270e..98ec328980aea86799b642423394cee3735945ad 100644 (file)
@@ -3,9 +3,11 @@
  *      $Author$
  *      $Header$
  *
- *      Copyright (C) 1987 by the Massachusetts Institute of Technology
+ *      Copyright (C) 1987, 1988 by the Massachusetts Institute of Technology
+ *     For copying and distribution information, please see the file
+ *     <mit-copyright.h>.
  *
- *      Server for user registration with SMS and Kerberos.
+ *      Server for user registration with Moira and Kerberos.
  *
  *      This file handles the processing of requests for the register
  *      server.
@@ -20,10 +22,21 @@ static char *rcsid_requests_c = "$Header$";
  * #defined, make sure that it is not already done in reg_svr.h 
  */
 
-#include "reg_svr.h"
+#include <mit-copyright.h>
+#include <stdio.h>
+#include <strings.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/file.h>
+#include <krb.h>
+#include <des.h>
+#include <errno.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
+#include "moira.h"
+#include "moira_site.h"
+#include "reg_svr.h"
 
 #define NUM_REQUESTS_SAVED 100 /* Number of transactions to save */
 #define CUR_REQ (requests[cur_request_index]) /* The current request */
@@ -211,6 +224,7 @@ int format_pkt(packet, pktlenp, seqno, cl_status, message)
     /* Find out how much of the message to copy; truncate if too short. */
     /* How much room is there left? */
     len = *pktlenp - sizeof(U_32BIT)*3;
+    if (message == NULL) message = "";
     if (len < strlen(message) + 1) /* Room for null terminator */
     {
        status = FAILURE;       /* Message was truncated */
@@ -388,13 +402,8 @@ parse_pkt(packet, pktlen, message)
     return status;
 }
 
-/*
- * Local Variables:
- * mode: c
- * c-argdecl-indent: 2
- * c-brace-offset: -4
- * c-continued-statement-offset: 4
- * c-indent-level: 4
- * c-label-offset: -2
- * End:
- */
+
+u_long cur_req_sender()
+{
+    return (CUR_REQ.ip_address);
+}
This page took 0.066742 seconds and 4 git commands to generate.