Fix Appveyor Windows build

This commit is contained in:
Nicolas Williams
2019-10-03 13:01:44 -05:00
parent 989422e0fc
commit 338d47120b
2 changed files with 4 additions and 0 deletions

View File

@@ -372,8 +372,10 @@ _kadm5_c_get_cred_cache(krb5_context context,
char userbuf[128];
const char *user = NULL;
#ifndef WIN32
if (geteuid() == 0)
user = roken_get_loginname(userbuf, sizeof(userbuf));
#endif
if (user == NULL)
user = roken_get_username(userbuf, sizeof(userbuf));
if (user == NULL) {

View File

@@ -53,8 +53,10 @@ _krb5_get_default_principal_local (krb5_context context,
* order, otherwise we won't figure out to output
* <username>/root@DEFAULT_REALM.
*/
#ifndef WIN32
if (geteuid() == 0)
user = roken_get_loginname(userbuf, sizeof(userbuf));
#endif
if (user == NULL)
user = roken_get_username(userbuf, sizeof(userbuf));
if (user == NULL) {