]> andersk Git - moira.git/blobdiff - reg_svr/reg_svr.c
added new proc type for MOTD
[moira.git] / reg_svr / reg_svr.c
index f6679058fe8f0a2206d9eb2ff1c1774563711fa9..52e0c84fc14c7527e493fa5f7c781bac146f2267 100644 (file)
@@ -3,7 +3,9 @@
  *      $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.
  *
@@ -17,6 +19,7 @@
 static char *rcsid_reg_svr_c = "$Header$";
 #endif lint
 
+#include <mit-copyright.h>
 #include "reg_svr.h"
 #include "admin_server.h"
 #include "admin_err.h"
@@ -54,7 +57,7 @@ main(argc,argv)
     init_ureg_err_tbl();
     
     /* Connect to the SMS server */
-    if ((status = sms_connect()) != SMS_SUCCESS) 
+    if ((status = sms_connect(SMS_SERVER)) != SMS_SUCCESS) 
     {
        com_err(whoami, status, " on connect");
        exit(1);
@@ -508,19 +511,19 @@ int reserve_user(message,retval)
 
        /* Check the login name for validity.  The login name is currently
           is allowed to contain lowercase letters and numbers in any
-          position and underscore characters and periods in any position
-          but the first. */
+          position and underscore characters in any position but the 
+          first. */
        if ((strlen(login) < MIN_UNAME) || (strlen(login) > MAX_UNAME))
            status = UREG_INVALID_UNAME;
     }
     if (status == SUCCESS)
-       if ((login[0] == '.') || (login[1] == '_'))
+       if (login[1] == '_')
            status = UREG_INVALID_UNAME;
     if (status == SUCCESS)
     {
        for (i = 0; i < strlen(login); i++)
-           if (!islower(login[i]) && !isdigit(login[i]) &&
-               (login[i] != '_') && (login[i] != '.'))
+           if (!islower(login[i]) && !isdigit(login[i]) && 
+               (login[i] != '_'))
            {
                status = UREG_INVALID_UNAME;
                break;
@@ -547,9 +550,9 @@ int reserve_user(message,retval)
            status = UREG_LOGIN_USED;
            break;
          default:
-           status = UREG_MISC_ERROR;
            critical_alert(FAIL_INST,"%s returned from register_user.",
                           error_message(status));
+           status = UREG_MISC_ERROR;
            break;
        }
     }
@@ -633,14 +636,3 @@ int set_password(message,retval)
     
     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:
- */
This page took 0.036284 seconds and 4 git commands to generate.