diff options
author | Michael Hanselmann <hansmi@gentoo.org> | 2005-02-13 12:22:39 +0000 |
---|---|---|
committer | Michael Hanselmann <hansmi@gentoo.org> | 2005-02-13 12:22:39 +0000 |
commit | 7137dd637898816ccc60a6bf76ff43fb30290682 (patch) | |
tree | 71197da31c3202ec4aa009a2df087253d4c01e88 /net-mail/cmd5checkpw/files | |
parent | Stable on alpha. (diff) | |
download | gentoo-2-7137dd637898816ccc60a6bf76ff43fb30290682.tar.gz gentoo-2-7137dd637898816ccc60a6bf76ff43fb30290682.tar.bz2 gentoo-2-7137dd637898816ccc60a6bf76ff43fb30290682.zip |
New revision with bug 78256 fixed.
(Portage version: 2.0.51-r15)
Diffstat (limited to 'net-mail/cmd5checkpw/files')
-rw-r--r-- | net-mail/cmd5checkpw/files/digest-cmd5checkpw-0.22-r2 | 1 | ||||
-rw-r--r-- | net-mail/cmd5checkpw/files/euid.diff | 51 |
2 files changed, 52 insertions, 0 deletions
diff --git a/net-mail/cmd5checkpw/files/digest-cmd5checkpw-0.22-r2 b/net-mail/cmd5checkpw/files/digest-cmd5checkpw-0.22-r2 new file mode 100644 index 000000000000..53de5a450fbb --- /dev/null +++ b/net-mail/cmd5checkpw/files/digest-cmd5checkpw-0.22-r2 @@ -0,0 +1 @@ +MD5 40092caf3608cbc8bd23220b2b28cb52 cmd5checkpw-0.22.tar.gz 24323 diff --git a/net-mail/cmd5checkpw/files/euid.diff b/net-mail/cmd5checkpw/files/euid.diff new file mode 100644 index 000000000000..6f5ad4f89bdf --- /dev/null +++ b/net-mail/cmd5checkpw/files/euid.diff @@ -0,0 +1,51 @@ +--- main.c-orig 2004-11-23 11:34:05.757230992 +0100 ++++ main.c 2004-11-23 11:55:46.117546176 +0100 +@@ -6,6 +6,10 @@ + #include <stdio.h> + #include <unistd.h> + ++#include <sys/types.h> ++#include <unistd.h> ++ ++ + #define LINE_MAX 256 + #define SMTP_PASSWD_FILE "/etc/poppasswd" + char up[513]; +@@ -22,10 +26,26 @@ + unsigned char h; + FILE *fp; + int j; +- ++ uid_t uid; ++ gid_t gid; + char *linepnt; + + if ((fp = fopen(SMTP_PASSWD_FILE, "rt")) == NULL) _exit(2); ++ ++ uid = getuid(); ++ gid = getgid(); ++ ++ if (gid != getegid()) { ++ if (setegid(gid)) ++ _exit(2); ++ } ++ ++ ++ if (uid && (uid != geteuid())) { ++ if (seteuid(uid)) ++ _exit(2); ++ } ++ + while (fgets(line, LINE_MAX, fp) != NULL) { + if ((linepnt = strchr(line, '\n')) != NULL) { + *linepnt = 0; +@@ -38,7 +58,8 @@ + break; + } + } +- fclose(fp); ++ ++ if (EOF == fclose(fp)) _exit(2); + + if (!found_user) return(1); + |