(get_cred_cache): use get_default_username
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6314 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -227,18 +227,10 @@ get_cred_cache(krb5_context context,
|
||||
if(client == NULL)
|
||||
client = default_client;
|
||||
if(client == NULL) {
|
||||
char *user;
|
||||
const char *user;
|
||||
|
||||
user = get_default_username ();
|
||||
|
||||
user = getenv ("USERNAME");
|
||||
if (user == NULL) {
|
||||
user = getlogin();
|
||||
if(user == NULL) {
|
||||
struct passwd *pw = getpwuid(getuid());
|
||||
if (pw == NULL)
|
||||
return KADM5_FAILURE;
|
||||
user = pw->pw_name;
|
||||
}
|
||||
}
|
||||
if(user == NULL)
|
||||
return KADM5_FAILURE;
|
||||
ret = krb5_make_principal(context, &client,
|
||||
|
Reference in New Issue
Block a user