From bf6de27feb6c2240fcfa80640b2d89e9854fd37b Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Wed, 17 Mar 1999 22:37:44 +0000 Subject: [PATCH] (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 --- lib/auth/sia/sia.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/auth/sia/sia.c b/lib/auth/sia/sia.c index 8adc28728..271f540bd 100644 --- a/lib/auth/sia/sia.c +++ b/lib/auth/sia/sia.c @@ -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)