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

Collapse All | Expand All

(-)Makefile (-3 / +2 lines)
Lines 2-10 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	star
4
PORTNAME=	star
5
DISTVERSION=	1.5.2
5
DISTVERSION=	1.5.3
6
CATEGORIES=	archivers
6
CATEGORIES=	archivers
7
MASTER_SITES=	http://BSDforge.com/projects/source/srchivers/star/
7
MASTER_SITES=	SF/s-tar
8
8
9
MAINTAINER=	portmaster@BSDforge.com
9
MAINTAINER=	portmaster@BSDforge.com
10
COMMENT=	Unique standard tape archiver with many enhancements
10
COMMENT=	Unique standard tape archiver with many enhancements
Lines 16-22 Link Here
16
BUILD_DEPENDS=	smake:devel/smake
16
BUILD_DEPENDS=	smake:devel/smake
17
17
18
USES=		gettext iconv tar:bzip2
18
USES=		gettext iconv tar:bzip2
19
USE_GCC=	any
20
19
21
.if defined(NO_INSTALL_MANPAGES)
20
.if defined(NO_INSTALL_MANPAGES)
22
XMKFLAGS=	XMK_FILE=""
21
XMKFLAGS=	XMK_FILE=""
(-)distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (star-1.5.2.tar.bz2) = 762645b98af13bb9b0512812814ec8e90635d1400c94eb5911e9774daed2addf
1
TIMESTAMP = 1472598366
2
SIZE (star-1.5.2.tar.bz2) = 874558
2
SHA256 (star-1.5.3.tar.bz2) = 070342833ea83104169bf956aa880bcd088e7af7f5b1f8e3d29853b49b1a4f5b
3
SIZE (star-1.5.3.tar.bz2) = 889881
(-)files/patch-autoconf_xconfig.h.in (+25 lines)
Line 0 Link Here
1
--- autoconf/xconfig.h.in.orig	2014-05-15 19:04:57 UTC
2
+++ autoconf/xconfig.h.in
3
@@ -3,7 +3,7 @@
4
  *	Dynamic autoconf C-include code.
5
  *	Do not edit, this file has been created automatically.
6
  *
7
- *	Copyright (c) 1998-2014 J. Schilling
8
+ *	Copyright (c) 1998-2016 J. Schilling
9
  *
10
  *	The layout for this file is controlled by "configure".
11
  *	Switch off cstyle(1) checks for now.
12
@@ -1051,6 +1051,13 @@
13
 #	define	HAVE_NFSV4_ACL	1 /* NFSv4 ACL's present */
14
 #endif
15
 
16
+#if defined(HAVE_ACL_GET_BRAND_NP)
17
+#ifndef	HAVE_NFSV4_ACL
18
+#	define	HAVE_NFSV4_ACL	1 /* NFSv4 ACL's present */
19
+#endif
20
+#	define	HAVE_FREEBSD_NFSV4_ACL	1 /* FreeBSD NFSv4 ACL implementation */
21
+#endif
22
+
23
 /*
24
  * HP-UX ACL support.
25
  * Note: unfortunately, HP-UX has an (undocumented) acl() function in libc.
(-)files/patch-star_Makefile (-2 / +2 lines)
Lines 1-4 Link Here
1
--- star/Makefile.orig	2010-05-13 19:47:27 UTC
1
--- star/Makefile.orig	2013-11-05 22:36:07 UTC
2
+++ star/Makefile
2
+++ star/Makefile
3
@@ -15,7 +15,7 @@ include		$(SRCROOT)/$(RULESDIR)/rules.to
3
@@ -15,7 +15,7 @@ include		$(SRCROOT)/$(RULESDIR)/rules.to
4
 INSDIR=		bin
4
 INSDIR=		bin
Lines 9-15 Link Here
9
 CPPOPTS +=	-D__STAR__
9
 CPPOPTS +=	-D__STAR__
10
 CPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP -DUSE_REMOTE -DUSE_RCMD_RSH
10
 CPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP -DUSE_REMOTE -DUSE_RCMD_RSH
11
 #CPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP
11
 #CPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP
12
@@ -52,8 +52,8 @@ LIBS=		-ldeflt -lrmt -lfind -lschily $(L
12
@@ -55,8 +55,8 @@ LIBS=		-ldeflt -lrmt -lfind -lschily $(L
13
 #
13
 #
14
 #	Wenn -lfind, dann auch  $(LIB_INTL)
14
 #	Wenn -lfind, dann auch  $(LIB_INTL)
15
 #
15
 #
(-)files/patch-star_acl__unix.c (+179 lines)
Line 0 Link Here
1
--- star/acl_unix.c.orig	2014-03-31 17:44:46 UTC
2
+++ star/acl_unix.c
3
@@ -1,8 +1,8 @@
4
-/* @(#)acl_unix.c	1.49 14/03/31 Copyright 2001-2014 J. Schilling */
5
+/* @(#)acl_unix.c	1.51 16/09/03 Copyright 2001-2014 J. Schilling */
6
 #include <schily/mconfig.h>
7
 #ifndef lint
8
 static	UConst char sccsid[] =
9
-	"@(#)acl_unix.c	1.49 14/03/31 Copyright 2001-2014 J. Schilling";
10
+	"@(#)acl_unix.c	1.51 16/09/03 Copyright 2001-2014 J. Schilling";
11
 #endif
12
 /*
13
  *	ACL get and set routines for unix like operating systems.
14
@@ -11,7 +11,7 @@ static	UConst char sccsid[] =
15
  *
16
  *	There are currently two basic flavors of ACLs:
17
  *
18
- *	Flavor 1: UFS/POSIX draft
19
+ *	Flavor 1: UFS/POSIX.1e draft (withrawn in 1997)
20
  *
21
  *	The Solaric UFS ACLs that have been developed between 1990 and 1994.
22
  *	These ACLs have been made available as extensions to NFSv2 and NFSv3.
23
@@ -27,7 +27,7 @@ static	UConst char sccsid[] =
24
  *	As True64 does not like ACL "mask" entries and this version of the
25
  * 	ACL code does not generate "mask" entries on True64, ACL support for
26
  *	True64 is currently broken. You cannot read back archives created
27
- *	on true64.
28
+ *	on True64.
29
  *
30
  *	Flavor 2: NFSv4
31
  *
32
@@ -196,6 +196,9 @@ EXPORT void
33
 opt_acl()
34
 {
35
 	printf(" acl-POSIX.1e-draft");
36
+#ifdef	HAVE_NFSV4_ACL
37
+	printf(" acl-NFSv4");
38
+#endif
39
 }
40
 
41
 /*
42
@@ -217,6 +220,15 @@ get_acls(info)
43
 	if (is_symlink(info))
44
 		return (TRUE);
45
 
46
+#ifdef	HAVE_FREEBSD_NFSV4_ACL
47
+	if (acl_to_info(info->f_sname, ACL_TYPE_NFS4, &acl_ace_text)) {
48
+		if (*acl_ace_text.ps_path != '\0') {
49
+			info->f_xflags |= XF_ACL_ACE;
50
+			info->f_acl_ace = acl_ace_text.ps_path;
51
+		}
52
+		return (TRUE);
53
+	}
54
+#endif
55
 	if (!acl_to_info(info->f_sname, ACL_TYPE_ACCESS, &acl_access_text))
56
 		return (FALSE);
57
 	if (*acl_access_text.ps_path != '\0') {
58
@@ -263,6 +275,13 @@ acl_to_info(name, type, acltext)
59
 		if (err == ENOSYS)
60
 			return (TRUE);
61
 #endif
62
+#ifdef	HAVE_FREEBSD_NFSV4_ACL
63
+		/*
64
+		 * If ACL type is not NFS4 we continue with POSIX.1e ACLs
65
+		 */
66
+		if (type == ACL_TYPE_NFS4 && err == EINVAL)
67
+			return (FALSE);
68
+#endif
69
 		if (!errhidden(E_GETACL, name)) {
70
 			if (!errwarnonly(E_GETACL, name))
71
 				xstats.s_getaclerrs++;
72
@@ -273,7 +292,12 @@ acl_to_info(name, type, acltext)
73
 		return (FALSE);
74
 	}
75
 	seterrno(0);
76
-	text = acl_to_text(acl, NULL);
77
+#ifdef	HAVE_FREEBSD_NFSV4_ACL
78
+	if (type == ACL_TYPE_NFS4)
79
+		text = acl_to_text_np(acl, NULL, ACL_TEXT_APPEND_ID);
80
+	else
81
+#endif
82
+		text = acl_to_text(acl, NULL);
83
 	acl_free(acl);
84
 	if (text == NULL) {
85
 		if (geterrno() == 0)
86
@@ -313,6 +337,22 @@ acl_to_info(name, type, acltext)
87
 			;
88
 	}
89
 
90
+#ifdef	HAVE_FREEBSD_NFSV4_ACL
91
+	/* remove space fields */
92
+	if (type == ACL_TYPE_NFS4) {
93
+		c = text;
94
+		while ((c = strchr(c, ' ')) != NULL) {
95
+			char *d = c, *e;
96
+
97
+			while (*d && *d == ' ')
98
+				d++;
99
+			e = c;
100
+			while ((*e++ = *d++) != '\0')
101
+				;
102
+		}
103
+	}
104
+#endif
105
+
106
 	/* count fields */
107
 	for (c = text; *c != '\0'; c++) {
108
 		if (*c == '\n') {
109
@@ -320,6 +360,14 @@ acl_to_info(name, type, acltext)
110
 			entries++;
111
 		}
112
 	}
113
+#ifdef	HAVE_FREEBSD_NFSV4_ACL
114
+	if (type == ACL_TYPE_NFS4) {
115
+		if (strcpy_pspace(PS_EXIT, acltext, text) < 0) {
116
+			acl_free((acl_t)text);
117
+			return (FALSE);
118
+		}
119
+	} else
120
+#endif
121
 	if ((entries > 3) || /* > 4 on Solaris? */
122
 	    (type == ACL_TYPE_DEFAULT && entries >= 3)) {
123
 		if ((entries * 56) > acltext->ps_size)
124
@@ -446,6 +494,55 @@ set_acls(info)
125
 
126
 	aclps.ps_path = acltext;
127
 	aclps.ps_size = PATH_MAX;
128
+
129
+#ifdef	HAVE_FREEBSD_NFSV4_ACL
130
+	if (info->f_xflags & XF_ACL_ACE) {
131
+		ssize_t	len = strlen(info->f_acl_ace) + 2;
132
+
133
+		if (len > aclps.ps_size) {
134
+			aclps.ps_path = NULL;
135
+			aclps.ps_size = 0;
136
+			grow_pspace(PS_EXIT, &aclps, len);
137
+			if (aclps.ps_size <= len) {
138
+				free_pspace(&aclps);
139
+				return;
140
+			}
141
+		}
142
+		acl_check_ids(aclps.ps_path, info->f_acl_ace, TRUE);
143
+
144
+		if ((acl = acl_from_text(aclps.ps_path)) == NULL) {
145
+			if (!errhidden(E_BADACL, info->f_name)) {
146
+				if (!errwarnonly(E_BADACL, info->f_name))
147
+					xstats.s_badacl++;
148
+				errmsg("Cannot convert NFSv4 ACL '%s' to internal format for ' %s'.\n",
149
+				    aclps.ps_path, info->f_name);
150
+				(void) errabort(E_BADACL, info->f_name, TRUE);
151
+			}
152
+		} else {
153
+			if (acl_set_file(info->f_name, ACL_TYPE_NFS4,
154
+			    acl) < 0) {
155
+				/*
156
+				 * XXX What should we do if errno is
157
+				 * ENOTSUP/ENOSYS?
158
+				 */
159
+				if (!errhidden(E_SETACL, info->f_name)) {
160
+					if (!errwarnonly(E_SETACL,
161
+					    info->f_name))
162
+						xstats.s_setacl++;
163
+					errmsg("Cannot set NFSv4 ACL '%s' for '%s'.\n",
164
+					    aclps.ps_path, info->f_name);
165
+					(void) errabort(E_SETACL, info->f_name,
166
+					    TRUE);
167
+				}
168
+			}
169
+			acl_free(acl);
170
+		}
171
+		if (aclps.ps_path != acltext)
172
+			free_pspace(&aclps);
173
+		return;
174
+	}
175
+#endif	/* HAVE_FREEBSD_NFSV4_ACL */
176
+
177
 	if (info->f_xflags & XF_ACL_ACCESS) {
178
 		ssize_t	len = strlen(info->f_acl_access) + 2;
179
 

Return to bug 212274