[torquedev] any other patches?

Miles Davis miles at cs.stanford.edu
Thu Feb 15 13:46:20 MST 2007


On Wed, Feb 14, 2007 at 01:42:00AM -0700, Garrick Staples wrote:
> I think I've got all of the recent contributions in svn.  Did I miss
> anything?
> 

Hrm, I've been meaning to send in my GSSAPI patches (attached).

-- 
// Miles Davis - miles at cs.stanford.edu - http://www.cs.stanford.edu/~miles
// Computer Science Department - Computer Facilities
// Stanford University
-------------- next part --------------
Index: src/resmom/requests.c
===================================================================
--- src/resmom/requests.c	(revision 1156)
+++ src/resmom/requests.c	(working copy)
@@ -3696,7 +3696,7 @@
   if (forwarded_princ != NULL) {
     free(forwarded_princ);
     forwarded_princ = NULL;
-    gss_release_cred(&ret_flags,forwarded_creds);
+    gss_release_cred(&ret_flags,&forwarded_creds);
   }
 }
 #endif /* GSSAPI */
Index: src/lib/Libgss/pbsgss.c
===================================================================
--- src/lib/Libgss/pbsgss.c	(revision 1156)
+++ src/lib/Libgss/pbsgss.c	(working copy)
@@ -476,7 +476,7 @@
       pbsgss_display_status("accepting context", maj_stat,
 			    acc_sec_min_stat);
       if (*context != GSS_C_NO_CONTEXT)
-	gss_delete_sec_context(&min_stat, context,
+	gss_delete_sec_context(&min_stat, &context,
 			       GSS_C_NO_BUFFER);
       return -105;
     }
@@ -513,7 +513,7 @@
 			      NULL);
   if (maj_stat == GSS_S_COMPLETE) {
     if (creds != NULL) {
-      gss_release_cred(&min_stat,creds);
+      gss_release_cred(&min_stat,&creds);
     }
   }
   return (maj_stat == GSS_S_COMPLETE);
@@ -634,7 +634,7 @@
 			    init_sec_min_stat);
       (void) gss_release_name(&min_stat, &target_name);
       if (*gss_context != GSS_C_NO_CONTEXT)
-	gss_delete_sec_context(&min_stat, gss_context,
+	gss_delete_sec_context(&min_stat, &gss_context,
 			       GSS_C_NO_BUFFER);
       return -1;
     }   
@@ -644,7 +644,7 @@
     if (maj_stat == GSS_S_CONTINUE_NEEDED) {
       status = pbsgss_recv_token(s, &token_flags, &recv_tok);
       if ( status < 0) {
-	gss_delete_sec_context(&min_stat, gss_context,
+	gss_delete_sec_context(&min_stat, &gss_context,
 			       GSS_C_NO_BUFFER);
 	(void) gss_release_name(&min_stat, &target_name);
 	return status;
@@ -685,12 +685,17 @@
     return -2;
   }
 
-  if (retval = krb5_parse_name(kcontext,
-			       principal,
-			       &princ)) {
-    krb5_cc_destroy(kcontext,ccache);
-    krb5_free_context(kcontext);
-    return -3;
+  /* Check to see if principal is defined */
+  if(principal) {
+     if (retval = krb5_parse_name(kcontext,
+   			       principal,
+   			       &princ)) {
+       krb5_cc_destroy(kcontext,ccache);
+       krb5_free_context(kcontext);
+       return -3;
+     }
+  } else {
+	  return -3;
   }
 
   if (retval = krb5_cc_initialize(kcontext,ccache,princ)) {
@@ -799,7 +804,7 @@
 					   &ret_flags);
   free(service_name);
   if (creds != NULL) {
-    gss_release_cred(&min_stat,creds);
+    gss_release_cred(&min_stat,&creds);
   }
   if (name != GSS_C_NO_NAME) {
     gss_release_name(&min_stat,&name);
@@ -878,7 +883,7 @@
 		      NULL,
 		      NULL,
 		      NULL) != GSS_S_COMPLETE) {
-    gss_release_cred(&min_stat,creds);
+    gss_release_cred(&min_stat,&creds);
     free(service_name);
     return NULL;
   }
@@ -886,8 +891,8 @@
 		       name,
 		       &buffer,
 		       &name_type) != GSS_S_COMPLETE) {
-    gss_release_name(&min_stat,name);
-    gss_release_cred(&min_stat,creds);
+    gss_release_name(&min_stat,&name);
+    gss_release_cred(&min_stat,&creds);
     free(service_name);
     return NULL;
   }
@@ -900,8 +905,8 @@
   }
   
   gss_release_buffer(&min_stat,&buffer);
-  gss_release_name(&min_stat,name);
-  gss_release_cred(&min_stat,creds);
+  gss_release_name(&min_stat,&name);
+  gss_release_cred(&min_stat,&creds);
   free(service_name);
   return princname;
 }
Index: src/server/req_gssauthenuser.c
===================================================================
--- src/server/req_gssauthenuser.c	(revision 1156)
+++ src/server/req_gssauthenuser.c	(working copy)
@@ -85,7 +85,7 @@
       log_event(PBSEVENT_DEBUG,
 		PBS_EVENTCLASS_SERVER,"req_gssauthenuser",log_buffer);
       if (server_creds != GSS_C_NO_CREDENTIAL) {
-	gss_release_cred(&ret_flags,server_creds);
+	gss_release_cred(&ret_flags,&server_creds);
       }
       server_creds = new_creds;
       majstat = gss_inquire_cred(&ret_flags,server_creds,


More information about the torquedev mailing list