diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-mail/cmd5checkpw/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-mail/cmd5checkpw/files')
-rw-r--r-- | net-mail/cmd5checkpw/files/euid_030.diff | 49 | ||||
-rw-r--r-- | net-mail/cmd5checkpw/files/poppasswd | 3 | ||||
-rw-r--r-- | net-mail/cmd5checkpw/files/reloc.diff | 63 |
3 files changed, 115 insertions, 0 deletions
diff --git a/net-mail/cmd5checkpw/files/euid_030.diff b/net-mail/cmd5checkpw/files/euid_030.diff new file mode 100644 index 000000000000..12fa9ecc2e5d --- /dev/null +++ b/net-mail/cmd5checkpw/files/euid_030.diff @@ -0,0 +1,49 @@ +diff -upr cmd5checkpw-0.30.orig/main.c cmd5checkpw-0.30/main.c +--- cmd5checkpw-0.30.orig/main.c 2003-09-18 16:34:01.000000000 +0300 ++++ cmd5checkpw-0.30/main.c 2005-07-31 13:19:25.000000000 +0300 +@@ -5,6 +5,7 @@ + #include <pwd.h> + #include <stdio.h> + #include <unistd.h> ++#include <sys/types.h> + + #define LINE_MAX 256 + #define SASLUSERFILE "/var/qmail/users/authuser" +@@ -23,10 +24,26 @@ int doit(unsigned char *testlogin, unsig + unsigned char h; + FILE *fp; + int j; +- ++ uid_t uid; ++ gid_t gid; + char *linepnt; + + if ((fp = fopen(SASLUSERFILE, READONLY)) == 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; +@@ -39,7 +56,8 @@ int doit(unsigned char *testlogin, unsig + break; + } + } +- fclose(fp); ++ ++ if (EOF == fclose(fp)) _exit(2); + + if (!found_user) return(1); + diff --git a/net-mail/cmd5checkpw/files/poppasswd b/net-mail/cmd5checkpw/files/poppasswd new file mode 100644 index 000000000000..8fc1d4275ecd --- /dev/null +++ b/net-mail/cmd5checkpw/files/poppasswd @@ -0,0 +1,3 @@ +# Format of this file is one user:pass per line +# Like so... +# joedogger:sm311yf33t diff --git a/net-mail/cmd5checkpw/files/reloc.diff b/net-mail/cmd5checkpw/files/reloc.diff new file mode 100644 index 000000000000..7472436bf469 --- /dev/null +++ b/net-mail/cmd5checkpw/files/reloc.diff @@ -0,0 +1,63 @@ +diff -upr cmd5checkpw-0.30.orig/Makefile cmd5checkpw-0.30/Makefile +--- cmd5checkpw-0.30.orig/Makefile 2003-09-18 16:34:01.000000000 +0300 ++++ cmd5checkpw-0.30/Makefile 2005-07-31 14:41:16.000000000 +0300 +@@ -14,7 +14,7 @@ CFLAGS=-c -g -Wall -O3 + LD=gcc + LDFLAGS=-g -o ${TARGET} + +-default: main man cmd5checkpw ++default: cmd5checkpw + + main: cmd5checkpw.c conf-qmail + sed s}QMAILHOME}"`head -1 conf-qmail`"}g cmd5checkpw.c > main.c +diff -upr cmd5checkpw-0.30.orig/cmd5checkpw.8 cmd5checkpw-0.30/cmd5checkpw.8 +--- cmd5checkpw-0.30.orig/cmd5checkpw.8 2003-09-18 16:34:01.000000000 +0300 ++++ cmd5checkpw-0.30/cmd5checkpw.8 2005-07-31 14:43:20.000000000 +0300 +@@ -26,7 +26,7 @@ and a cram-md5 challenge terminated by \ + .B cmd5checkpw + recalcuates a MD5 digest using the provided plain challenge + and the passwords from +-.IR /var/qmail/users/authuser ++.IR /etc/poppasswd + and compares it with response (2nd parameter). If they are the same + then + .B cmd5checkpw +@@ -50,7 +50,7 @@ exits 111. + + .B cmd5checkpw + additionally compares the supplied password with the password in the +-.IR /var/qmail/user/authuser ++.IR /etc/poppasswd + file. Thus it can be used as a plain-text checkpassword + for PLAIN & LOGIN authtype (but we recommend using a crypted version for + security reasons). To use it, simply provide it with clear text password +@@ -68,7 +68,7 @@ interface. + Before invoking + .BR subprogram , + .B cmd5checkpw +-does not set up anything. Just because users from /var/qmail/user/authuser does not ++does not set up anything. Just because users from /etc/poppasswd does not + have to exist in the system so setting their uid,gid etc is not possible. + + Other +@@ -78,7 +78,7 @@ These effects must be documented; + applications will differ in their requirements. + + .SH "FILES" +-.IR /var/qmail/users/authuser ++.IR /etc/poppasswd + - this file contains pairs of logins and clear text passwords + separated by ":". It looks like this: + +diff -upr cmd5checkpw-0.30.orig/main.c cmd5checkpw-0.30/main.c +--- cmd5checkpw-0.30.orig/main.c 2003-09-18 16:34:01.000000000 +0300 ++++ cmd5checkpw-0.30/main.c 2005-07-31 14:43:36.000000000 +0300 +@@ -7,7 +7,7 @@ + #include <unistd.h> + + #define LINE_MAX 256 +-#define SASLUSERFILE "/var/qmail/users/authuser" ++#define SASLUSERFILE "/etc/poppasswd" + #define READONLY "r" + char up[513]; + int uplen; |