Replace gss_pname_to_uid with gss_localname in gss-server.c
authorSam Hartman <hartmans@mit.edu>
Wed, 5 Oct 2011 21:31:08 +0000 (21:31 +0000)
committerSam Hartman <hartmans@mit.edu>
Wed, 5 Oct 2011 21:31:08 +0000 (21:31 +0000)
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25313 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/gss-sample/gss-server.c

index c08b71497d00a3853c071f356ddba130bc343c3e..d914933127da49080293247ab0087c6025d7f45b 100644 (file)
@@ -884,13 +884,13 @@ static OM_uint32
 showLocalIdentity(OM_uint32 *minor, gss_name_t name)
 {
     OM_uint32 major;
-    uid_t uid;
+    gss_buffer_desc localname;
 
-    major = gss_pname_to_uid(minor, name, GSS_C_NO_OID, &uid);
+    major = gss_localname(minor, name, GSS_C_NO_OID, &localname);
     if (major == GSS_S_COMPLETE)
-        printf("UID: %lu\n", (unsigned long)uid);
+        printf("localname: %-*s\n", localname.length, localname.value);
     else if (major != GSS_S_UNAVAILABLE)
-        display_status("gss_pname_to_uid", major, *minor);
-
+        display_status("gss_localname", major, *minor);
+    gss_release_buffer(minor, &localname);
     return major;
 }