@@ -7,8 +7,6 @@ from gssapi.raw.oids cimport OID
77from gssapi.raw.misc import GSSError
88from gssapi import _utils
99
10- from posix.types cimport uid_t
11-
1210cdef extern from " python_gssapi_ext.h" :
1311 OM_uint32 gss_localname(OM_uint32 * minor,
1412 const gss_name_t name,
@@ -22,11 +20,6 @@ cdef extern from "python_gssapi_ext.h":
2220 const gss_name_t name,
2321 const gss_name_t user) nogil
2422
25- OM_uint32 gss_pname_to_uid(OM_uint32 * minor,
26- const gss_name_t name,
27- const gss_OID mech_type,
28- uid_t * uid_out) nogil
29-
3023
3124def localname (Name name not None , OID mech = None ):
3225 """ Get the local name for a GSSAPI name.
@@ -118,39 +111,3 @@ def authorize_localname(Name name not None, Name user not None):
118111 return True
119112 else :
120113 raise GSSError(maj_stat, min_stat)
121-
122-
123- def pname_to_uid (Name name not None , OID mech = None ):
124- """ Get the local UID for a GSSAPI name.
125-
126- This method determines the local UID associated with a GSSAPI
127- name, optionally for a given mechanism.
128-
129- Note:
130- This function is not available on Windows.
131-
132- Args:
133- name (Name): the GSSAPI name to map to a local UID
134- mech (~gssapi.OID): the mechanism to use for the mapping
135- (or None for the default)
136-
137- Returns:
138- int: the local UID
139-
140- Raises:
141- ~gssapi.exceptions.GSSError
142- """
143- cdef gss_OID m = GSS_C_NO_OID
144- if mech is not None :
145- m = & mech.raw_oid
146-
147- cdef uid_t uid_out
148- cdef OM_uint32 maj_stat, min_stat
149-
150- with nogil:
151- maj_stat = gss_pname_to_uid(& min_stat, name.raw_name, m, & uid_out)
152-
153- if maj_stat == GSS_S_COMPLETE:
154- return uid_out
155- else :
156- raise GSSError(maj_stat, min_stat)
0 commit comments