head 1.11; access; symbols pkgsrc-2026Q1:1.11.0.2 pkgsrc-2026Q1-base:1.11 pkgsrc-2025Q4:1.10.0.112 pkgsrc-2025Q4-base:1.10 pkgsrc-2025Q3:1.10.0.110 pkgsrc-2025Q3-base:1.10 pkgsrc-2025Q2:1.10.0.108 pkgsrc-2025Q2-base:1.10 pkgsrc-2025Q1:1.10.0.106 pkgsrc-2025Q1-base:1.10 pkgsrc-2024Q4:1.10.0.104 pkgsrc-2024Q4-base:1.10 pkgsrc-2024Q3:1.10.0.102 pkgsrc-2024Q3-base:1.10 pkgsrc-2024Q2:1.10.0.100 pkgsrc-2024Q2-base:1.10 pkgsrc-2024Q1:1.10.0.98 pkgsrc-2024Q1-base:1.10 pkgsrc-2023Q4:1.10.0.96 pkgsrc-2023Q4-base:1.10 pkgsrc-2023Q3:1.10.0.94 pkgsrc-2023Q3-base:1.10 pkgsrc-2023Q2:1.10.0.92 pkgsrc-2023Q2-base:1.10 pkgsrc-2023Q1:1.10.0.90 pkgsrc-2023Q1-base:1.10 pkgsrc-2022Q4:1.10.0.88 pkgsrc-2022Q4-base:1.10 pkgsrc-2022Q3:1.10.0.86 pkgsrc-2022Q3-base:1.10 pkgsrc-2022Q2:1.10.0.84 pkgsrc-2022Q2-base:1.10 pkgsrc-2022Q1:1.10.0.82 pkgsrc-2022Q1-base:1.10 pkgsrc-2021Q4:1.10.0.80 pkgsrc-2021Q4-base:1.10 pkgsrc-2021Q3:1.10.0.78 pkgsrc-2021Q3-base:1.10 pkgsrc-2021Q2:1.10.0.76 pkgsrc-2021Q2-base:1.10 pkgsrc-2021Q1:1.10.0.74 pkgsrc-2021Q1-base:1.10 pkgsrc-2020Q4:1.10.0.72 pkgsrc-2020Q4-base:1.10 pkgsrc-2020Q3:1.10.0.70 pkgsrc-2020Q3-base:1.10 pkgsrc-2020Q2:1.10.0.66 pkgsrc-2020Q2-base:1.10 pkgsrc-2020Q1:1.10.0.46 pkgsrc-2020Q1-base:1.10 pkgsrc-2019Q4:1.10.0.68 pkgsrc-2019Q4-base:1.10 pkgsrc-2019Q3:1.10.0.64 pkgsrc-2019Q3-base:1.10 pkgsrc-2019Q2:1.10.0.62 pkgsrc-2019Q2-base:1.10 pkgsrc-2019Q1:1.10.0.60 pkgsrc-2019Q1-base:1.10 pkgsrc-2018Q4:1.10.0.58 pkgsrc-2018Q4-base:1.10 pkgsrc-2018Q3:1.10.0.56 pkgsrc-2018Q3-base:1.10 pkgsrc-2018Q2:1.10.0.54 pkgsrc-2018Q2-base:1.10 pkgsrc-2018Q1:1.10.0.52 pkgsrc-2018Q1-base:1.10 pkgsrc-2017Q4:1.10.0.50 pkgsrc-2017Q4-base:1.10 pkgsrc-2017Q3:1.10.0.48 pkgsrc-2017Q3-base:1.10 pkgsrc-2017Q2:1.10.0.44 pkgsrc-2017Q2-base:1.10 pkgsrc-2017Q1:1.10.0.42 pkgsrc-2017Q1-base:1.10 pkgsrc-2016Q4:1.10.0.40 pkgsrc-2016Q4-base:1.10 pkgsrc-2016Q3:1.10.0.38 pkgsrc-2016Q3-base:1.10 pkgsrc-2016Q2:1.10.0.36 pkgsrc-2016Q2-base:1.10 pkgsrc-2016Q1:1.10.0.34 pkgsrc-2016Q1-base:1.10 pkgsrc-2015Q4:1.10.0.32 pkgsrc-2015Q4-base:1.10 pkgsrc-2015Q3:1.10.0.30 pkgsrc-2015Q3-base:1.10 pkgsrc-2015Q2:1.10.0.28 pkgsrc-2015Q2-base:1.10 pkgsrc-2015Q1:1.10.0.26 pkgsrc-2015Q1-base:1.10 pkgsrc-2014Q4:1.10.0.24 pkgsrc-2014Q4-base:1.10 pkgsrc-2014Q3:1.10.0.22 pkgsrc-2014Q3-base:1.10 pkgsrc-2014Q2:1.10.0.20 pkgsrc-2014Q2-base:1.10 pkgsrc-2014Q1:1.10.0.18 pkgsrc-2014Q1-base:1.10 pkgsrc-2013Q4:1.10.0.16 pkgsrc-2013Q4-base:1.10 pkgsrc-2013Q3:1.10.0.14 pkgsrc-2013Q3-base:1.10 pkgsrc-2013Q2:1.10.0.12 pkgsrc-2013Q2-base:1.10 pkgsrc-2013Q1:1.10.0.10 pkgsrc-2013Q1-base:1.10 pkgsrc-2012Q4:1.10.0.8 pkgsrc-2012Q4-base:1.10 pkgsrc-2012Q3:1.10.0.6 pkgsrc-2012Q3-base:1.10 pkgsrc-2012Q2:1.10.0.4 pkgsrc-2012Q2-base:1.10 pkgsrc-2012Q1:1.10.0.2 pkgsrc-2012Q1-base:1.10 pkgsrc-2011Q4:1.9.0.18 pkgsrc-2011Q4-base:1.9 pkgsrc-2011Q3:1.9.0.16 pkgsrc-2011Q3-base:1.9 pkgsrc-2011Q2:1.9.0.14 pkgsrc-2011Q2-base:1.9 pkgsrc-2011Q1:1.9.0.12 pkgsrc-2011Q1-base:1.9 pkgsrc-2010Q4:1.9.0.10 pkgsrc-2010Q4-base:1.9 pkgsrc-2010Q3:1.9.0.8 pkgsrc-2010Q3-base:1.9 pkgsrc-2010Q2:1.9.0.6 pkgsrc-2010Q2-base:1.9 pkgsrc-2010Q1:1.9.0.4 pkgsrc-2010Q1-base:1.9 pkgsrc-2009Q4:1.9.0.2 pkgsrc-2009Q4-base:1.9 pkgsrc-2009Q3:1.8.0.36 pkgsrc-2009Q3-base:1.8 pkgsrc-2009Q2:1.8.0.34 pkgsrc-2009Q2-base:1.8 pkgsrc-2009Q1:1.8.0.32 pkgsrc-2009Q1-base:1.8 pkgsrc-2008Q4:1.8.0.30 pkgsrc-2008Q4-base:1.8 pkgsrc-2008Q3:1.8.0.28 pkgsrc-2008Q3-base:1.8 cube-native-xorg:1.8.0.26 cube-native-xorg-base:1.8 pkgsrc-2008Q2:1.8.0.24 pkgsrc-2008Q2-base:1.8 cwrapper:1.8.0.22 pkgsrc-2008Q1:1.8.0.20 pkgsrc-2008Q1-base:1.8 pkgsrc-2007Q4:1.8.0.18 pkgsrc-2007Q4-base:1.8 pkgsrc-2007Q3:1.8.0.16 pkgsrc-2007Q3-base:1.8 pkgsrc-2007Q2:1.8.0.14 pkgsrc-2007Q2-base:1.8 pkgsrc-2007Q1:1.8.0.12 pkgsrc-2007Q1-base:1.8 pkgsrc-2006Q4:1.8.0.10 pkgsrc-2006Q4-base:1.8 pkgsrc-2006Q3:1.8.0.8 pkgsrc-2006Q3-base:1.8 pkgsrc-2006Q2:1.8.0.6 pkgsrc-2006Q2-base:1.8 pkgsrc-2006Q1:1.8.0.4 pkgsrc-2006Q1-base:1.8 pkgsrc-2005Q4:1.8.0.2 pkgsrc-2005Q4-base:1.8 pkgsrc-2005Q3:1.7.0.4 pkgsrc-2005Q3-base:1.7 pkgsrc-2005Q2:1.7.0.2 pkgsrc-2005Q2-base:1.7 pkgsrc-2005Q1:1.6.0.4 pkgsrc-2005Q1-base:1.6 pkgsrc-2004Q4:1.6.0.2 pkgsrc-2004Q4-base:1.6 pkgsrc-2004Q3:1.5.0.6 pkgsrc-2004Q3-base:1.5 pkgsrc-2004Q2:1.5.0.4 pkgsrc-2004Q2-base:1.5 pkgsrc-2004Q1:1.5.0.2 pkgsrc-2004Q1-base:1.5 pkgsrc-2003Q4:1.3.0.8 pkgsrc-2003Q4-base:1.3 netbsd-1-6-1:1.3.0.4 netbsd-1-6-1-base:1.3 netbsd-1-6:1.3.0.6 netbsd-1-6-RELEASE-base:1.3 pkgviews:1.3.0.2 pkgviews-base:1.3 buildlink2:1.2.0.2 buildlink2-base:1.2 netbsd-1-5-PATCH003:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.11 date 2026.03.19.07.53.03; author nia; state Exp; branches; next 1.10; commitid bPuxZCm5Ecy0GyyG; 1.10 date 2012.03.22.14.15.32; author taca; state Exp; branches; next 1.9; 1.9 date 2009.12.27.14.17.38; author obache; state Exp; branches; next 1.8; 1.8 date 2005.12.05.14.12.29; author taca; state Exp; branches; next 1.7; 1.7 date 2005.06.15.05.26.20; author taca; state Exp; branches; next 1.6; 1.6 date 2004.10.20.14.18.42; author taca; state Exp; branches; next 1.5; 1.5 date 2004.01.30.07.05.28; author taca; state Exp; branches; next 1.4; 1.4 date 2004.01.29.15.45.00; author taca; state Exp; branches; next 1.3; 1.3 date 2002.07.16.15.01.50; author taca; state Exp; branches; next 1.2; 1.2 date 2002.05.02.16.16.56; author martti; state Exp; branches; next 1.1; 1.1 date 2001.06.10.15.15.07; author taca; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.06.10.15.15.07; author taca; state Exp; branches; next ; desc @@ 1.11 log @poppassd: Fix build with recent GCC. ... interesting package name @ text @$NetBSD: patch-ac,v 1.10 2012/03/22 14:15:32 taca Exp $ --- password/poppassd.c.orig 2011-05-30 19:13:39.000000000 +0000 +++ password/poppassd.c @@@@ -171,14 +171,20 @@@@ /* LANMAN allows up to 14 char passwords (truncates if longer), but tacacs only seems to allow 11. */ +#ifndef PASSWD_BINARY #define PASSWD_BINARY "/usr/bin/passwd" /* TBD: config.h */ -#define SMBPASSWD_BINARY "/usr/bin/smbpasswd" /* TBD: config.h */ +#endif + +#ifndef SMBPASSWD_BINARY +#define SMBPASSWD_BINARY "@@PREFIX@@/bin/smbpasswd" /* TBD: config.h */ +#endif #include "config.h" #include #include #include +#include #if HAVE_SYS_NETINET_IN_H # include @@@@ -251,7 +257,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); @@@@ -268,6 +274,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 ); +void reapchild (int); /* @@@@ -289,6 +296,8 @@@@ pop_result auth_user ( POP *p, char *pas static char *P1[] = { + "changing local password for *\nold password: ", /* BSD */ + "old password: ", /* NetBSD>=3.0 */ "changing password for *\nold password: ", /* shadow */ "enter login password: ", /* Solaris */ "old smb password: ", /* smb */ @@@@ -318,6 +327,7 @@@@ static char *P4[] = { "password changed. ", /* shadow */ "password changed ", /* smb */ + "password changed for user *\n", /* smb */ "" }; @@@@ -332,6 +342,8 @@@@ char msg_buf [ 2048 ] = "" char *pwd_binary = PASSWD_BINARY; char *smb_binary = SMBPASSWD_BINARY; +int child_pid; +int child_status; /* * Be careful using TRACE in an 'if' statement! @@@@ -348,11 +360,13 @@@@ int main ( int argc, char *argv[] ) char oldpass [BUFSIZE] = ""; char newpass [BUFSIZE] = ""; int nopt = -1; - static char options [] = "dl:p:Rs:t:vy:?"; + static char options [] = "dhl:oPp:RSs:t:vy:"; int mode = 0; char *ptr = NULL; POP p; BOOL no_rev_lookup = FALSE; + int compat_mode = 0; + BOOL bad_user = FALSE; #ifdef HAS_SHADOW struct spwd *spwd; @@@@ -370,8 +384,6 @@@@ int main ( int argc, char *argv[] ) pname = ptr + 1; } - openlog ( pname, POP_LOGOPTS, LOG_LOCAL2 ); - /* * Set up some stuff in -p- so we can call Qpopper routines */ @@@@ -379,6 +391,17 @@@@ int main ( int argc, char *argv[] ) p.AuthType = noauth; p.myname = pname; +#ifndef POP_FACILITY +# if defined(OSF1) || defined(LINUX) +# define POP_FACILITY LOG_MAIL +# else +# define POP_FACILITY LOG_LOCAL0 +# endif /* OSF1 or Linux */ +#endif /* POP_FACILITY not defined */ + + p.log_facility = (log_facility_type) POP_FACILITY; + openlog ( pname, POP_LOGOPTS, p.log_facility ); + /* * Handle command-line options */ @@@@ -387,9 +410,9 @@@@ int main ( int argc, char *argv[] ) { switch (nopt) { - case '?': - fprintf ( stderr, "%s [-?] [-d] [-l 0|1|2] [-p [passd-path]] " - "[-R] [-s [smbpasswd-path]]\n\t" + case 'h': + fprintf ( stderr, "%s [-h] [-d] [-l 0|1|2] [-p [passd-path]] " + "[-P] [-R] [-S] [-s [smbpasswd-path]]\n\t" "[-t trace-file] [-v] [-y log-facility]\n", pname ); exit (1); @@@@ -406,6 +429,13 @@@@ int main ( int argc, char *argv[] ) verbose = TRUE; break; + case 'S': + mode |= RUN_SMBPASSWD; + TRACE ( trace_file, POP_DEBUG, HERE, + "Changing SMB password enabled" ); + break; + + case 's': mode |= RUN_SMBPASSWD; if ( optarg != NULL && *optarg != '\0' ) @@@@ -414,6 +444,13 @@@@ int main ( int argc, char *argv[] ) "Changing SMB passwords using %s", smb_binary ); break; + case 'P': + mode |= RUN_PASSWD; + TRACE ( trace_file, POP_DEBUG, HERE, + "Changing standard password enabled" ); + break; + + case 'p': mode |= RUN_PASSWD; if ( optarg != NULL && *optarg != '\0' ) @@@@ -470,6 +507,10 @@@@ int main ( int argc, char *argv[] ) "Avoiding reverse lookups (-R)" ); break; + case 'o': /* compatibility mode */ + compat_mode = 1; + break; + case 'y': /* log facility */ if ( optarg == NULL || *optarg == '\0' ) { err_msg ( HERE, "-y value expected" ); @@@@ -557,44 +598,51 @@@@ int main ( int argc, char *argv[] ) return 1; } - WriteToClient ( "200 your new password please." ); - ReadFromClient ( line ); - sscanf ( line, "newpass %s", newpass ); - - /* new pass required */ - if ( strlen (newpass) == 0 ) - { - WriteToClient ("500 New password required."); - return 1; - } - pw = getpwnam ( userid ); if ( pw == NULL ) { - WriteToClient ( "500 Invalid user or password" ); - return 1; - } + bad_user = TRUE; + } else { #ifdef HAS_SHADOW - if ((spwd = getspnam(userid)) == NULL) - pw->pw_passwd = ""; - else pw->pw_passwd = spwd->sp_pwdp; + if ((spwd = getspnam(userid)) == NULL) + pw->pw_passwd = ""; + else + pw->pw_passwd = spwd->sp_pwdp; #endif + if ( chkPass ( userid, oldpass, pw, &p ) == FAILURE ) + { + syslog ( LOG_ERR, "password failure for %s", userid ); + bad_user = TRUE; + } + + if ( pw->pw_uid <= BLOCK_UID ) + { + syslog( LOG_ERR, "someone tried to change %s's password", userid ); + bad_user = TRUE; + } + } + if (compat_mode && bad_user) { + sleep(1); /* XXX */ + WriteToClient ( "500 Invalid user or password" ); + return 1; + } - if ( chkPass ( userid, oldpass, pw, &p ) == FAILURE ) - { - syslog ( LOG_ERR, "password failure for %s", userid ); - WriteToClient ( "500 Invalid user or password" ); - return 1; + WriteToClient ( "200 your new password please." ); + ReadFromClient ( line ); + sscanf ( line, "newpass %s", newpass ); + + if (bad_user) { + WriteToClient ( "500 Invalid user or password" ); + return 1; } - if ( pw->pw_uid <= BLOCK_UID ) - - { - syslog ( LOG_ERR, "someone tried to change %s's password", userid ); - WriteToClient ( "500 Not a user account." ); + /* new pass required */ + if ( strlen (newpass) == 0 ) + { + WriteToClient ("500 New password required."); return 1; } @@@@ -627,6 +675,20 @@@@ int main ( int argc, char *argv[] ) return 0; } +/* catch child */ +void +reapchild(sig) + int sig; +{ + int status; + int pid; + + while ((pid = wait3(&status, WNOHANG, NULL)) > 0) { + child_pid = pid; + child_status = status; + } +} + /* Run a child process to do the password change */ @@@@ -647,6 +709,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(); @@@@ -659,7 +725,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 ); @@@@ -671,10 +737,16 @@@@ void runchild ( char *userid, char *oldp wpid = waitpid ( pid, &wstat, 0 ); if ( wpid < 0 ) { - logit ( trace_file, LOG_ERR, HERE, "wait for child failed" ); - WriteToClient ("500 Server error (wait failed), get help!"); - exit(1); + if (child_pid > 0) { + wpid = child_pid; + wstat = child_status; + } else { + logit ( trace_file, LOG_ERR, HERE, "wait for child failed" ); + WriteToClient ("500 Server error (wait failed), get help!"); + exit(1); + } } + signal(SIGCHLD, SIG_DFL); if ( pid != wpid ) { @@@@ -778,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. @@@@ -877,20 +956,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 n; char buf[BUFSIZE]; char pswd[BUFSIZE+1]; *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; @@@@ -920,6 +998,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) { + TRACE ( trace_file, POP_DEBUG, HERE, "reading remained output" ); + ; + } return SUCCESS; } @@@@ -949,8 +1031,12 @@@@ int match (char *str, char *pat) strlen(pat), debug_str(pat, strlen(pat), 1) ); while (*str && *pat) { - if (*pat == '*') - break; + if (*pat == '*') { + pat++; + while (*str != '\0' && *str != '\n') + *str++; + continue; + } /* ignore multiple space sequences */ if (*pat == ' ' && isspace (*str)) { @@@@ -1049,7 +1135,11 @@@@ int expect (int master, char **expected, if ( m < 0 ) { err_msg ( HERE, "read error from child" ); return FAILURE; - } + } else if (m == 0) { + TRACE ( trace_file, POP_DEBUG, HERE, "no data from child"); + return FAILURE; + } + buf [ n + m ] = '\0'; TRACE ( trace_file, POP_DEBUG, HERE, "...read: (%d) '%.128s'", @@@@ -1651,6 +1741,7 @@@@ sock_ntop ( p, salen ) #endif /* INET6 */ } +int sock_port ( p, salen ) struct sockaddr *p; int salen; @ 1.10 log @Update poppassd to 4.1.0. Use the same distfile with qpopper 4.1.0. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.9 2009/12/27 14:17:38 obache Exp $ d382 8 @ 1.9 log @some improvement and fixes for qpopper and poppassd. qpopper: * add user-destdir support * add ${QPOPPER_USER}:${QPOPPER_GROUP} to PKG_USERS, fixes PR#28807. * honor VARBASE. common: * update ipv6 patch to appropriate one for base version. * some pkglint cleanup. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.8 2005/12/05 14:12:29 taca Exp $ d3 1 a3 1 --- password/poppassd.c.orig 2009-12-27 13:05:39.000000000 +0000 d5 1 a5 1 @@@@ -171,8 +171,13 @@@@ d11 1 d15 1 a15 1 #define SMBPASSWD_BINARY "/usr/bin/smbpasswd" /* TBD: config.h */ d20 1 a20 1 @@@@ -180,6 +185,8 @@@@ d23 1 a24 2 +#include + d27 1 a27 2 #endif @@@@ -251,7 +258,7 @@@@ int dochild (int master, char *slave d36 1 a36 1 @@@@ -268,7 +275,7 @@@@ void get_client_info ( POP *p, BOOL n a39 1 - d42 1 a43 1 * External prototypes d70 1 a70 8 @@@@ -341,18 +353,19 @@@@ char *smb_binary = SM #define RUN_PASSWD 1 #define RUN_SMBPASSWD 2 - int main ( int argc, char *argv[] ) { char line [BUFSIZE] = ""; d85 1 a85 1 @@@@ -370,8 +383,6 @@@@ int main ( int argc, char *argv[] ) d94 1 a94 1 @@@@ -379,6 +390,17 @@@@ int main ( int argc, char *argv[] ) d112 1 a112 1 @@@@ -387,9 +409,9 @@@@ int main ( int argc, char *argv[] ) d125 1 a125 1 @@@@ -406,20 +428,34 @@@@ int main ( int argc, char *argv[] ) d139 2 a140 4 smb_binary = optarg; TRACE ( trace_file, POP_DEBUG, HERE, - "Changing SMB passwords using %s", smb_binary ); + "Changing SMB password using %s", smb_binary ); d153 1 a153 8 pwd_binary = optarg; TRACE ( trace_file, POP_DEBUG, HERE, - "Changing standard passwords using %s", pwd_binary ); + "Changing standard password using %s", pwd_binary ); break; case 't': @@@@ -470,6 +506,10 @@@@ int main ( int argc, char *argv[] ) d164 1 a164 1 @@@@ -557,44 +597,50 @@@@ int main ( int argc, char *argv[] ) d192 1 a192 1 - pw->pw_passwd = spwd->sp_pwdp; d233 3 d238 1 a238 3 { - syslog ( LOG_ERR, "someone tried to change %s's password", userid ); - WriteToClient ( "500 Not a user account." ); d243 1 a243 1 @@@@ -627,6 +673,20 @@@@ int main ( int argc, char *argv[] ) d264 1 a264 1 @@@@ -647,6 +707,10 @@@@ void runchild ( char *userid, char *oldp d275 1 a275 1 @@@@ -659,7 +723,7 @@@@ void runchild ( char *userid, char *oldp d284 1 a284 1 @@@@ -671,10 +735,16 @@@@ void runchild ( char *userid, char *oldp d304 1 a304 9 @@@@ -696,7 +766,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 */ @@@@ -778,6 +847,13 @@@@ int dochild (int master, char *slavedev, d318 1 a318 1 @@@@ -877,20 +953,19 @@@@ void writestring (int fd, char *s) d343 1 a343 1 @@@@ -920,6 +995,10 @@@@ int talktochild (int master, char *useri d354 1 a354 1 @@@@ -949,8 +1028,12 @@@@ int match (char *str, char *pat) d369 1 a369 1 @@@@ -1049,7 +1132,11 @@@@ int expect (int master, char **expected, @ 1.8 log @- Fix hangup when communicating with smbpasswd(8). - Quiet pkglint; changing make macro in double quotation into :Q modifier. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.7 2005/06/15 05:26:20 taca Exp $ d3 1 a3 1 --- password/poppassd.c.orig Mon Dec 5 10:45:21 2005 d28 1 a28 1 @@@@ -257,7 +264,7 @@@@ int dochild (int master, char *slave d37 1 a37 1 @@@@ -274,7 +281,7 @@@@ void get_client_info ( POP *p, BOOL n d46 1 a46 1 @@@@ -295,6 +302,8 @@@@ pop_result auth_user ( POP *p, char *pas d55 1 a55 1 @@@@ -324,6 +333,7 @@@@ static char *P4[] = d63 1 a63 1 @@@@ -338,6 +348,8 @@@@ char msg_buf [ 2048 ] = "" d72 1 a72 1 @@@@ -347,18 +359,19 @@@@ char *smb_binary = SM d94 1 a94 1 @@@@ -376,8 +389,6 @@@@ int main ( int argc, char *argv[] ) d103 1 a103 1 @@@@ -385,6 +396,17 @@@@ int main ( int argc, char *argv[] ) d121 1 a121 1 @@@@ -393,9 +415,9 @@@@ int main ( int argc, char *argv[] ) d134 1 a134 1 @@@@ -412,20 +434,34 @@@@ int main ( int argc, char *argv[] ) d152 2 a153 2 + break; + d158 2 a159 2 break; d171 1 a171 1 @@@@ -476,6 +512,10 @@@@ int main ( int argc, char *argv[] ) d182 1 a182 1 @@@@ -563,44 +603,50 @@@@ int main ( int argc, char *argv[] ) d260 1 a260 1 @@@@ -633,6 +679,20 @@@@ int main ( int argc, char *argv[] ) d281 1 a281 1 @@@@ -653,6 +713,10 @@@@ void runchild ( char *userid, char *oldp d292 1 a292 1 @@@@ -665,7 +729,7 @@@@ void runchild ( char *userid, char *oldp d301 1 a301 1 @@@@ -677,10 +741,16 @@@@ void runchild ( char *userid, char *oldp d321 1 a321 1 @@@@ -702,7 +772,6 @@@@ void runchild ( char *userid, char *oldp d329 1 a329 1 @@@@ -784,6 +853,13 @@@@ int dochild (int master, char *slavedev, d343 1 a343 1 @@@@ -883,20 +959,19 @@@@ void writestring (int fd, char *s) d368 1 a368 1 @@@@ -926,6 +1001,10 @@@@ int talktochild (int master, char *useri d379 1 a379 1 @@@@ -955,8 +1034,12 @@@@ int match (char *str, char *pat) d394 1 a394 1 @@@@ -1055,7 +1138,11 @@@@ int expect (int master, char **expected, @ 1.7 log @Fix the problem on NetBSD 3.0BETA and later noted by Martti Kuparinen on tech-pkg. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.6 2004/10/20 14:18:42 taca Exp $ d3 1 a3 1 --- password/poppassd.c.orig 2005-06-15 14:14:48.000000000 +0900 d28 9 d292 9 d343 3 a345 1 @@@@ -885,6 +961,7 @@@@ void writestring (int fd, char *s) d347 2 a348 1 char *emess, int asroot) d354 15 a368 1 @@@@ -926,6 +1003,8 @@@@ int talktochild (int master, char *useri d372 2 a373 1 + while ((n = read(master, buf, sizeof buf)) > 0) d375 1 @ 1.6 log @- fix a problem that poppassd(8) would hang with smbpasswd(1). - make it work on Solaris; tested on SunOS 5.8. Bump package revision. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.5 2004/01/30 07:05:28 taca Exp $ d3 1 a3 1 --- password/poppassd.c.orig Wed Oct 20 15:12:58 2004 d5 1 a5 1 @@@@ -167,8 +167,13 @@@@ d19 1 a19 1 @@@@ -176,6 +181,8 @@@@ d28 1 a28 1 @@@@ -273,7 +280,7 @@@@ void get_client_info ( POP *p, BOOL n d37 1 a37 1 @@@@ -294,6 +301,7 @@@@ pop_result auth_user ( POP *p, char *pas d42 1 d46 1 a46 1 @@@@ -323,6 +331,7 @@@@ static char *P4[] = d54 1 a54 1 @@@@ -337,6 +346,8 @@@@ char msg_buf [ 2048 ] = "" d63 1 a63 1 @@@@ -346,18 +357,19 @@@@ char *smb_binary = SM d85 1 a85 1 @@@@ -375,8 +387,6 @@@@ int main ( int argc, char *argv[] ) d94 1 a94 1 @@@@ -384,6 +394,17 @@@@ int main ( int argc, char *argv[] ) d112 1 a112 1 @@@@ -392,9 +413,9 @@@@ int main ( int argc, char *argv[] ) d125 1 a125 1 @@@@ -411,20 +432,34 @@@@ int main ( int argc, char *argv[] ) d162 1 a162 1 @@@@ -475,6 +510,10 @@@@ int main ( int argc, char *argv[] ) d173 1 a173 1 @@@@ -562,44 +601,50 @@@@ int main ( int argc, char *argv[] ) d251 1 a251 1 @@@@ -631,6 +676,20 @@@@ int main ( int argc, char *argv[] ) d272 1 a272 1 @@@@ -651,6 +710,10 @@@@ void runchild ( char *userid, char *oldp d283 1 a283 1 @@@@ -675,10 +738,16 @@@@ void runchild ( char *userid, char *oldp d303 1 a303 1 @@@@ -700,7 +769,6 @@@@ void runchild ( char *userid, char *oldp d311 1 a311 1 @@@@ -782,6 +850,13 @@@@ int dochild (int master, char *slavedev, d325 1 a325 1 @@@@ -880,6 +955,7 @@@@ void writestring (int fd, char *s) d333 1 a333 1 @@@@ -921,6 +997,8 @@@@ int talktochild (int master, char *useri d342 1 a342 1 @@@@ -950,8 +1028,12 @@@@ int match (char *str, char *pat) d357 1 a357 1 @@@@ -1050,7 +1132,11 @@@@ int expect (int master, char **expected, @ 1.5 log @Fix one error message to client. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.4 2004/01/29 15:45:00 taca Exp $ d3 1 a3 1 --- password/poppassd.c.orig 2004-01-30 15:59:13.000000000 +0900 d19 10 a28 1 @@@@ -273,7 +278,7 @@@@ void get_client_info ( POP *p, BOOL n d37 1 a37 1 @@@@ -294,6 +299,7 @@@@ pop_result auth_user ( POP *p, char *pas d45 1 a45 1 @@@@ -323,6 +329,7 @@@@ static char *P4[] = d53 1 a53 1 @@@@ -337,6 +344,8 @@@@ char msg_buf [ 2048 ] = "" d57 2 a58 2 +int child_pid = 0; +int child_status = -1; d62 1 a62 1 @@@@ -346,18 +355,19 @@@@ char *smb_binary = SM d84 1 a84 1 @@@@ -375,8 +385,6 @@@@ int main ( int argc, char *argv[] ) d93 1 a93 1 @@@@ -384,6 +392,17 @@@@ int main ( int argc, char *argv[] ) d111 1 a111 1 @@@@ -392,9 +411,9 @@@@ int main ( int argc, char *argv[] ) d124 1 a124 1 @@@@ -411,20 +430,34 @@@@ int main ( int argc, char *argv[] ) d142 2 a143 2 break; d148 2 a149 2 + break; + d161 1 a161 1 @@@@ -475,6 +508,10 @@@@ int main ( int argc, char *argv[] ) d172 1 a172 1 @@@@ -562,44 +599,50 @@@@ int main ( int argc, char *argv[] ) d250 1 a250 1 @@@@ -631,6 +674,20 @@@@ int main ( int argc, char *argv[] ) d271 1 a271 1 @@@@ -651,6 +708,8 @@@@ void runchild ( char *userid, char *oldp d276 2 d282 1 a282 1 @@@@ -675,10 +734,16 @@@@ void runchild ( char *userid, char *oldp d302 9 a310 1 @@@@ -782,6 +847,11 @@@@ int dochild (int master, char *slavedev, d314 1 d319 1 d324 18 a341 1 @@@@ -950,8 +1020,12 @@@@ int match (char *str, char *pat) d356 1 a356 1 @@@@ -1050,7 +1124,11 @@@@ int expect (int master, char **expected, @ 1.4 log @Update poppassd pacakge to 4.0.5nb2. - Catch child process exit. - Add "-o" option which provides compatibility with older poppassd, returning authentication error after "PASS" command not "NEWPASS" for some broken clients. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.3 2002/07/16 15:01:50 taca Exp $ d3 1 a3 1 --- password/poppassd.c.orig 2004-01-26 17:14:25.000000000 +0900 d226 1 a226 1 + WriteToClient ( "500 Not a user account." ); @ 1.3 log @Make it work smbpassword update function. It seems that there was some deadlock between pty and child exiting. Bump PKGREVISION to 1. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.2 2002/05/02 16:16:56 martti Exp $ d3 1 a3 1 --- password/poppassd.c.orig Tue Jul 16 15:20:21 2002 d19 9 d44 10 a53 1 @@@@ -346,14 +353,13 @@@@ char *smb_binary = SM d65 1 a65 1 + static char options [] = "dhl:Pp:RSs:t:vy:"; d69 7 a75 1 @@@@ -375,8 +381,6 @@@@ int main ( int argc, char *argv[] ) d84 1 a84 1 @@@@ -384,6 +388,17 @@@@ int main ( int argc, char *argv[] ) d102 1 a102 1 @@@@ -392,9 +407,9 @@@@ int main ( int argc, char *argv[] ) d115 1 a115 1 @@@@ -411,20 +426,34 @@@@ int main ( int argc, char *argv[] ) d152 76 a227 3 @@@@ -671,6 +700,7 @@@@ void runchild ( char *userid, char *oldp emess[0] ? emess : "Unable to change password"); exit(1); a228 1 + close ( master ); /* done with the pty */ d230 42 d274 12 a285 3 @@@@ -700,8 +730,6 @@@@ void runchild ( char *userid, char *oldp WriteToClient ("500 Server error (abnormal exit), get help!"); exit(1); d287 5 a291 6 - - close ( master ); /* done with the pty */ } else /* Child */ { @@@@ -782,6 +810,11 @@@@ int dochild (int master, char *slavedev, d303 1 a303 1 @@@@ -950,8 +983,12 @@@@ int match (char *str, char *pat) d318 13 @ 1.2 log @Updated poppassd to 4.0.4 * Fixed DOS attack seen on some systems. * Fixed "noop has null function" log entry. * Allow '-p' to be used when APOP not defined (noted by Daniel Senie). * Enforce ClearTextPassword even without APOP (noted by Daniel Senie). * Restrict clear-text-password=never to APOP. * Restrict clear-text-password=tls to QPOP_SSL. * Fixed qpopper hanging on I/O error on some platforms. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.1.1.1 2001/06/10 15:15:07 taca Exp $ d3 2 a4 2 --- password/poppassd.c.orig Fri Apr 5 04:38:36 2002 +++ password/poppassd.c Thu May 2 09:03:15 2002 d19 1 a19 1 @@@@ -283,6 +288,7 @@@@ d27 16 a42 1 @@@@ -342,7 +348,7 @@@@ d51 1 a51 1 @@@@ -364,8 +370,6 @@@@ d60 1 a60 1 @@@@ -373,6 +377,17 @@@@ d78 1 a78 1 @@@@ -381,9 +396,9 @@@@ d91 1 a91 1 @@@@ -400,20 +415,34 @@@@ d109 2 a110 2 + break; + d115 2 a116 2 break; d128 5 a132 1 @@@@ -770,6 +799,11 @@@@ d134 12 d148 1 a148 1 + d153 1 a153 1 d156 16 @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ d3 2 a4 2 --- password/poppassd.c.orig Sun Jun 10 22:54:40 2001 +++ password/poppassd.c d19 1 a19 1 @@@@ -294,6 +299,7 @@@@ d27 1 a27 1 @@@@ -353,7 +359,7 @@@@ d36 1 a36 1 @@@@ -375,8 +381,6 @@@@ d45 1 a45 1 @@@@ -384,6 +388,17 @@@@ d63 1 a63 1 @@@@ -392,9 +407,9 @@@@ d76 1 a76 1 @@@@ -411,20 +426,34 @@@@ d113 1 a113 1 @@@@ -781,6 +810,11 @@@@ @ 1.1.1.1 log @Importing poppassd included in qpopper 4.0.3 now. @ text @@