(common_auth): use KRB_VERIFY_SECURE instead of 1
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5573 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -242,6 +242,7 @@ common_auth(sia_collect_func_t *collect,
|
||||
struct passwd pw, *pwd, fpw, *fpwd;
|
||||
char pwbuf[1024], fpwbuf[1024];
|
||||
struct state *s = (struct state*)entity->mech[pkgind];
|
||||
int secure;
|
||||
|
||||
if(getpwnam_r(name, &pw, pwbuf, sizeof(pwbuf), &pwd) != 0){
|
||||
SIA_DEBUG(("DEBUG", "failed to getpwnam(%s)", name));
|
||||
@@ -282,8 +283,13 @@ common_auth(sia_collect_func_t *collect,
|
||||
toname, toinst, realm, name));
|
||||
return SIADFAIL;
|
||||
}
|
||||
if (getuid () == 0)
|
||||
secure = KRB_VERIFY_SECURE;
|
||||
else
|
||||
secure = KRB_VERIFY_NOT_SECURE;
|
||||
|
||||
ret = krb_verify_user(toname, toinst, realm,
|
||||
entity->password, getuid() == 0, NULL);
|
||||
entity->password, secure, NULL);
|
||||
if(ret){
|
||||
SIA_DEBUG(("DEBUG", "krb_verify_user: %s", krb_get_err_text(ret)));
|
||||
if(ret != KDC_PR_UNKNOWN)
|
||||
|
Reference in New Issue
Block a user