summaryrefslogtreecommitdiff
path: root/mail/poppassd
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2004-10-20 14:18:42 +0000
committertaca <taca@pkgsrc.org>2004-10-20 14:18:42 +0000
commitff4288762c4ea02d88a8caaed18d0cd958ef12e8 (patch)
tree05beb137073e18529613bb8829d91a1c4395ab52 /mail/poppassd
parentb5654576e618329ac8e4d7dd01d493405142ef70 (diff)
downloadpkgsrc-ff4288762c4ea02d88a8caaed18d0cd958ef12e8.tar.gz
- fix a problem that poppassd(8) would hang with smbpasswd(1).
- make it work on Solaris; tested on SunOS 5.8. Bump package revision.
Diffstat (limited to 'mail/poppassd')
-rw-r--r--mail/poppassd/Makefile4
-rw-r--r--mail/poppassd/distinfo7
-rw-r--r--mail/poppassd/patches/patch-ac88
-rw-r--r--mail/poppassd/patches/patch-ad14
-rw-r--r--mail/poppassd/patches/patch-ae12
-rw-r--r--mail/poppassd/patches/patch-af12
6 files changed, 108 insertions, 29 deletions
diff --git a/mail/poppassd/Makefile b/mail/poppassd/Makefile
index 01db8337ac5..b04fa863b21 100644
--- a/mail/poppassd/Makefile
+++ b/mail/poppassd/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.11 2004/04/18 05:07:49 snj Exp $
+# $NetBSD: Makefile,v 1.12 2004/10/20 14:18:42 taca Exp $
#
DISTNAME= qpopper${VERSION}
PKGNAME= poppassd-${VERSION}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= mail
MASTER_SITES= ftp://ftp.qualcomm.com/eudora/servers/unix/popper/
diff --git a/mail/poppassd/distinfo b/mail/poppassd/distinfo
index df8bc850896..ab5f740f5fc 100644
--- a/mail/poppassd/distinfo
+++ b/mail/poppassd/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2004/01/30 07:05:27 taca Exp $
+$NetBSD: distinfo,v 1.9 2004/10/20 14:18:42 taca Exp $
SHA1 (qpopper4.0.5.tar.gz) = 726d40da2210bf4b82541a28971986e6a3d9e1a5
Size (qpopper4.0.5.tar.gz) = 2281284 bytes
@@ -6,4 +6,7 @@ SHA1 (qpopper-4.0.5-ipv6-20030313.diff.gz) = 31858d41e1dab90019152d957a7ea3d69fe
Size (qpopper-4.0.5-ipv6-20030313.diff.gz) = 60773 bytes
SHA1 (patch-aa) = 0dd1bdc832d00bd640e7003afea28f0d90c2f975
SHA1 (patch-ab) = 713698d5834b569a0ee08088567a71e218d50550
-SHA1 (patch-ac) = 77420b58627a7bab36a9ad49957abd03ebdaaa71
+SHA1 (patch-ac) = db8329f0937554be80a88f4754b37f3a69bd70aa
+SHA1 (patch-ad) = 01036ef18732b3a7576ac79e35ea9b027e2eef63
+SHA1 (patch-ae) = fa5febd4eedccdbd5610821b222a689193993bae
+SHA1 (patch-af) = 76ad4e1f557876dd1adf6c74f97512ad2fd8b92d
diff --git a/mail/poppassd/patches/patch-ac b/mail/poppassd/patches/patch-ac
index 24e835d7e55..3804c54c201 100644
--- a/mail/poppassd/patches/patch-ac
+++ b/mail/poppassd/patches/patch-ac
@@ -1,6 +1,6 @@
-$NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
+$NetBSD: patch-ac,v 1.6 2004/10/20 14:18:42 taca Exp $
---- password/poppassd.c.orig 2004-01-30 15:59:13.000000000 +0900
+--- password/poppassd.c.orig Wed Oct 20 15:12:58 2004
+++ password/poppassd.c
@@ -167,8 +167,13 @@
/* LANMAN allows up to 14 char passwords (truncates if longer), but tacacs
@@ -16,7 +16,16 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
#include "config.h"
-@@ -273,7 +278,7 @@ void get_client_info ( POP *p, BOOL n
+@@ -176,6 +181,8 @@
+ #include <sys/stat.h>
+ #include <sys/wait.h>
+
++#include <signal.h>
++
+ #if HAVE_SYS_NETINET_IN_H
+ # include <sys/netinet/in.h>
+ #endif
+@@ -273,7 +280,7 @@ void get_client_info ( POP *p, BOOL n
char *sock_ntop ( struct sockaddr *p, int salen );
int sock_port ( struct sockaddr *p, int salen );
char *debug_str ( char *p, int inLen, int order );
@@ -25,7 +34,7 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
/*
* External prototypes
-@@ -294,6 +299,7 @@ pop_result auth_user ( POP *p, char *pas
+@@ -294,6 +301,7 @@ pop_result auth_user ( POP *p, char *pas
static char *P1[] =
{
@@ -33,7 +42,7 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
"changing password for *\nold password: ", /* shadow */
"enter login password: ", /* Solaris */
"old smb password: ", /* smb */
-@@ -323,6 +329,7 @@ static char *P4[] =
+@@ -323,6 +331,7 @@ static char *P4[] =
{
"password changed. ", /* shadow */
"password changed ", /* smb */
@@ -41,16 +50,16 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
""
};
-@@ -337,6 +344,8 @@ char msg_buf [ 2048 ] = ""
+@@ -337,6 +346,8 @@ char msg_buf [ 2048 ] = ""
char *pwd_binary = PASSWD_BINARY;
char *smb_binary = SMBPASSWD_BINARY;
-+int child_pid = 0;
-+int child_status = -1;
++int child_pid;
++int child_status;
/*
* Be careful using TRACE in an 'if' statement!
-@@ -346,18 +355,19 @@ char *smb_binary = SM
+@@ -346,18 +357,19 @@ char *smb_binary = SM
#define RUN_PASSWD 1
#define RUN_SMBPASSWD 2
@@ -72,7 +81,7 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
#ifdef HAS_SHADOW
struct spwd *spwd;
-@@ -375,8 +385,6 @@ int main ( int argc, char *argv[] )
+@@ -375,8 +387,6 @@ int main ( int argc, char *argv[] )
pname = ptr + 1;
}
@@ -81,7 +90,7 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
/*
* Set up some stuff in -p- so we can call Qpopper routines
*/
-@@ -384,6 +392,17 @@ int main ( int argc, char *argv[] )
+@@ -384,6 +394,17 @@ int main ( int argc, char *argv[] )
p.AuthType = noauth;
p.myname = pname;
@@ -99,7 +108,7 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
/*
* Handle command-line options
*/
-@@ -392,9 +411,9 @@ int main ( int argc, char *argv[] )
+@@ -392,9 +413,9 @@ int main ( int argc, char *argv[] )
{
switch (nopt)
{
@@ -112,7 +121,7 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
"[-t trace-file] [-v] [-y log-facility]\n",
pname );
exit (1);
-@@ -411,20 +430,34 @@ int main ( int argc, char *argv[] )
+@@ -411,20 +432,34 @@ int main ( int argc, char *argv[] )
verbose = TRUE;
break;
@@ -130,14 +139,14 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
TRACE ( trace_file, POP_DEBUG, HERE,
- "Changing SMB passwords using %s", smb_binary );
+ "Changing SMB password using %s", smb_binary );
- break;
-
++ break;
++
+ case 'P':
+ mode |= RUN_PASSWD;
+ TRACE ( trace_file, POP_DEBUG, HERE,
+ "Changing standard password enabled" );
-+ break;
-+
+ break;
+
+
case 'p':
mode |= RUN_PASSWD;
@@ -149,7 +158,7 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
break;
case 't':
-@@ -475,6 +508,10 @@ int main ( int argc, char *argv[] )
+@@ -475,6 +510,10 @@ int main ( int argc, char *argv[] )
"Avoiding reverse lookups (-R)" );
break;
@@ -160,7 +169,7 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
case 'y': /* log facility */
if ( optarg == NULL || *optarg == '\0' ) {
err_msg ( HERE, "-y value expected" );
-@@ -562,44 +599,50 @@ int main ( int argc, char *argv[] )
+@@ -562,44 +601,50 @@ int main ( int argc, char *argv[] )
return 1;
}
@@ -238,7 +247,7 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
return 1;
}
-@@ -631,6 +674,20 @@ int main ( int argc, char *argv[] )
+@@ -631,6 +676,20 @@ int main ( int argc, char *argv[] )
return 0;
}
@@ -259,16 +268,18 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
/* Run a child process to do the password change */
-@@ -651,6 +708,8 @@ void runchild ( char *userid, char *oldp
+@@ -651,6 +710,10 @@ void runchild ( char *userid, char *oldp
exit ( 1 );
}
+ signal(SIGCHLD, reapchild);
++ child_pid = 0;
++ child_status = -1;
+
/* fork child process to talk to password program */
pid = fork();
-@@ -675,10 +734,16 @@ void runchild ( char *userid, char *oldp
+@@ -675,10 +738,16 @@ void runchild ( char *userid, char *oldp
wpid = waitpid ( pid, &wstat, 0 );
if ( wpid < 0 )
{
@@ -288,19 +299,46 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
if ( pid != wpid )
{
-@@ -782,6 +847,11 @@ int dochild (int master, char *slavedev,
+@@ -700,7 +769,6 @@ void runchild ( char *userid, char *oldp
+ WriteToClient ("500 Server error (abnormal exit), get help!");
+ exit(1);
+ }
+-
+ close ( master ); /* done with the pty */
+ }
+ else /* Child */
+@@ -782,6 +850,13 @@ int dochild (int master, char *slavedev,
chdir ("/");
umask (0);
++#ifdef HAVE_SETLOGIN
+ if (setlogin(userid) < 0) {
+ err_msg ( HERE, "setlogin failed: %m" );
+ return(0);
+ }
++#endif
+
/*
* Become the user and run passwd. Linux shadowed passwd doesn't need
* to be run as root with the username passed on the command line.
-@@ -950,8 +1020,12 @@ int match (char *str, char *pat)
+@@ -880,6 +955,7 @@ void writestring (int fd, char *s)
+ int talktochild (int master, char *userid, char *oldpass, char *newpass,
+ char *emess, int asroot)
+ {
++ int n;
+ char buf[BUFSIZE];
+ char pswd[BUFSIZE+1];
+
+@@ -921,6 +997,8 @@ int talktochild (int master, char *useri
+ if ( !expect(master, P4, buf) )
+ TRACE ( trace_file, POP_DEBUG, HERE, "no response -- assuming OK" );
+
++ while ((n = read(master, buf, sizeof buf)) > 0)
++ ;
+ return SUCCESS;
+ }
+
+@@ -950,8 +1028,12 @@ int match (char *str, char *pat)
strlen(pat), debug_str(pat, strlen(pat), 1) );
while (*str && *pat) {
@@ -315,7 +353,7 @@ $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $
/* ignore multiple space sequences */
if (*pat == ' ' && isspace (*str)) {
-@@ -1050,7 +1124,11 @@ int expect (int master, char **expected,
+@@ -1050,7 +1132,11 @@ int expect (int master, char **expected,
if ( m < 0 ) {
err_msg ( HERE, "read error from child" );
return FAILURE;
diff --git a/mail/poppassd/patches/patch-ad b/mail/poppassd/patches/patch-ad
new file mode 100644
index 00000000000..ebe2f3475dd
--- /dev/null
+++ b/mail/poppassd/patches/patch-ad
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1 2004/10/20 14:18:42 taca Exp $
+
+--- config.h.in.orig 2004-10-20 14:19:23.413009000 +0900
++++ config.h.in
+@@ -58,6 +58,9 @@
+ /* Define if you don't have vprintf but do have _doprnt. */
+ #undef HAVE_DOPRNT
+
++/* Define if you have setlogin system call. */
++#undef HAVE_SETLOGIN
++
+ /* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
+ #undef HAVE_SYS_WAIT_H
+
diff --git a/mail/poppassd/patches/patch-ae b/mail/poppassd/patches/patch-ae
new file mode 100644
index 00000000000..27b43e144c4
--- /dev/null
+++ b/mail/poppassd/patches/patch-ae
@@ -0,0 +1,12 @@
+$NetBSD: patch-ae,v 1.1 2004/10/20 14:18:42 taca Exp $
+
+--- configure.in.orig 2004-10-20 14:19:23.863020000 +0900
++++ configure.in
+@@ -1440,6 +1440,7 @@ gethostbyname \
+ gettimeofday \
+ getusershell \
+ mkdir \
++setlogin \
+ socket \
+ strdup \
+ strerror \
diff --git a/mail/poppassd/patches/patch-af b/mail/poppassd/patches/patch-af
new file mode 100644
index 00000000000..649af79d5e7
--- /dev/null
+++ b/mail/poppassd/patches/patch-af
@@ -0,0 +1,12 @@
+$NetBSD: patch-af,v 1.1 2004/10/20 14:18:42 taca Exp $
+
+--- configure.orig 2004-10-20 14:19:23.833010000 +0900
++++ configure
+@@ -9227,6 +9227,7 @@ gethostbyname \
+ gettimeofday \
+ getusershell \
+ mkdir \
++setlogin \
+ socket \
+ strdup \
+ strerror \