]> andersk Git - moira.git/commitdiff
make auth do the right thing for version 2 of the protocol
authormar <mar>
Wed, 1 Jun 1988 15:31:53 +0000 (15:31 +0000)
committermar <mar>
Wed, 1 Jun 1988 15:31:53 +0000 (15:31 +0000)
lib/mr_auth.c

index 2f45ed651ec0fda02d87d10df8911a1fc8db2abd..5f6118a0636e6d5dc5fd264837233e3e76756542 100644 (file)
@@ -6,9 +6,12 @@
  *     Copyright (C) 1987 by the Massachusetts Institute of Technology
  *
  *     $Log$
- *     Revision 1.5  1988-04-19 12:40:29  mar
- *     pass version number on queries
+ *     Revision 1.6  1988-06-01 15:31:53  mar
+ *     make auth do the right thing for version 2 of the protocol
  *
+ * Revision 1.5  88/04/19  12:40:29  mar
+ * pass version number on queries
+ * 
  * Revision 1.4  87/10/20  15:09:22  mar
  * replace hardcoded ATHENA realm with call to get_krbrlm();
  * 
@@ -35,12 +38,17 @@ static char *rcsid_sms_auth_c = "$Header$";
 
 extern int krb_err_base;
 
-int sms_auth()
+/* Authenticate this client with the SMS server.  prog is the name of the
+ * client program, and will be recorded in the database.
+ */
+
+int sms_auth(prog)
+char *prog;
 {
     register int status;
     sms_params params_st;
-    char *args[1];
-    int argl[1];
+    char *args[2];
+    int argl[2];
     char realm[REALM_SZ];
 
     register sms_params *params = &params_st;
@@ -64,12 +72,17 @@ int sms_auth()
     } 
     params->sms_version_no = sending_version_no;
     params->sms_procno = SMS_AUTH;
-    params->sms_argc = 1;
+    params->sms_argc = 2;
     params->sms_argv = args;
     params->sms_argl = argl;
     params->sms_argv[0] = (char *)auth.dat;
     params->sms_argl[0] = auth.length;
+    params->sms_argv[1] = prog;
+    params->sms_argl[1] = strlen(prog) + 1;
        
+    if (sending_version_no == SMS_VERSION_1)
+       params->sms_argc = 1;
+
     if ((status = sms_do_call(params, &reply)) == 0)
        status = reply->sms_status;
 
This page took 0.038093 seconds and 5 git commands to generate.