diff options
author | jfitz <jfitz@FreeBSD.org> | 1996-11-04 04:45:24 +0800 |
---|---|---|
committer | jfitz <jfitz@FreeBSD.org> | 1996-11-04 04:45:24 +0800 |
commit | 233deaefcf35f57e0c7a977a999cc5933ee6b5dd (patch) | |
tree | f3a3b728ffb40c5c226283b4206bad6ce66031eb /mail | |
parent | 32bd724185fac694aa54cb22c5b277986200a3db (diff) | |
download | freebsd-ports-gnome-233deaefcf35f57e0c7a977a999cc5933ee6b5dd.tar.gz freebsd-ports-gnome-233deaefcf35f57e0c7a977a999cc5933ee6b5dd.tar.zst freebsd-ports-gnome-233deaefcf35f57e0c7a977a999cc5933ee6b5dd.zip |
Import of a server to allow users to change their password from within Eudora
Reviewed by: jfitz@FreeBSD.ORG
Submitted by: andrew@ugh.net.au
Diffstat (limited to 'mail')
-rw-r--r-- | mail/poppassd/Makefile | 31 | ||||
-rw-r--r-- | mail/poppassd/distinfo | 1 | ||||
-rw-r--r-- | mail/poppassd/files/patch-aa | 16 | ||||
-rw-r--r-- | mail/poppassd/files/patch-ab | 175 | ||||
-rw-r--r-- | mail/poppassd/files/poppassd.8 | 65 | ||||
-rw-r--r-- | mail/poppassd/pkg-comment | 1 | ||||
-rw-r--r-- | mail/poppassd/pkg-descr | 6 | ||||
-rw-r--r-- | mail/poppassd/pkg-plist | 2 |
8 files changed, 297 insertions, 0 deletions
diff --git a/mail/poppassd/Makefile b/mail/poppassd/Makefile new file mode 100644 index 000000000000..1fdff2c0762e --- /dev/null +++ b/mail/poppassd/Makefile @@ -0,0 +1,31 @@ +# New ports collection makefile for: poppassd +# Version required: 4.0 +# Date Created: 21 August 1996 +# Whom: Andrew Stevenson <andrew@ugh.net.au> based heavily on the changes by Stephen Melvin <melvin@zytek.com> +# +# $Id$ +# + +DISTNAME= poppassd +PKGNAME= poppassd-4.0 +CATEGORIES+= mail +MASTER_SITES= ftp://ftp.qualcomm.com/quest/unix/servers/password/ +DISTFILES= pwserve-4 + +MAINTAINER= andrew@ugh.net.au + +ALL_TARGET= poppassd + +EXTRACT_CMD= /bin/cat +EXTRACT_SUFX= +EXTRACT_BEFORE_ARGS= +EXTRACT_AFTER_ARGS= | /usr/bin/sed -e '1,16d' | /bin/sh + +post-install: + @ strip ${PREFIX}/libexec/poppassd + @ ${INSTALL_MAN} ${FILESDIR}/poppassd.8 ${PREFIX}/man/man8/ +.if !defined{NOMANCOMPRESS} + gzip -9nf ${PREFIX}/man/man8/poppassd.8 +.endif + +.include <bsd.port.mk> diff --git a/mail/poppassd/distinfo b/mail/poppassd/distinfo new file mode 100644 index 000000000000..a078b0facfc6 --- /dev/null +++ b/mail/poppassd/distinfo @@ -0,0 +1 @@ +MD5 (pwserve-4) = 4adfed0e48388631906ddf6eeb340352 diff --git a/mail/poppassd/files/patch-aa b/mail/poppassd/files/patch-aa new file mode 100644 index 000000000000..113fc983814f --- /dev/null +++ b/mail/poppassd/files/patch-aa @@ -0,0 +1,16 @@ +--- Makefile.orig Sun Nov 3 15:27:42 1996 ++++ Makefile Sun Nov 3 15:31:27 1996 +@@ -1,11 +1,11 @@ +-BINDIR = /usr/etc ++BINDIR = ${PREFIX}/libexec + LIBDIR = + CFLAGS = -g + LFLAGS = -g + CCM = cc -Em + + OBJECTS = poppassd.o +-LIBS = ++LIBS = -lcrypt + + poppassd: $(OBJECTS) + cc -o poppassd $(LFLAGS) $(OBJECTS) $(LIBS) diff --git a/mail/poppassd/files/patch-ab b/mail/poppassd/files/patch-ab new file mode 100644 index 000000000000..708472a14a3f --- /dev/null +++ b/mail/poppassd/files/patch-ab @@ -0,0 +1,175 @@ +--- poppassd.c.orig Wed Aug 21 17:02:02 1996 ++++ poppassd.c Sat Jun 22 11:32:44 1996 +@@ -13,11 +13,11 @@ + * + * Doesn't actually change any passwords itself. It simply listens for + * incoming requests, gathers the required information (user name, old +- * password, new password) and executes /bin/passwd, talking to it over ++ * password, new password) and executes /usr/bin/passwd, talking to it over + * a pseudo-terminal pair. The advantage of this is that we don't need + * to have any knowledge of either the password file format (which may + * include dbx files that need to be rebuilt) or of any file locking +- * protocol /bin/passwd and cohorts may use (and which isn't documented). ++ * protocol /usr/bin/passwd and cohorts may use (and which isn't documented). + * + * The current version has been tested at NU under SunOS release 4.1.2 + * and 4.1.3, and under HP-UX 8.02 and 9.01. We have tested the server +@@ -29,7 +29,7 @@ + * Note that unencrypted passwords are transmitted over the network. If + * this bothers you, think hard about whether you want to implement the + * password changing feature. On the other hand, it's no worse than what +- * happens when you run /bin/passwd while connected via telnet or rlogin. ++ * happens when you run /usr/bin/passwd while connected via telnet or rlogin. + * Well, maybe it is, since the use of a dedicated port makes it slightly + * easier for a network snooper to snarf passwords off the wire. + * +@@ -47,7 +47,7 @@ + * (which talks to /bin/password) is directly descended from Smith's + * version, with changes for SunOS and HP-UX by Norstad (with help from + * sample code in "Advanced Programming in the UNIX Environment" +- * by W. Richard Stevens). The code to report /bin/passwd error messages ++ * by W. Richard Stevens). The code to report /usr/bin/passwd error messages + * back to the client in the final 500 response, and a new version of the + * code to find the next free pty, is by Norstad. + * +@@ -145,6 +145,7 @@ + static char *P1[] = + {"Old password:", + "Changing password for *.\nOld password:", ++ "Changing local password for *.\nOld password:", + "Changing password for * on *.\nOld password:", + "Changing NIS password for * on *.\nOld password:", + "Changing password for *\n*'s Old password:", +@@ -165,6 +166,7 @@ + + static char *P4[] = + {"\n", ++ "\npasswd: rebuilding the database...\npasswd: done\n", + "NIS entry changed on *\n", + ""}; + +@@ -186,11 +188,7 @@ + + *user = *oldpass = *newpass = 0; + +- if (openlog ("poppassd", LOG_PID, LOG_LOCAL2) < 0) +- { +- WriteToClient ("500 Can't open syslog."); +- exit (1); +- } ++ openlog("poppassd", LOG_PID, LOG_LOCAL2); + + WriteToClient ("200 poppassd v%s hello, who are you?", VERSION); + ReadFromClient (line); +@@ -218,6 +216,7 @@ + + if (chkPass (user, oldpass, pw) == FAILURE) + { ++ syslog(LOG_ERR, "Incorrect password from %s", user); + WriteToClient ("500 Old password is incorrect."); + exit(1); + } +@@ -264,28 +263,28 @@ + + if ((wpid = waitpid (pid, &wstat, 0)) < 0) + { +- syslog (LOG_ERR, "wait for /bin/passwd child failed: %m"); ++ syslog (LOG_ERR, "wait for /usr/bin/passwd child failed: %m"); + WriteToClient ("500 Server error (wait failed), get help!"); + exit (1); + } + + if (pid != wpid) + { +- syslog (LOG_ERR, "wrong child (/bin/passwd waited for!"); ++ syslog (LOG_ERR, "wrong child (/usr/bin/passwd) waited for!"); + WriteToClient ("500 Server error (wrong child), get help!"); + exit (1); + } + + if (WIFEXITED (wstat) == 0) + { +- syslog (LOG_ERR, "child (/bin/passwd) killed?"); ++ syslog (LOG_ERR, "child (/usr/bin/passwd) killed?"); + WriteToClient ("500 Server error (funny wstat), get help!"); + exit (1); + } + + if (WEXITSTATUS (wstat) != 0) + { +- syslog (LOG_ERR, "child (/bin/passwd) exited abnormally"); ++ syslog (LOG_ERR, "child (/usr/bin/passwd) exited abnormally"); + WriteToClient ("500 Server error (abnormal exit), get help!"); + exit (1); + } +@@ -306,7 +305,7 @@ + { + /* + * Become the user trying who's password is being changed. We're +- * about to exec /bin/passwd with is setuid root anyway, but this ++ * about to exec /usr/bin/passwd with is setuid root anyway, but this + * way it looks to the child completely like it's being run by + * the normal user, which makes it do its own password verification + * before doing any thing. In theory, we've already verified the +@@ -324,7 +323,7 @@ + /* + * dochild + * +- * Do child stuff - set up slave pty and execl /bin/passwd. ++ * Do child stuff - set up slave pty and execl /usr/bin/passwd. + * + * Code adapted from "Advanced Programming in the UNIX Environment" + * by W. Richard Stevens. +@@ -387,10 +386,10 @@ + return(0); + } + +- /* Fork /bin/passwd. */ ++ /* Fork /usr/bin/passwd. */ + +- if (execl("/bin/passwd", "passwd", user, (char*)0) < 0) { +- syslog(LOG_ERR, "can't exec /bin/passwd: %m"); ++ if (execl("/usr/bin/passwd", "passwd", user, (char*)0) < 0) { ++ syslog(LOG_ERR, "can't exec /usr/bin/passwd: %m"); + return(0); + } + } +@@ -408,15 +407,20 @@ + * + * Modified by Norstad to remove assumptions about number of pty's allocated + * on this UNIX box. ++ * ++ * Modified by Stephen Melvin to allocate local space for static character ++ * array, rather than local space to pointer to constant string, which is ++ * not kosher and was crashing FreeBSD 1.1.5.1. + */ + findpty (slave) + char **slave; + { + int master; +- static char *line = "/dev/ptyXX"; ++ static char line[11]; + DIR *dirp; + struct dirent *dp; + ++ strcpy(line,"/dev/ptyXX"); + dirp = opendir("/dev"); + while ((dp = readdir(dirp)) != NULL) { + if (strncmp(dp->d_name, "pty", 3) == 0 && strlen(dp->d_name) == 5) { +@@ -485,7 +489,7 @@ + } + + writestring(master, pswd); +- ++ sleep(2); + if (!expect(master, P4, buf)) return FAILURE; + + return SUCCESS; +@@ -566,6 +570,7 @@ + } + n += m; + buf[n] = 0; ++/* syslog(LOG_ERR, "read from child: %s",buf); */ + initialSegment = 0; + for (s = expected; **s != 0; s++) { + result = match(buf, *s); diff --git a/mail/poppassd/files/poppassd.8 b/mail/poppassd/files/poppassd.8 new file mode 100644 index 000000000000..11363352c70a --- /dev/null +++ b/mail/poppassd/files/poppassd.8 @@ -0,0 +1,65 @@ +.Dd August 22, 1996 +.Dt POPPASSD 8 +.Os BSD 4.4 +.Sh NAME +.Nm poppassd +.Nd Eudora password change server +.Sh SYNOPSIS +.Nm /usr/local/libexec/poppassd +.Sh DESCRIPTION +.Nm +is a server that allows users of Eudora, PCEudora, +NUPOP and similar programs to change their password using their mail agent. +.Pp +.Nm +is invoked by the internet server (see +.Xr inetd 8 ) +for requests to connect to the poppassd port as indicated by the +.Pa /etc/services +file (see +.Xr services 5 ) . +.Pp +.Sh EXAMPLES +Assuming the +.BB poppassd +binary is located in +.Pa /usr/local/libexec +an entry like: +.Pp +.Bd -offset left +poppassd stream tcp nowait root /usr/local/libexec/poppassd poppassd +.Ed +.Pp +is required in the +.Pa /etc/inetd.conf +file. +.Pp +An entry like: +.Pp +poppassd 106/tcp +.Pp +is required in the +.Pa /etc/services +file. +.Pp +Assuming you wish +.BB poppassd +to log errors to +.Pa /var/log/pop.log +an entry like: +.Pp +local2.err /var/log/pop.log +.Pp +is required in +.Pa /etc/syslog.conf . +.Pp +.Sh FILES +.nf +/etc/services +/etc/syslog.conf logging specifications +/etc/inetd.conf poppassd invocation +.fi +.Sh "SEE ALSO" +.Xr inetd 8 , +.Xr services 5 , +.Xr popper 8 diff --git a/mail/poppassd/pkg-comment b/mail/poppassd/pkg-comment new file mode 100644 index 000000000000..4ce63455f2dc --- /dev/null +++ b/mail/poppassd/pkg-comment @@ -0,0 +1 @@ +A server to allow users to change their password from within Eudora diff --git a/mail/poppassd/pkg-descr b/mail/poppassd/pkg-descr new file mode 100644 index 000000000000..5084aa3f1716 --- /dev/null +++ b/mail/poppassd/pkg-descr @@ -0,0 +1,6 @@ +This is a port of poppassd, a program which allows users to change their +password using the "Change Password" menu item in Eudora. poppassd connections +use TCP port 106 by default. + +- Andrew +andrew@ugh.net.au diff --git a/mail/poppassd/pkg-plist b/mail/poppassd/pkg-plist new file mode 100644 index 000000000000..1564b97c8978 --- /dev/null +++ b/mail/poppassd/pkg-plist @@ -0,0 +1,2 @@ +libexec/poppassd +man/man8/poppassd.8.gz |