Fix nasty typo that randomly caused kinit to not properly deduce the
user's username when this was not specified. Reported by: Sean Eric Fagan
This commit is contained in:
parent
c740a51211
commit
a783721299
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=34938
@ -127,7 +127,7 @@ main(int argc, char **argv)
|
||||
strcmp(username, "root") != 0) {
|
||||
strncpy(aname, username, sizeof(aname));
|
||||
strncpy(inst, "root", sizeof(inst));
|
||||
} else {
|
||||
} else {
|
||||
pwd = getpwuid(uid);
|
||||
|
||||
if (pwd == (struct passwd *) NULL) {
|
||||
@ -137,7 +137,7 @@ main(int argc, char **argv)
|
||||
} else
|
||||
strncpy(aname, pwd->pw_name, sizeof(aname));
|
||||
}
|
||||
if (!*name)
|
||||
if (!*aname)
|
||||
return 0;
|
||||
if (!k_isname(aname)) {
|
||||
errx(1, "%s", "bad Kerberos name format");
|
||||
|
Loading…
Reference in New Issue
Block a user