pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/poppassd - Fix hangup when communicating with smb...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/da7af98ff798
branches:  trunk
changeset: 504135:da7af98ff798
user:      taca <taca%pkgsrc.org@localhost>
date:      Mon Dec 05 14:12:29 2005 +0000

description:
- Fix hangup when communicating with smbpasswd(8).
- Quiet pkglint; changing make macro in double quotation into :Q modifier.

Bump PKGREVISION.

diffstat:

 mail/poppassd/Makefile         |   8 +++---
 mail/poppassd/distinfo         |   4 +-
 mail/poppassd/options.mk       |   4 +-
 mail/poppassd/patches/patch-ac |  49 ++++++++++++++++++++++++++++++++++++-----
 4 files changed, 51 insertions(+), 14 deletions(-)

diffs (152 lines):

diff -r 09e8f0b3b1c4 -r da7af98ff798 mail/poppassd/Makefile
--- a/mail/poppassd/Makefile    Mon Dec 05 14:08:46 2005 +0000
+++ b/mail/poppassd/Makefile    Mon Dec 05 14:12:29 2005 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.20 2005/06/16 06:58:03 jlam Exp $
+# $NetBSD: Makefile,v 1.21 2005/12/05 14:12:29 taca Exp $
 #
 
 DISTNAME=              qpopper${VERSION}
-PKGREVISION=           1
+PKGREVISION=           2
 PKGNAME=               poppassd-${VERSION}
 CATEGORIES=            mail
 MASTER_SITES=          ${QPOPPER_MASTER_SITES}
@@ -15,11 +15,11 @@
 HOMEPAGE=              ${QPOPPER_HOMEPAGE}
 COMMENT=               Qualcomm's password change server mainly for Eudora
 
-.include "../qpopper/Makefile.common"
+.include "../../mail/qpopper/Makefile.common"
 
 CONFIGURE_ARGS+=       --enable-poppassd --without-pam
 CONFIGURE_ENV+=        CDEFS='-DSMBPASSWD_BINARY=\"${LOCALBASE}/bin/smbpasswd\"'
-MAKE_ENV+=     ROOT_USER=${ROOT_USER} ROOT_GROUP=${ROOT_GROUP}
+MAKE_ENV+=     ROOT_USER=${ROOT_USER:Q} ROOT_GROUP=${ROOT_GROUP:Q}
 
 .include "options.mk"
 
diff -r 09e8f0b3b1c4 -r da7af98ff798 mail/poppassd/distinfo
--- a/mail/poppassd/distinfo    Mon Dec 05 14:08:46 2005 +0000
+++ b/mail/poppassd/distinfo    Mon Dec 05 14:12:29 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2005/06/15 05:26:20 taca Exp $
+$NetBSD: distinfo,v 1.13 2005/12/05 14:12:29 taca Exp $
 
 SHA1 (qpopper4.0.8.tar.gz) = 161038e6088b4952eedaf85fafa9f3b10eb40a01
 RMD160 (qpopper4.0.8.tar.gz) = 4a1dc2aaa6ef1330a76dfed5330d658a45e7d1d2
@@ -8,7 +8,7 @@
 Size (qpopper4.0.8-ipv6-20050515.diff.gz) = 11479 bytes
 SHA1 (patch-aa) = 0dd1bdc832d00bd640e7003afea28f0d90c2f975
 SHA1 (patch-ab) = 713698d5834b569a0ee08088567a71e218d50550
-SHA1 (patch-ac) = 66e6e30cf3e5983538fa4f3265a5244783ffeac9
+SHA1 (patch-ac) = 2da65909cdbf8932c1ee7d65b41e115fa961a040
 SHA1 (patch-ad) = 01036ef18732b3a7576ac79e35ea9b027e2eef63
 SHA1 (patch-ae) = fa5febd4eedccdbd5610821b222a689193993bae
 SHA1 (patch-af) = 76ad4e1f557876dd1adf6c74f97512ad2fd8b92d
diff -r 09e8f0b3b1c4 -r da7af98ff798 mail/poppassd/options.mk
--- a/mail/poppassd/options.mk  Mon Dec 05 14:08:46 2005 +0000
+++ b/mail/poppassd/options.mk  Mon Dec 05 14:12:29 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2005/06/13 16:57:02 taca Exp $
+# $NetBSD: options.mk,v 1.2 2005/12/05 14:12:29 taca Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.poppassd
 PKG_SUPPORTED_OPTIONS= inet6
@@ -6,7 +6,7 @@
 .include "../../mk/bsd.options.mk"
 
 .if !empty(PKG_OPTIONS:Minet6)
-CONFIGURE_ENV+=                O_DEFS="${O_DEFS}" CFLAGS="-DINET6"
+CONFIGURE_ENV+=                O_DEFS=${O_DEFS:Q} CFLAGS="-DINET6"
 .else
 CONFIGURE_ARGS+=       --disable-ipv6
 .endif
diff -r 09e8f0b3b1c4 -r da7af98ff798 mail/poppassd/patches/patch-ac
--- a/mail/poppassd/patches/patch-ac    Mon Dec 05 14:08:46 2005 +0000
+++ b/mail/poppassd/patches/patch-ac    Mon Dec 05 14:12:29 2005 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-ac,v 1.7 2005/06/15 05:26:20 taca Exp $
+$NetBSD: patch-ac,v 1.8 2005/12/05 14:12:29 taca Exp $
 
---- password/poppassd.c.orig   2005-06-15 14:14:48.000000000 +0900
+--- password/poppassd.c.orig   Mon Dec  5 10:45:21 2005
 +++ password/poppassd.c
 @@ -171,8 +171,13 @@
  /* LANMAN allows up to 14 char passwords (truncates if longer), but tacacs
@@ -25,6 +25,15 @@
  #if HAVE_SYS_NETINET_IN_H
  #  include <sys/netinet/in.h>
  #endif
+@@ -257,7 +264,7 @@ int     dochild (int master, char *slave
+ int     findpty (char **slave);
+ void    writestring (int fd, char *s);
+ int     talktochild (int master, char *user, char *oldpass, char *newpass,
+-                 char *emess, int asroot);
++                 char *emess);
+ int     match (char *str, char *pat);
+ int     expect (int master, char **expected, char *buf);
+ void    getemess (int master, char **expected, char *buf);
 @@ -274,7 +281,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 );
@@ -280,6 +289,15 @@
    /* fork child process to talk to password program */
  
    pid = fork();
+@@ -665,7 +729,7 @@ void runchild ( char *userid, char *oldp
+ 
+   if ( pid > 0 )   /* Parent */
+   {
+-    if (talktochild (master, userid, oldpass, newpass, emess, smb) == FAILURE)
++    if (talktochild (master, userid, oldpass, newpass, emess) == FAILURE)
+     {
+       logit ( trace_file, LOG_ERR, HERE, 
+               "%s failed for %s", smb ? "smbpasswd" : "passwd", userid );
 @@ -677,10 +741,16 @@ void runchild ( char *userid, char *oldp
      wpid = waitpid ( pid, &wstat, 0 );
      if ( wpid < 0 )
@@ -322,20 +340,39 @@
  /*
   * 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.
-@@ -885,6 +961,7 @@ void writestring (int fd, char *s)
+@@ -883,20 +959,19 @@ void writestring (int fd, char *s)
+  * that the password wasn't changed).
+  */
  int talktochild (int master, char *userid, char *oldpass, char *newpass,
-                  char *emess, int asroot)
+-                 char *emess, int asroot)
++                 char *emess)
  {
 +     int n;
       char buf[BUFSIZE];
       char pswd[BUFSIZE+1];
  
-@@ -926,6 +1003,8 @@ int talktochild (int master, char *useri
+      *emess = 0;
+ 
+      TRACE ( trace_file, POP_DEBUG, HERE,
+-             "talktochild; master=%d; userid=%s; asroot=%d",
+-             master, userid, asroot );
++             "talktochild; master=%d; userid=%s", master, userid);
+ 
+      /* only get current password if not root */
+-     if (!asroot)
+-     {
++     if (geteuid() == 0) {
+        /* wait for current password prompt */
+        if (!expect(master, P1, buf)) return FAILURE;
+ 
+@@ -926,6 +1001,10 @@ 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)
++     while ((n = read(master, buf, sizeof buf)) > 0) {
++        TRACE ( trace_file, POP_DEBUG, HERE, "reading remained output" );
 +      ;
++     }
       return SUCCESS;
  }
  



Home | Main Index | Thread Index | Old Index