diff options
Diffstat (limited to 'security/mit-krb5/patches/patch-as')
-rw-r--r-- | security/mit-krb5/patches/patch-as | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/security/mit-krb5/patches/patch-as b/security/mit-krb5/patches/patch-as new file mode 100644 index 00000000000..dd64800c0d2 --- /dev/null +++ b/security/mit-krb5/patches/patch-as @@ -0,0 +1,20 @@ +$NetBSD: patch-as,v 1.1 2006/08/09 17:31:10 salo Exp $ + +Security fix for SA21402. + +--- lib/krb4/kuserok.c.orig 2003-03-05 04:38:51.000000000 +0100 ++++ lib/krb4/kuserok.c 2006-08-09 18:52:53.000000000 +0200 +@@ -159,9 +159,11 @@ kuserok(kdata, luser) + */ + if(getuid() == 0) { + uid_t old_euid = geteuid(); +- seteuid(pwd->pw_uid); ++ if (seteuid(pwd->pw_uid) < 0) ++ return NOTOK; + fp = fopen(pbuf, "r"); +- seteuid(old_euid); ++ if (seteuid(old_euid) < 0) ++ return NOTOK; + if ((fp) == NULL) { + return(NOTOK); + } |