Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 2002 23:40:03 -0700 (PDT)
From:      Andrew <andrew@ugh.net.au>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/42359: mail/poppassd breaks with recent versions of /usr/bin/passwd
Message-ID:  <200209050640.g856e3bT029176@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/42359; it has been noted by GNATS.

From: Andrew <andrew@ugh.net.au>
To: Andrew Flury <andrew@flury.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/42359: mail/poppassd breaks with recent versions of
 /usr/bin/passwd
Date: Thu, 5 Sep 2002 16:34:42 +1000 (EST)

 poppassd was broken because the prompts emitted from passwd changed
 apparently with revision 1.6 of src/usr.sbin/vipw/pw_util.c and revision
 1.9 of src/usr.bin/passwd/local_passwd.c. I can't quite understand how it
 can have been broken that long but I no longer run the program personally
 so I can't swear it hasn't been. Everyone should run ports/mail/poppwd
 instead as it uses what should be a much more stable interface :-)
 
 While I'm here make the port honour CFLAGS and LDFLAGS if set, remove an
 apparently extraneous space from a patch and take away the commented out
 debugging code that the existing patch puts in for some reason.
 
 Thanks,
 
 Andrew
 
 
 
 diff -ruN /usr/ports/mail/poppassd/Makefile poppassd/Makefile
 --- /usr/ports/mail/poppassd/Makefile	Tue Feb  6 02:11:02 2001
 +++ poppassd/Makefile	Thu Sep  5 16:17:48 2002
 @@ -7,6 +7,7 @@
 
  PORTNAME=	poppassd
  PORTVERSION=	4.0
 +PORTREVISION=	1
  CATEGORIES=	mail
  MASTER_SITES=	ftp://ftp.qualcomm.com/eudora/servers/unix/password/
  DISTNAME=	pwserve-4
 diff -ruN /usr/ports/mail/poppassd/files/patch-aa poppassd/files/patch-aa
 --- /usr/ports/mail/poppassd/files/patch-aa	Mon Nov  4 07:45:24 1996
 +++ poppassd/files/patch-aa	Thu Sep  5 16:14:04 2002
 @@ -1,11 +1,13 @@
 ---- Makefile.orig	Sun Nov  3 15:27:42 1996
 -+++ Makefile	Sun Nov  3 15:31:27 1996
 +--- Makefile.orig	Thu Sep  5 16:11:10 2002
 ++++ Makefile	Thu Sep  5 16:13:58 2002
  @@ -1,11 +1,11 @@
  -BINDIR = /usr/etc
  +BINDIR = ${PREFIX}/libexec
   LIBDIR =
 - CFLAGS = -g
 - LFLAGS = -g
 +-CFLAGS = -g
 +-LFLAGS = -g
 ++CFLAGS?= -g
 ++LFLAGS?= ${LDFLAGS}
   CCM = cc -Em
 
   OBJECTS = poppassd.o
 diff -ruN /usr/ports/mail/poppassd/files/patch-ab poppassd/files/patch-ab
 --- /usr/ports/mail/poppassd/files/patch-ab	Sat Jul 28 17:20:49 2001
 +++ poppassd/files/patch-ab	Thu Sep  5 16:07:40 2002
 @@ -1,5 +1,5 @@
 ---- poppassd.c.orig	Mon Jun  7 19:34:23 1999
 -+++ poppassd.c	Mon Jun  7 19:40:00 1999
 +--- poppassd.c.orig	Thu Sep  5 11:44:07 2002
 ++++ poppassd.c	Thu Sep  5 16:07:09 2002
  @@ -13,11 +13,11 @@
    *
    * Doesn't actually change any passwords itself.  It simply listens for
 @@ -39,21 +39,22 @@
  +    "Changing local password for *.\nOld password:",
       "Changing password for * on *.\nOld password:",
  -    "Changing NIS password for * on *.\nOld password:",
 -+    "Changing NIS password for * on *.\nOld Password: ",
 ++    "Changing NIS password for * on *.\nOld Password:",
       "Changing password for *\n*'s Old password:",
       ""};
 
 -@@ -165,7 +166,9 @@
 +@@ -165,7 +166,10 @@
 
   static char *P4[] =
      {"\n",
  +    "\npasswd: rebuilding the database...\npasswd: done\n",
 ++	"\npasswd: updating the database...\npasswd: done\n",
       "NIS entry changed on *\n",
  +    "\n\nNIS password has been changed on *.\n",
       ""};
 
 
 -@@ -186,11 +189,7 @@
 +@@ -186,11 +190,7 @@
 
        *user = *oldpass = *newpass = 0;
 
 @@ -66,7 +67,7 @@
 
        WriteToClient ("200 poppassd v%s hello, who are you?", VERSION);
        ReadFromClient (line);
 -@@ -212,12 +211,16 @@
 +@@ -212,12 +212,16 @@
 
        if ((pw = getpwnam (user)) == NULL)
        {
 @@ -84,7 +85,7 @@
   	  WriteToClient ("500 Old password is incorrect.");
   	  exit(1);
        }
 -@@ -264,28 +267,28 @@
 +@@ -264,28 +268,28 @@
 
   	  if ((wpid = waitpid (pid, &wstat, 0)) < 0)
   	  {
 @@ -117,7 +118,7 @@
   	       WriteToClient ("500 Server error (abnormal exit), get help!");
   	       exit (1);
   	  }
 -@@ -304,17 +307,19 @@
 +@@ -304,17 +308,19 @@
        }
        else      /* Child */
        {
 @@ -148,7 +149,7 @@
   	  setuid (pw->pw_uid);
   	  setgid (pw->pw_gid);
   	  dochild (master, slavedev, user);
 -@@ -324,7 +329,7 @@
 +@@ -324,7 +330,7 @@
   /*
    * dochild
    *
 @@ -157,7 +158,7 @@
    *
    * Code adapted from "Advanced Programming in the UNIX Environment"
    * by W. Richard Stevens.
 -@@ -338,13 +343,6 @@
 +@@ -338,13 +344,6 @@
      int slave;
      struct termios stermios;
 
 @@ -171,7 +172,7 @@
      /* Open slave pty and acquire as new controlling terminal. */
 
      if ((slave = open(slavedev, O_RDWR)) < 0) {
 -@@ -387,10 +385,10 @@
 +@@ -387,10 +386,10 @@
         return(0);
      }
 
 @@ -185,7 +186,7 @@
         return(0);
      }
   }
 -@@ -408,15 +406,20 @@
 +@@ -408,15 +407,20 @@
    *
    * Modified by Norstad to remove assumptions about number of pty's allocated
    * on this UNIX box.
 @@ -207,24 +208,15 @@
      dirp = opendir("/dev");
      while ((dp = readdir(dirp)) != NULL) {
         if (strncmp(dp->d_name, "pty", 3) == 0 && strlen(dp->d_name) == 5) {
 -@@ -485,9 +488,11 @@
 +@@ -485,8 +489,10 @@
        }
 
        writestring(master, pswd);
  -
  +     sleep(2);
        if (!expect(master, P4, buf)) return FAILURE;
 -
 -+     close(master);
  +
 ++     close(master);
 +
        return SUCCESS;
   }
 -
 -@@ -566,6 +571,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);
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209050640.g856e3bT029176>