]> andersk Git - moira.git/commitdiff
It's working better.
authorwesommer <wesommer>
Sun, 31 May 1987 22:03:23 +0000 (22:03 +0000)
committerwesommer <wesommer>
Sun, 31 May 1987 22:03:23 +0000 (22:03 +0000)
lib/mr_auth.c

index b3c9f4e7653f4e1e95a9b4f40999587643ae1fc0..1fbaeeeb678f3bee673f9bd8554de4b4cb548e29 100644 (file)
@@ -6,9 +6,12 @@
  *     Copyright (C) 1987 by the Massachusetts Institute of Technology
  *
  *     $Log$
- *     Revision 1.1  1987-05-20 03:11:18  wesommer
- *     Initial revision
+ *     Revision 1.2  1987-05-31 22:03:23  wesommer
+ *     It's working better.
  *
+ * Revision 1.1  87/05/20  03:11:18  wesommer
+ * Initial revision
+ * 
  *
  *     Handles the client side of the sending of authenticators to
  * the sms server.     
@@ -21,10 +24,13 @@ static char *rcsid_sms_auth_c = "$Header$";
 #include "sms_private.h"
 #include <krb.h>
 
+extern int krb_err_base;
+
 int sms_auth()
 {
        int status;
-       struct sms_params aparms;
+       sms_params *params = NULL, *reply = NULL;
+       KTEXT_ST auth;
        
        if (!_sms_conn) {
                return SMS_NOT_CONNECTED;
@@ -39,13 +45,28 @@ int sms_auth()
                status += krb_err_base;
                goto punt;
        }
+       params = (struct sms_params *) malloc(sizeof(*params));
+       params->sms_procno = SMS_AUTH;
+       params->sms_argc = 1;
 
-       if (!sms_call_op)
-               sms_call_op = create_operation();
-
-
-               
-       
-       
+       params->sms_argv = (char **)malloc(sizeof(char *) * 2);
+       params->sms_argl = (int *)malloc(sizeof(int) * 2);
+       params->sms_argv[0] = (char *)auth.dat;
+       params->sms_argl[0] = auth.length;
+       params->sms_argv[1] = NULL;
+       params->sms_argl[1] = 0;
        
+       if ((status = sms_do_call(params, &reply)) || (status = reply->sms_status))
+               goto punt;
+punt:
+       sms_destroy_reply(reply);
+ok:
+       if(params) {
+               if(params->sms_argv)
+                       free(params->sms_argv);
+               if(params->sms_argl)
+                       free(params->sms_argl);
+               free(params);
+       }
+       return status;
 }
This page took 0.041473 seconds and 5 git commands to generate.