Remove Kerberos specific principal manipulation
authorSam Hartman <hartmans@debian.org>
Fri, 5 Apr 2013 15:27:00 +0000 (11:27 -0400)
committerSam Hartman <hartmans@debian.org>
Fri, 5 Apr 2013 16:54:40 +0000 (12:54 -0400)
gsscon/gsscon_passive.c

index 7fb1ce9..96d1417 100755 (executable)
@@ -207,20 +207,6 @@ static int ServicePrincipalIsValidForService (const char *inServicePrincipal)
 static int ClientPrincipalIsAuthorizedForService (const char *inClientPrincipal)
 {
     int err = 0;
-    krb5_context context = NULL;
-    krb5_principal principal = NULL;
-    
-    if (!inClientPrincipal) { err = EINVAL; }
-    
-    if (!err) {
-        err = krb5_init_context (&context);
-    }
-    
-    if (!err) {
-        err = krb5_parse_name (context, inClientPrincipal, &principal);
-    }
-    
-    if (!err) {
         /* 
          * Here is where the server checks to see if the client principal should 
          * be allowed to use your service. Typically it should check both the name 
@@ -228,10 +214,8 @@ static int ClientPrincipalIsAuthorizedForService (const char *inClientPrincipal)
          * realm may be trying to contact your service.  
          */
         err = 0;
-    }
+
     
-    if (principal) { krb5_free_principal (context, principal); }
-    if (context  ) { krb5_free_context (context); }
     
     return err;
 }
@@ -304,7 +288,7 @@ int gsscon_authorize (gss_ctx_id_t  inContext,
     //    }
     //    
     //    if (!err) {
-    //        servicePrincipal = malloc (nameToken.length + 1);
+    //        servic7ePrincipal = malloc (nameToken.length + 1);
     //        if (servicePrincipal == NULL) { err = ENOMEM; }
     //    }
     //