]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.432
- up to 7.3.600
[packages/vim.git] / 7.3.432
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.432
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.432
11 Problem:    ACLs are not supported for ZFS or NFSv4 on Solaris.
12 Solution:   Add configure check and code. (Danek Duvall)
13 Files:      src/configure.in, src/auto/configure, src/config.h.in,
14             src/os_unix.c
15
16
17 *** ../vim-7.3.431/src/configure.in     2011-12-14 20:51:19.000000000 +0100
18 --- src/configure.in    2012-02-05 22:40:22.000000000 +0100
19 ***************
20 *** 3106,3111 ****
21 --- 3106,3112 ----
22   
23   dnl Link with -lposix1e for ACL stuff; if not found, try -lacl for SGI
24   dnl when -lacl works, also try to use -lattr (required for Debian).
25 + dnl On Solaris, use the acl_get/set functions in libsec, if present.
26   AC_MSG_CHECKING(--disable-acl argument)
27   AC_ARG_ENABLE(acl,
28         [  --disable-acl           Don't check for ACL support.],
29 ***************
30 *** 3128,3133 ****
31 --- 3129,3135 ----
32         AC_MSG_RESULT(yes); AC_DEFINE(HAVE_POSIX_ACL),
33         AC_MSG_RESULT(no))
34   
35 + AC_CHECK_LIB(sec, acl_get, [LIBS="$LIBS -lsec"; AC_DEFINE(HAVE_SOLARIS_ZFS_ACL)],
36   AC_MSG_CHECKING(for Solaris ACL support)
37   AC_TRY_LINK([
38   #ifdef HAVE_SYS_ACL_H
39 ***************
40 *** 3135,3141 ****
41   #endif], [acl("foo", GETACLCNT, 0, NULL);
42         ],
43         AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOLARIS_ACL),
44 !       AC_MSG_RESULT(no))
45   
46   AC_MSG_CHECKING(for AIX ACL support)
47   AC_TRY_LINK([
48 --- 3137,3143 ----
49   #endif], [acl("foo", GETACLCNT, 0, NULL);
50         ],
51         AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOLARIS_ACL),
52 !       AC_MSG_RESULT(no)))
53   
54   AC_MSG_CHECKING(for AIX ACL support)
55   AC_TRY_LINK([
56 *** ../vim-7.3.431/src/auto/configure   2011-12-14 20:51:19.000000000 +0100
57 --- src/auto/configure  2012-02-05 22:41:01.000000000 +0100
58 ***************
59 *** 11328,11334 ****
60   rm -f core conftest.err conftest.$ac_objext \
61       conftest$ac_exeext conftest.$ac_ext
62   
63 ! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
64   $as_echo_n "checking for Solaris ACL support... " >&6; }
65   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66   /* end confdefs.h.  */
67 --- 11328,11374 ----
68   rm -f core conftest.err conftest.$ac_objext \
69       conftest$ac_exeext conftest.$ac_ext
70   
71 ! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
72 ! $as_echo_n "checking for acl_get in -lsec... " >&6; }
73 ! if test "${ac_cv_lib_sec_acl_get+set}" = set; then :
74 !   $as_echo_n "(cached) " >&6
75 ! else
76 !   ac_check_lib_save_LIBS=$LIBS
77 ! LIBS="-lsec  $LIBS"
78 ! cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79 ! /* end confdefs.h.  */
80
81 ! /* Override any GCC internal prototype to avoid an error.
82 !    Use char because int might match the return type of a GCC
83 !    builtin and then its argument prototype would still apply.  */
84 ! #ifdef __cplusplus
85 ! extern "C"
86 ! #endif
87 ! char acl_get ();
88 ! int
89 ! main ()
90 ! {
91 ! return acl_get ();
92 !   ;
93 !   return 0;
94 ! }
95 ! _ACEOF
96 ! if ac_fn_c_try_link "$LINENO"; then :
97 !   ac_cv_lib_sec_acl_get=yes
98 ! else
99 !   ac_cv_lib_sec_acl_get=no
100 ! fi
101 ! rm -f core conftest.err conftest.$ac_objext \
102 !     conftest$ac_exeext conftest.$ac_ext
103 ! LIBS=$ac_check_lib_save_LIBS
104 ! fi
105 ! { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
106 ! $as_echo "$ac_cv_lib_sec_acl_get" >&6; }
107 ! if test "x$ac_cv_lib_sec_acl_get" = x""yes; then :
108 !   LIBS="$LIBS -lsec"; $as_echo "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
109
110 ! else
111 !   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
112   $as_echo_n "checking for Solaris ACL support... " >&6; }
113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
114   /* end confdefs.h.  */
115 ***************
116 *** 11355,11360 ****
117 --- 11395,11402 ----
118   fi
119   rm -f core conftest.err conftest.$ac_objext \
120       conftest$ac_exeext conftest.$ac_ext
121 + fi
122
123   
124   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
125   $as_echo_n "checking for AIX ACL support... " >&6; }
126 *** ../vim-7.3.431/src/config.h.in      2011-09-02 12:27:20.000000000 +0200
127 --- src/config.h.in     2012-02-05 22:40:22.000000000 +0100
128 ***************
129 *** 363,368 ****
130 --- 363,369 ----
131   
132   /* Define if you want to add support for ACL */
133   #undef HAVE_POSIX_ACL
134 + #undef HAVE_SOLARIS_ZFS_ACL
135   #undef HAVE_SOLARIS_ACL
136   #undef HAVE_AIX_ACL
137   
138 *** ../vim-7.3.431/src/os_unix.c        2012-01-10 22:26:12.000000000 +0100
139 --- src/os_unix.c       2012-02-05 22:40:22.000000000 +0100
140 ***************
141 *** 2746,2751 ****
142 --- 2746,2758 ----
143   #ifdef HAVE_POSIX_ACL
144       ret = (vim_acl_T)acl_get_file((char *)fname, ACL_TYPE_ACCESS);
145   #else
146 + #ifdef HAVE_SOLARIS_ZFS_ACL
147 +     acl_t *aclent;
148
149 +     if (acl_get((char *)fname, 0, &aclent) < 0)
150 +       return NULL;
151 +     ret = (vim_acl_T)aclent;
152 + #else
153   #ifdef HAVE_SOLARIS_ACL
154       vim_acl_solaris_T   *aclent;
155   
156 ***************
157 *** 2791,2796 ****
158 --- 2798,2804 ----
159       ret = (vim_acl_T)aclent;
160   #endif /* HAVE_AIX_ACL */
161   #endif /* HAVE_SOLARIS_ACL */
162 + #endif /* HAVE_SOLARIS_ZFS_ACL */
163   #endif /* HAVE_POSIX_ACL */
164       return ret;
165   }
166 ***************
167 *** 2808,2813 ****
168 --- 2816,2824 ----
169   #ifdef HAVE_POSIX_ACL
170       acl_set_file((char *)fname, ACL_TYPE_ACCESS, (acl_t)aclent);
171   #else
172 + #ifdef HAVE_SOLARIS_ZFS_ACL
173 +     acl_set((char *)fname, (acl_t *)aclent);
174 + #else
175   #ifdef HAVE_SOLARIS_ACL
176       acl((char *)fname, SETACL, ((vim_acl_solaris_T *)aclent)->acl_cnt,
177             ((vim_acl_solaris_T *)aclent)->acl_entry);
178 ***************
179 *** 2816,2821 ****
180 --- 2827,2833 ----
181       chacl((char *)fname, aclent, ((struct acl *)aclent)->acl_len);
182   #endif /* HAVE_AIX_ACL */
183   #endif /* HAVE_SOLARIS_ACL */
184 + #endif /* HAVE_SOLARIS_ZFS_ACL */
185   #endif /* HAVE_POSIX_ACL */
186   }
187   
188 ***************
189 *** 2828,2833 ****
190 --- 2840,2848 ----
191   #ifdef HAVE_POSIX_ACL
192       acl_free((acl_t)aclent);
193   #else
194 + #ifdef HAVE_SOLARIS_ZFS_ACL
195 +     acl_free((acl_t *)aclent);
196 + #else
197   #ifdef HAVE_SOLARIS_ACL
198       free(((vim_acl_solaris_T *)aclent)->acl_entry);
199       free(aclent);
200 ***************
201 *** 2836,2841 ****
202 --- 2851,2857 ----
203       free(aclent);
204   #endif /* HAVE_AIX_ACL */
205   #endif /* HAVE_SOLARIS_ACL */
206 + #endif /* HAVE_SOLARIS_ZFS_ACL */
207   #endif /* HAVE_POSIX_ACL */
208   }
209   #endif
210 *** ../vim-7.3.431/src/version.c        2012-02-05 22:05:44.000000000 +0100
211 --- src/version.c       2012-02-05 22:44:10.000000000 +0100
212 ***************
213 *** 716,717 ****
214 --- 716,719 ----
215   {   /* Add new patch number below this line */
216 + /**/
217 +     432,
218   /**/
219
220 -- 
221 If you put 7 of the most talented OSS developers in a room for a week
222 and asked them to fix a bug in a spreadsheet program, in 1 week
223 you'd have 2 new mail readers and a text-based web browser.
224
225  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
226 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
227 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
228  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.037554 seconds and 3 git commands to generate.