diff --git a/include/NTMakefile b/include/NTMakefile index 3838c4599..85ea4e270 100644 --- a/include/NTMakefile +++ b/include/NTMakefile @@ -76,6 +76,7 @@ while(<>) { if ("$(HAVE_SCC)") { print "#define HAVE_SCC 1\n"; } if ("$(DIR_hdbdir)") { print "#define HDB_DB_DIR \"".'$(DIR_hdbdir)'."\"\n"; } if ("$(HAVE_MSLSA_CACHE)") { print "#define HAVE_MSLSA_CACHE 1\n"; } + if ("$(NO_LOCALNAME)") { print "#define NO_LOCALNAME 1\n"; } } elsif (m/\@VERSION_OPTDEFS\@/) { diff --git a/lib/gssapi/krb5/pname_to_uid.c b/lib/gssapi/krb5/pname_to_uid.c index c658161fc..c14ff9005 100644 --- a/lib/gssapi/krb5/pname_to_uid.c +++ b/lib/gssapi/krb5/pname_to_uid.c @@ -38,6 +38,10 @@ _gsskrb5_pname_to_uid(OM_uint32 *minor_status, const gss_OID mech_type, uid_t *uidp) { +#ifdef NO_LOCALNAME + *minor_status = KRB5_NO_LOCALNAME; + return GSS_S_FAILURE; +#else krb5_error_code ret; krb5_context context; krb5_const_principal princ = (krb5_const_principal)pname; @@ -77,4 +81,5 @@ _gsskrb5_pname_to_uid(OM_uint32 *minor_status, *uidp = pwd->pw_uid; return GSS_S_COMPLETE; +#endif /* NO_LOCALNAME */ } diff --git a/lib/gssapi/mech/gss_pname_to_uid.c b/lib/gssapi/mech/gss_pname_to_uid.c index 458b3757f..444d38a8d 100644 --- a/lib/gssapi/mech/gss_pname_to_uid.c +++ b/lib/gssapi/mech/gss_pname_to_uid.c @@ -59,6 +59,9 @@ attr_pname_to_uid(OM_uint32 *minor_status, struct _gss_mechanism_name *mn, uid_t *uidp) { +#ifdef NO_LOCALNAME + return GSS_S_UNAVAILABLE; +#else OM_uint32 major_status = GSS_S_UNAVAILABLE; OM_uint32 tmpMinor; int more = -1; @@ -124,6 +127,7 @@ attr_pname_to_uid(OM_uint32 *minor_status, } return major_status; +#endif /* NO_LOCALNAME */ } OM_uint32 diff --git a/windows/NTMakefile.config b/windows/NTMakefile.config index 0e1703832..27288fc8c 100644 --- a/windows/NTMakefile.config +++ b/windows/NTMakefile.config @@ -100,6 +100,9 @@ DIR_hdbdir=%{COMMON_APPDATA}/heimdal/hdb # Enable weak crypto WEAK_CRYPTO=1 +# Disable use of GSS LOCALNAME support +NO_LOCALNAME=1 + # Disable build of installers !ifndef NO_INSTALLERS BUILD_INSTALLERS=1