Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jan 2012 23:12:35 GMT
From:      "Mikhail T." <m.tsatsenko@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/163937: [maintainer] [patch] mail/popper: fix clang build
Message-ID:  <201201082312.q08NCZgq051319@red.freebsd.org>
Resent-Message-ID: <201201082320.q08NK8S7054681@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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 <pwd.h>
- #include "popper.h"
- 
-+#ifdef OPIE
-+#include <opie.h>
-+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 <pwd.h>
+ #include "popper.h"
+ 
++#ifdef OPIE
++#include <opie.h>
++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:



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