]> andersk Git - moira.git/commitdiff
Make sure that it gets the realm of the SMS server, not the realm of
authormar <mar>
Wed, 16 Aug 1989 11:24:35 +0000 (11:24 +0000)
committermar <mar>
Wed, 16 Aug 1989 11:24:35 +0000 (11:24 +0000)
the client host.  (qjb)

lib/mr_auth.c

index dee6fae7a17bb6610f99848383375690e3c47b4f..4d7c717cb662ca23cfba9c176d4ce403bf42d3de 100644 (file)
@@ -18,8 +18,7 @@ static char *rcsid_sms_auth_c = "$Header$";
 #include <mit-copyright.h>
 #include "sms_private.h"
 #include <krb.h>
-#include "krb_et.h"
-
+#include <krb_et.h>
 
 /* Authenticate this client with the SMS server.  prog is the name of the
  * client program, and will be recorded in the database.
@@ -33,6 +32,7 @@ char *prog;
     char *args[2];
     int argl[2];
     char realm[REALM_SZ];
+    char host[BUFSIZ];
 
     register sms_params *params = &params_st;
     sms_params *reply = NULL;
@@ -45,9 +45,12 @@ char *prog;
      * The "service" and "instance" should not be hardcoded here.
      */
        
-    if ((status = get_krbrlm(realm, 1)) != KSUCCESS) {
+    bzero(host, sizeof(host));
+    if (status = sms_host(host, sizeof(host) - 1))
        return status;
-    }
+
+    strcpy(realm, krb_realmofhost(host));
+
     status = krb_mk_req(&auth, "sms", "sms", realm, 0);
     if (status != KSUCCESS) {
        status += ERROR_TABLE_BASE_krb;
This page took 0.03796 seconds and 5 git commands to generate.