From huntting@glarp.com  Tue Jan 16 18:02:23 2007
Return-Path: <huntting@glarp.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 3449A16A416
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 16 Jan 2007 18:02:23 +0000 (UTC)
	(envelope-from huntting@glarp.com)
Received: from antediluvian.glarp.com (71-211-143-233.hlrn.qwest.net [71.211.143.233])
	by mx1.freebsd.org (Postfix) with ESMTP id B919B13C457
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 16 Jan 2007 18:02:22 +0000 (UTC)
	(envelope-from huntting@glarp.com)
Received: from antediluvian.glarp.com (localhost [127.0.0.1])
	by antediluvian.glarp.com (8.13.8/8.13.6) with ESMTP id l0GI2L3Y014272
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NOT)
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 16 Jan 2007 11:02:22 -0700 (MST)
	(envelope-from huntting@antediluvian.glarp.com)
Received: (from huntting@localhost)
	by antediluvian.glarp.com (8.13.6/8.13.6/Submit) id l0GI2KPE014271;
	Tue, 16 Jan 2007 11:02:20 -0700 (MST)
	(envelope-from huntting)
Message-Id: <200701161802.l0GI2KPE014271@antediluvian.glarp.com>
Date: Tue, 16 Jan 2007 11:02:20 -0700 (MST)
From: Brad Huntting <huntting@glarp.com>
Reply-To: Brad Huntting <huntting@glarp.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: sysutils/fcron
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         108008
>Category:       ports
>Synopsis:       sysutils/fcron
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    rafan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 16 18:10:07 GMT 2007
>Closed-Date:    Wed Jan 17 07:30:42 GMT 2007
>Last-Modified:  Wed Jan 17 07:40:18 GMT 2007
>Originator:     Brad Huntting
>Release:        FreeBSD 6.2-RC1 i386
>Organization:
>Environment:
System: FreeBSD hunkular.glarp.com 6.2-RC1 FreeBSD 6.2-RC1 #0: Sat Nov 18 21:05:22 MST 2006 root@:/usr/src/sys/i386/compile/HUNKULAR i386


>Description:
	Let's try this again shall we...  The last attempt
	http://www.freebsd.org/cgi/query-pr.cgi?pr=107993 did not
	aparently recognise me as being the maintainer.

	Upgrade for fcron stable version 3.0.2.

	Find below 3 diffs one for /usr/ports/sysutils/fcron, one
	for /usr/ports/UIDs and one for /usr/ports/GIDs.

	Details:

	All of the FreeBSD port patches have been rolled into the
	distribution.  As a result, all the patch files should be
	removed (I used diff -ruN to generate the first diff below)

		rm sysutils/fcron/files/patch-config.h.in
		rm sysutils/fcron/files/patch-configure.in
		rm sysutils/fcron/files/patch-fcrondyn.c
		rm sysutils/fcron/files/patch-socket.c

	In addition, fcron 3.0.2 now calls setuid() before exec()ing
	new cron jobs.  This is the behaviour of Vixie cron, SysV
	cron, old BSD cron, etc, etc.

	In addition to the port patch, there are two patches for
	the UIDs and GIDs files which add fcron's default UID/GID
	(247/247).

	Lastly, the install script now adds the fcron pseudo-user
	with shell /sbin/nologin.

>How-To-Repeat:
	
>Fix:

diff -ruN /usr/ports/sysutils/fcron/Makefile sysutils/fcron/Makefile
--- /usr/ports/sysutils/fcron/Makefile	Sun Jun  4 15:24:06 2006
+++ sysutils/fcron/Makefile	Mon Jan 15 19:18:27 2007
@@ -7,7 +7,7 @@
 #
 
 PORTNAME=	fcron
-PORTVERSION=	3.0.1
+PORTVERSION=	3.0.2
 PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_SUNSITE} \
@@ -21,7 +21,6 @@
 
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
-USE_AUTOTOOLS=	autoconf:259
 USE_PERL5_BUILD=yes
 CONFIGURE_ARGS=	--with-etcdir=${PREFIX}/etc --with-cflags="${CFLAGS}" \
 		--with-rootname=root --with-rootgroup=wheel \
@@ -37,7 +36,7 @@
 MAN8=		fcron.8
 
 PAMDIR?=	/etc/pam.d
-PLIST_SUB+=	PAMDIR=${PAMDIR}
+PLIST_SUB+=	PAMDIR=etc/pam.d
 
 PORTDOCS=	*
 
diff -ruN /usr/ports/sysutils/fcron/distinfo sysutils/fcron/distinfo
--- /usr/ports/sysutils/fcron/distinfo	Fri Feb 10 02:51:04 2006
+++ sysutils/fcron/distinfo	Mon Jan 15 18:19:46 2007
@@ -1,3 +1,3 @@
-MD5 (fcron-3.0.1.src.tar.gz) = 8e5dcb3a646c11294294895954ef0a48
-SHA256 (fcron-3.0.1.src.tar.gz) = 31288b04619bb9c7cd5fe6ff004c1e2c1340685cec2d0fa8725259c491699de9
-SIZE (fcron-3.0.1.src.tar.gz) = 536972
+MD5 (fcron-3.0.2.src.tar.gz) = f35e6af41d356ebcb38882f86a14fb94
+SHA256 (fcron-3.0.2.src.tar.gz) = ea25f4e9a78f6872c65cc97aa18c018b548e9fcd73b06d77c312e635ecf9ad48
+SIZE (fcron-3.0.2.src.tar.gz) = 540559
Binary files /usr/ports/sysutils/fcron/fcron-3.0.2_1.tbz and sysutils/fcron/fcron-3.0.2_1.tbz differ
diff -ruN /usr/ports/sysutils/fcron/files/patch-config.h.in sysutils/fcron/files/patch-config.h.in
--- /usr/ports/sysutils/fcron/files/patch-config.h.in	Sun Jun  4 14:09:42 2006
+++ sysutils/fcron/files/patch-config.h.in	Wed Dec 31 17:00:00 1969
@@ -1,8 +0,0 @@
---- config.h.in.orig	Mon Feb  6 14:44:52 2006
-+++ config.h.in	Tue May  9 17:15:19 2006
-@@ -424,3 +424,5 @@
- #define O_SYNC O_FSYNC
- #endif
- 
-+/* Define if (struct sockaddr) has an sa_len field.  */
-+#undef HAVE_SA_LEN
diff -ruN /usr/ports/sysutils/fcron/files/patch-configure.in sysutils/fcron/files/patch-configure.in
--- /usr/ports/sysutils/fcron/files/patch-configure.in	Sun Jun  4 14:09:42 2006
+++ sysutils/fcron/files/patch-configure.in	Wed Dec 31 17:00:00 1969
@@ -1,20 +0,0 @@
---- configure.in.orig	Mon Jan  9 17:21:24 2006
-+++ configure.in	Tue May  9 17:04:30 2006
-@@ -57,6 +57,17 @@
- AC_STRUCT_TM
- AC_TYPE_UID_T
- 
-+dnl Check for post-Reno style struct sockaddr
-+AC_CACHE_CHECK([for sa_len],
-+  ac_cv_sa_len,
-+[AC_TRY_COMPILE([#include <sys/types.h>
-+#include <sys/socket.h>], [int main(void) {
-+ struct sockaddr t;t.sa_len = 0;}],
-+  ac_cv_sa_len=yes,ac_cv_sa_len=no)])
-+if test $ac_cv_sa_len = yes; then
-+  AC_DEFINE(HAVE_SA_LEN)
-+fi
-+
- dnl Checks for library functions.
- AC_PROG_GCC_TRADITIONAL
- AC_FUNC_MEMCMP
diff -ruN /usr/ports/sysutils/fcron/files/patch-fcrondyn.c sysutils/fcron/files/patch-fcrondyn.c
--- /usr/ports/sysutils/fcron/files/patch-fcrondyn.c	Sun Jun  4 14:09:42 2006
+++ sysutils/fcron/files/patch-fcrondyn.c	Wed Dec 31 17:00:00 1969
@@ -1,29 +0,0 @@
---- fcrondyn.c.orig	Mon Feb  6 14:44:52 2006
-+++ fcrondyn.c	Tue May  9 15:24:22 2006
-@@ -399,17 +399,21 @@
-     int fd = -1;
-     struct sockaddr_un addr;
-     int len = 0;
-+    int sa_len;
- 
-     if ( (fd = socket(PF_UNIX, SOCK_STREAM, 0)) == -1 )
- 	die_e("could not create socket");
- 
-     addr.sun_family = AF_UNIX;
--    if ( (len = strlen(fifofile)) > sizeof(addr.sun_path) )
--	die("Error : fifo file path too long (max is %d)", sizeof(addr.sun_path));
--    strncpy(addr.sun_path, fifofile, sizeof(addr.sun_path) - 1);
--    addr.sun_path[sizeof(addr.sun_path)-1] = '\0';
-+    if ( (len = strlen(fifofile)) > sizeof(addr.sun_path) - 1 )
-+	die("Error : fifo file path too long (max is %d)", sizeof(addr.sun_path) - 1);
-+    strncpy(addr.sun_path, fifofile, sizeof(addr.sun_path));
-+    sa_len = (addr.sun_path - (char *)&addr) + len;
-+#if HAVE_SA_LEN
-+    addr.sun_len = sa_len;
-+#endif
- 
--    if ( connect(fd, (struct sockaddr *) &addr, sizeof(addr.sun_family) + len) < 0 )
-+    if ( connect(fd, (struct sockaddr *) &addr, sa_len) < 0 )
- 	die_e("Cannot connect() to fcron (check if fcron is running)");
- 
-     if ( authenticate_user(fd) == ERR ) {
diff -ruN /usr/ports/sysutils/fcron/files/patch-socket.c sysutils/fcron/files/patch-socket.c
--- /usr/ports/sysutils/fcron/files/patch-socket.c	Sun Jun  4 14:09:42 2006
+++ sysutils/fcron/files/patch-socket.c	Wed Dec 31 17:00:00 1969
@@ -1,34 +0,0 @@
---- socket.c.orig	Mon Feb  6 14:44:52 2006
-+++ socket.c	Tue May  9 16:33:19 2006
-@@ -134,6 +134,7 @@
- {
-     struct sockaddr_un addr;
-     int len = 0;
-+    int sa_len;
- 
-     /* used in fcron.c:main_loop():select() */
-     FD_ZERO(&read_set);
-@@ -145,15 +146,19 @@
-     }
- 
-     addr.sun_family = AF_UNIX;
--    if ( (len = strlen(fifofile)) > sizeof(addr.sun_path) ) {
--	error("Error : fifo file path too long (max is %d)", sizeof(addr.sun_path));
-+    if ( (len = strlen(fifofile)) > sizeof(addr.sun_path) - 1) {
-+	error("Error : fifo file path too long (max is %d)", sizeof(addr.sun_path) - 1);
- 	goto err;
-     }
--    strncpy(addr.sun_path, fifofile, sizeof(addr.sun_path) - 1);
-+    strncpy(addr.sun_path, fifofile, sizeof(addr.sun_path));
-     addr.sun_path[sizeof(addr.sun_path) -1 ] = '\0';
-+    sa_len = (addr.sun_path - (char *)&addr) + len;
-+#if HAVE_SA_LEN
-+    addr.sun_len = sa_len;
-+#endif
- 
-     unlink(fifofile);
--    if (bind(listen_fd, (struct sockaddr*) &addr, sizeof(addr.sun_family)+len+1) != 0){
-+    if (bind(listen_fd, (struct sockaddr*) &addr, sa_len) != 0){
- 	error_e("Cannot bind socket to '%s'", fifofile);
- 	goto err;
-     }
diff -ruN /usr/ports/sysutils/fcron/pkg-install sysutils/fcron/pkg-install
--- /usr/ports/sysutils/fcron/pkg-install	Fri Feb 10 02:51:04 2006
+++ sysutils/fcron/pkg-install	Mon Jan 15 18:30:53 2007
@@ -21,7 +21,7 @@
 	if /usr/sbin/pw usershow $user 2>/dev/null; then
 		echo "Using already existing user \"$user\"."
 	else
-		if /usr/sbin/pw useradd $user -u $uid -g $group -c "fcron pseudo-user"; then
+		if /usr/sbin/pw useradd $user -u $uid -g $group -s /sbin/nologin -c "fcron pseudo-user"; then
 			echo "Added user \"$user\"."
 		else
 			echo "Unable to add user \"$user\"."


diff -u /usr/ports/UIDs	UIDs
--- /usr/ports/UIDs	Sun Jan 14 00:22:44 2007
+++ UIDs	Mon Jan 15 18:29:15 2007
@@ -75,6 +75,7 @@
 dspam:*:202:202:Dspam:/nonexistent:/sbin/nologin
 shoutcast:*:210:210:Shoutcast sandbox:/nonexistent:/bin/sh
 bs:*:220:220:Big Sister:/usr/local/bigsister:/bin/sh
+fcron:*:247:247:fcron pseudo-user:/nonexistent:/sbin/nologin
 _tor:*:256:256:Tor anonymising router:/var/db/tor:/bin/sh
 _dns-proxy-tor:*:257:257:dns-proxy-tor user:/nonexistent:/sbin/nologin
 _trans-proxy-tor:*:258:258:dns-proxy-tor user:/nonexistent:/sbin/nologin


diff -u /usr/ports/GIDs	GIDs
--- /usr/ports/GIDs	Sun Jan 14 00:22:43 2007
+++ GIDs	Mon Jan 15 18:28:02 2007
@@ -64,6 +64,7 @@
 sympa:*:200:
 dspam:*:202:
 bs:*:220:
+fcron:*:247:
 _tor:*:256:
 _dns-proxy-tor:*:257:
 _trans-proxy-tor:*:258:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->rafan 
Responsible-Changed-By: rafan 
Responsible-Changed-When: Tue Jan 16 18:39:42 UTC 2007 
Responsible-Changed-Why:  
Eat. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=108008 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/108008: commit references a PR
Date: Wed, 17 Jan 2007 07:29:37 +0000 (UTC)

 rafan       2007-01-17 07:29:33 UTC
 
   FreeBSD ports repository
 
   Modified files:
     .                    GIDs UIDs 
   Log:
   - Add user/group for sysutils/fcron
   
   PR:             ports/108008
   Submitted by:   Brad Huntting <huntting at glarp.com> (maintainer)
   
   Revision  Changes    Path
   1.23      +2 -1      ports/GIDs
   1.27      +2 -1      ports/UIDs
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: rafan 
State-Changed-When: Wed Jan 17 07:30:40 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=108008 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/108008: commit references a PR
Date: Wed, 17 Jan 2007 07:30:22 +0000 (UTC)

 rafan       2007-01-17 07:30:11 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/fcron       Makefile distinfo pkg-install 
   Removed files:
     sysutils/fcron/files patch-config.h.in patch-configure.in 
                          patch-fcrondyn.c patch-socket.c 
   Log:
   - Update to 3.0.2
   
   PR:             ports/108008
   Submitted by:   Brad Huntting <huntting at glarp.com> (maintainer)
   
   Revision  Changes    Path
   1.24      +2 -4      ports/sysutils/fcron/Makefile
   1.10      +3 -3      ports/sysutils/fcron/distinfo
   1.2       +0 -8      ports/sysutils/fcron/files/patch-config.h.in (dead)
   1.4       +0 -20     ports/sysutils/fcron/files/patch-configure.in (dead)
   1.2       +0 -29     ports/sysutils/fcron/files/patch-fcrondyn.c (dead)
   1.2       +0 -34     ports/sysutils/fcron/files/patch-socket.c (dead)
   1.4       +1 -1      ports/sysutils/fcron/pkg-install
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
