From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jan 8 23:20:10 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02AE0106564A for ; Sun, 8 Jan 2012 23:20:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 73AF78FC12 for ; Sun, 8 Jan 2012 23:20:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q08NK8n7054682 for ; Sun, 8 Jan 2012 23:20:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q08NK8S7054681; Sun, 8 Jan 2012 23:20:08 GMT (envelope-from gnats) Resent-Date: Sun, 8 Jan 2012 23:20:08 GMT Resent-Message-Id: <201201082320.q08NK8S7054681@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Mikhail T." Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BB08106564A for ; Sun, 8 Jan 2012 23:12:36 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 061EA8FC0A for ; Sun, 8 Jan 2012 23:12:36 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q08NCZTa051323 for ; Sun, 8 Jan 2012 23:12:35 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q08NCZgq051319; Sun, 8 Jan 2012 23:12:35 GMT (envelope-from nobody) Message-Id: <201201082312.q08NCZgq051319@red.freebsd.org> Date: Sun, 8 Jan 2012 23:12:35 GMT From: "Mikhail T." To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/163937: [maintainer] [patch] mail/popper: fix clang build X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2012 23:20:10 -0000 >Number: 163937 >Category: ports >Synopsis: [maintainer] [patch] mail/popper: fix clang build >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sun Jan 08 23:20:08 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Mikhail T. >Release: 9.0 >Organization: >Environment: >Description: - Fix build by Clang >How-To-Repeat: >Fix: Patch attached with submission follows: ? work Index: Makefile =================================================================== RCS file: /home/ncvs/ports/mail/popper/Makefile,v retrieving revision 1.52 diff -u -r1.52 Makefile --- Makefile 30 Aug 2011 15:47:01 -0000 1.52 +++ Makefile 8 Jan 2012 23:10:18 -0000 @@ -25,6 +25,7 @@ # If WITH_POPPER_DEBUG variable present in the environment, popper builds # with more verbose debugging. +USE_CSTD= gnu89 O_DEFS= -DSETPROCTITLE -DKEEP_TEMP_DROP -DBSD44_DBM -DBIND43 \ -DBULLDB -DNONAUTHFILE='\"/etc/ftpusers\"' Index: files/patch-ab =================================================================== RCS file: files/patch-ab diff -N files/patch-ab --- files/patch-ab 30 Jul 2001 15:51:33 -0000 1.7 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,74 +0,0 @@ ---- pop_pass.c.orig Mon Jul 30 19:29:19 2001 -+++ pop_pass.c Mon Jul 30 19:29:25 2001 -@@ -19,6 +19,12 @@ - #include - #include "popper.h" - -+#ifdef OPIE -+#include -+extern int pwok; -+extern struct opie opiestate; -+#endif /* OPIE */ -+ - #define SLEEP_SECONDS 10 - - -@@ -487,16 +493,28 @@ - POP * p; - struct passwd * pw; - { -+#if defined(BSD) && (BSD >= 199306) -+ /* Check password change and expire times before granting access */ -+ time_t now = time((time_t *) NULL); -+ -+ if ((pw->pw_change && now > pw->pw_change) || -+ (pw->pw_expire && now > pw->pw_expire)) -+ goto error; -+#endif -+ - /* We don't accept connections from users with null passwords */ -- /* Compare the supplied password with the password file entry */ -+ if ((pw->pw_passwd == NULL) || (*pw->pw_passwd == '\0')) -+ goto error; - -- if ((pw->pw_passwd == NULL) || (*pw->pw_passwd == '\0') || -- strcmp(crypt(p->pop_parm[1], pw->pw_passwd), pw->pw_passwd)) { -- sleep(SLEEP_SECONDS); -- return (pop_msg(p,POP_FAILURE, pwerrmsg, p->user)); -- } -+ /* Compare the supplied password with the password file entry */ -+ if (strcmp(crypt(p->pop_parm[1], pw->pw_passwd), pw->pw_passwd)) -+ goto error; - - return(POP_SUCCESS); -+ -+ error: -+ sleep(SLEEP_SECONDS); -+ return (pop_msg(p,POP_FAILURE, pwerrmsg, p->user)); - } - - #endif /* AUTH_SPECIAL */ -@@ -611,12 +629,23 @@ - return(pop_msg(p, POP_FAILURE, "\"%s\": shell not found.", p->user)); - #endif - -+#ifdef OPIE -+ if (opieverify(&opiestate, p->pop_parm[1])) { -+ if (pwok) { -+#endif /* OPIE */ - if ((p->kerberos ? auth_user_kerberos(p, pw) : auth_user(p, pwp)) - != POP_SUCCESS) { - pop_log(p,POP_PRIORITY,"Failed attempted login to %s from host %s", - p->user, p->client); - return(POP_FAILURE); - } -+#ifdef OPIE -+ } else { -+ sleep(SLEEP_SECONDS); -+ return (pop_msg(p,POP_FAILURE, pwerrmsg, p->user)); -+ } -+ } -+#endif /* OPIE */ - - #ifdef SECURENISPLUS - seteuid(uid_save); Index: files/patch-pop_pass.c =================================================================== RCS file: files/patch-pop_pass.c diff -N files/patch-pop_pass.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-pop_pass.c 8 Jan 2012 23:10:18 -0000 @@ -0,0 +1,75 @@ +--- pop_pass.c.orig 1998-07-10 03:44:07.000000000 +0400 ++++ pop_pass.c 2012-01-09 03:03:30.395199055 +0400 +@@ -19,6 +19,12 @@ + #include + #include "popper.h" + ++#ifdef OPIE ++#include ++extern int pwok; ++extern struct opie opiestate; ++#endif /* OPIE */ ++ + #define SLEEP_SECONDS 10 + + +@@ -487,16 +493,28 @@ + POP * p; + struct passwd * pw; + { ++#if defined(BSD) && (BSD >= 199306) ++ /* Check password change and expire times before granting access */ ++ time_t now = time((time_t *) NULL); ++ ++ if ((pw->pw_change && now > pw->pw_change) || ++ (pw->pw_expire && now > pw->pw_expire)) ++ goto error; ++#endif ++ + /* We don't accept connections from users with null passwords */ +- /* Compare the supplied password with the password file entry */ ++ if ((pw->pw_passwd == NULL) || (*pw->pw_passwd == '\0')) ++ goto error; + +- if ((pw->pw_passwd == NULL) || (*pw->pw_passwd == '\0') || +- strcmp(crypt(p->pop_parm[1], pw->pw_passwd), pw->pw_passwd)) { +- sleep(SLEEP_SECONDS); +- return (pop_msg(p,POP_FAILURE, pwerrmsg, p->user)); +- } ++ /* Compare the supplied password with the password file entry */ ++ if (strcmp(crypt(p->pop_parm[1], pw->pw_passwd), pw->pw_passwd)) ++ goto error; + + return(POP_SUCCESS); ++ ++ error: ++ sleep(SLEEP_SECONDS); ++ return (pop_msg(p,POP_FAILURE, pwerrmsg, p->user)); + } + + #endif /* AUTH_SPECIAL */ +@@ -611,12 +629,23 @@ + return(pop_msg(p, POP_FAILURE, "\"%s\": shell not found.", p->user)); + #endif + +- if ((p->kerberos ? auth_user_kerberos(p, pw) : auth_user(p, pwp)) ++#ifdef OPIE ++ if (opieverify(&opiestate, p->pop_parm[1])) { ++ if (pwok) { ++#endif /* OPIE */ ++ if ((p->kerberos ? auth_user_kerberos(p, &pw) : auth_user(p, pwp)) + != POP_SUCCESS) { + pop_log(p,POP_PRIORITY,"Failed attempted login to %s from host %s", + p->user, p->client); + return(POP_FAILURE); + } ++#ifdef OPIE ++ } else { ++ sleep(SLEEP_SECONDS); ++ return (pop_msg(p,POP_FAILURE, pwerrmsg, p->user)); ++ } ++ } ++#endif /* OPIE */ + + #ifdef SECURENISPLUS + seteuid(uid_save); >Release-Note: >Audit-Trail: >Unformatted: