View | Details | Raw Unified | Return to bug 108008 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 108008