svn rev #25224: trunk/src/lib/gssapi/ generic/ mechglue/

ghudson@MIT.EDU ghudson at MIT.EDU
Wed Sep 21 18:29:25 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=25224
Commit By: ghudson
Log Message:
Whitespace.


Changed Files:
U   trunk/src/lib/gssapi/generic/gssapi_ext.h
U   trunk/src/lib/gssapi/mechglue/gssd_pname_to_uid.c
U   trunk/src/lib/gssapi/mechglue/mglueP.h
Modified: trunk/src/lib/gssapi/generic/gssapi_ext.h
===================================================================
--- trunk/src/lib/gssapi/generic/gssapi_ext.h	2011-09-21 21:18:35 UTC (rev 25223)
+++ trunk/src/lib/gssapi/generic/gssapi_ext.h	2011-09-21 22:29:25 UTC (rev 25224)
@@ -43,23 +43,24 @@
 	 uid_t *uidOut);
 #endif
 
-  /**
-   * Provides a platform-specific name for a GSSAPI name as
-   * interpreted by a given mechanism
-   * @param name The gss name resulting from accept_sec_context
-   * @param mech_type The mechanism that will be asked to map @a name to a local name
-   * @param localname pointer to a buffer_desc allocated by the caller
-   * that will be filled in with the local name on successful completion.
-   */
+/**
+ * Provides a platform-specific name for a GSSAPI name as interpreted by a
+ * given mechanism.
+ *
+ * @param name       The gss name resulting from accept_sec_context
+ * @param mech_type  The mechanism that will be asked to map @a name to a
+ *                   local name
+ * @param localname  Pointer to a buffer_desc allocated by the caller
+ *                   that will be filled in with the local name on successful
+ *                   completion.
+ */
 OM_uint32 KRB5_CALLCONV
 gss_localname
 	(OM_uint32 *minor,
-         const gss_name_t name,
+	 const gss_name_t name,
 	 gss_const_OID mech_type,
 	 gss_buffer_t localname);
 
-
-
 /** Determine whether a mechanism name is authorized to act as a username.
  *
  * @param [in] name      Mechanism name

Modified: trunk/src/lib/gssapi/mechglue/gssd_pname_to_uid.c
===================================================================
--- trunk/src/lib/gssapi/mechglue/gssd_pname_to_uid.c	2011-09-21 21:18:35 UTC (rev 25223)
+++ trunk/src/lib/gssapi/mechglue/gssd_pname_to_uid.c	2011-09-21 22:29:25 UTC (rev 25224)
@@ -68,54 +68,56 @@
 
 static OM_uint32
 attr_localname(OM_uint32 *minor,
-                  const gss_mechanism mech,
-                  const gss_name_t mech_name,
-	       gss_buffer_t localname)
+               const gss_mechanism mech,
+               const gss_name_t mech_name,
+               gss_buffer_t localname)
 {
     OM_uint32 major = GSS_S_UNAVAILABLE;
     OM_uint32 tmpMinor;
     int more = -1;
     gss_buffer_desc value;
-	    gss_buffer_desc display_value;
-	    int authenticated = 0, complete = 0;
+    gss_buffer_desc display_value;
+    int authenticated = 0, complete = 0;
 
-	    value.value = NULL;
-	    display_value.value = NULL;
+    value.value = NULL;
+    display_value.value = NULL;
     if (mech->gss_get_name_attribute == NULL)
         return GSS_S_UNAVAILABLE;
 
-        major = mech->gss_get_name_attribute(minor,
-                                             mech_name,
-                                             GSS_C_ATTR_LOCAL_LOGIN_USER,
-                                             &authenticated,
-                                             &complete,
-                                             &value,
-                                             &display_value,
-                                             &more);
-        if (GSS_ERROR(major)) {
-            map_error(minor, mech);
-	    goto cleanup;
-        }
+    major = mech->gss_get_name_attribute(minor,
+                                         mech_name,
+                                         GSS_C_ATTR_LOCAL_LOGIN_USER,
+                                         &authenticated,
+                                         &complete,
+                                         &value,
+                                         &display_value,
+                                         &more);
+    if (GSS_ERROR(major)) {
+        map_error(minor, mech);
+        goto cleanup;
+    }
 
-        if (!authenticated)
-	    major = GSS_S_UNAVAILABLE;
-	else {
-		localname->value = value.value;
-	localname->length = value.length;
-	value.value = NULL;
-	}
+    if (!authenticated)
+        major = GSS_S_UNAVAILABLE;
+    else {
+        localname->value = value.value;
+        localname->length = value.length;
+        value.value = NULL;
+    }
+
 cleanup:
-	if (display_value.value)
-		gss_release_buffer(&tmpMinor, &display_value);
-	if (value.value)
-		gss_release_buffer(&tmpMinor, &value);
+    if (display_value.value)
+        gss_release_buffer(&tmpMinor, &display_value);
+    if (value.value)
+        gss_release_buffer(&tmpMinor, &value);
     return major;
 }
+
 OM_uint32 KRB5_CALLCONV
 gss_localname(OM_uint32 *minor,
-                 const gss_name_t pname,
-	      gss_const_OID mech_type,
-    gss_buffer_t localname)
+              const gss_name_t pname,
+              gss_const_OID mech_type,
+              gss_buffer_t localname)
 {
     OM_uint32 major, tmpMinor;
     gss_mechanism mech;
@@ -179,40 +181,40 @@
 
 #ifndef _WIN32
 OM_uint32 KRB5_CALLCONV
-gss_pname_to_uid
-	(OM_uint32 *minor,
-         const gss_name_t name,
-	 const gss_OID mech_type,
-	 uid_t *uidOut)
+gss_pname_to_uid(OM_uint32 *minor,
+                 const gss_name_t name,
+                 const gss_OID mech_type,
+                 uid_t *uidOut)
 {
-  OM_uint32 major = GSS_S_UNAVAILABLE, tmpminor;
-    #ifndef NO_PASSWORD
+    OM_uint32 major = GSS_S_UNAVAILABLE, tmpminor;
+#ifndef NO_PASSWORD
     gss_buffer_desc localname;
-            char pwbuf[BUFSIZ];
-	    char *localuser = NULL;
-	    struct passwd *pwd = NULL;
-	    struct passwd pw;
-	    int code = 0;
+    char pwbuf[BUFSIZ];
+    char *localuser = NULL;
+    struct passwd *pwd = NULL;
+    struct passwd pw;
+    int code = 0;
 
-	    localname.value = NULL;
-	    major = gss_localname(minor, name, mech_type, &localname);
-	    if (!GSS_ERROR(major) && localname.value) {
-	      localuser = malloc(localname.length + 1);
-	      if (localuser == NULL)
-		code = ENOMEM;
-	      if (code == 0) {
-		  memcpy(localuser, localname.value, localname.length);
-		  localuser[localname.length] = '\0';
-		  code = k5_getpwnam_r(localuser, &pw, pwbuf, sizeof(pwbuf), &pwd);
-	      }
-	      if ((code == 0) && pwd)
-		    *uidOut = pwd->pw_uid;
-		else major = GSS_S_FAILURE;
-	    }
-	    free(localuser);
-	    if (localname.value)
-	      gss_release_buffer(&tmpminor, &localname);
+    localname.value = NULL;
+    major = gss_localname(minor, name, mech_type, &localname);
+    if (!GSS_ERROR(major) && localname.value) {
+        localuser = malloc(localname.length + 1);
+        if (localuser == NULL)
+            code = ENOMEM;
+        if (code == 0) {
+            memcpy(localuser, localname.value, localname.length);
+            localuser[localname.length] = '\0';
+            code = k5_getpwnam_r(localuser, &pw, pwbuf, sizeof(pwbuf), &pwd);
+        }
+        if ((code == 0) && pwd)
+            *uidOut = pwd->pw_uid;
+        else
+            major = GSS_S_FAILURE;
+    }
+    free(localuser);
+    if (localname.value)
+        gss_release_buffer(&tmpminor, &localname);
 #endif /*NO_PASSWORD*/
-	    return major;
+    return major;
 }
 #endif /*_WIN32*/

Modified: trunk/src/lib/gssapi/mechglue/mglueP.h
===================================================================
--- trunk/src/lib/gssapi/mechglue/mglueP.h	2011-09-21 21:18:35 UTC (rev 25223)
+++ trunk/src/lib/gssapi/mechglue/mglueP.h	2011-09-21 22:29:25 UTC (rev 25224)
@@ -323,7 +323,7 @@
 		    OM_uint32,		/* req_output_size */
 		    OM_uint32 *		/* max_input_size */
 	 );
-    OM_uint32	     (* KRB5_CALLCONV gss_localname)
+    OM_uint32	     (KRB5_CALLCONV *gss_localname)
 	(
 		    OM_uint32 *,        /* minor */
 		    const gss_name_t,	/* name */




More information about the cvs-krb5 mailing list