summaryrefslogtreecommitdiffstats
path: root/usr.bin/passwd
diff options
context:
space:
mode:
authorassar <assar@FreeBSD.org>2001-03-12 03:52:00 +0000
committerassar <assar@FreeBSD.org>2001-03-12 03:52:00 +0000
commita8f26efb45f4a0e3585948ebc99d60716d6c99a0 (patch)
tree1084f27fb986b02bdd82f9161ac686d05eb040fd /usr.bin/passwd
parent1387b4dc3d325fc7b4f88127c391ca30063e6cf1 (diff)
downloadFreeBSD-src-a8f26efb45f4a0e3585948ebc99d60716d6c99a0.zip
FreeBSD-src-a8f26efb45f4a0e3585948ebc99d60716d6c99a0.tar.gz
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
Diffstat (limited to 'usr.bin/passwd')
-rw-r--r--usr.bin/passwd/passwd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/passwd/passwd.c b/usr.bin/passwd/passwd.c
index e69864a..0e03109 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));
}
OpenPOWER on IntegriCloud