From 1d4589b693e395345032db256799b0dd6a94e1b9 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Mon, 12 Mar 2001 03:52:00 +0000 Subject: [PATCH] reset uid back to the user before doing kerberised change password. root permission is not needed and the kerberos library is paranoid about access control to the ticket file PR: bin/20779 --- usr.bin/passwd/passwd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/passwd/passwd.c b/usr.bin/passwd/passwd.c index e69864a0dedb..0e03109f6cda 100644 --- a/usr.bin/passwd/passwd.c +++ b/usr.bin/passwd/passwd.c @@ -216,6 +216,7 @@ main(argc, argv) k = auth_getval("auth_list"); if (k && strstr(k, "kerberos")) if(krb_get_lrealm(realm, 0) == KSUCCESS) { + setuid(getuid()); fprintf(stderr, "realm %s\n", realm); exit(krb_passwd(argv[0], iflag, rflag, uflag)); }