summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2016-09-16 11:50:37 +0000
committerjperkin <jperkin@pkgsrc.org>2016-09-16 11:50:37 +0000
commitbeaf664bed3400d74de01203f7c26f4f2c6ca606 (patch)
tree917bc37bff9d25f1be07163a8df4cd68617381db /security
parent38dc8d9c3ef41bac1c5b1951aa0cd03f74e4d670 (diff)
downloadpkgsrc-beaf664bed3400d74de01203f7c26f4f2c6ca606.tar.gz
Don't assume O_SEARCH implies support for O_DIRECTORY. Fixes SunOS.
Diffstat (limited to 'security')
-rw-r--r--security/sudo/distinfo3
-rw-r--r--security/sudo/patches/patch-src_sudo__edit.c18
2 files changed, 20 insertions, 1 deletions
diff --git a/security/sudo/distinfo b/security/sudo/distinfo
index 33125ef6439..8d9b2a17212 100644
--- a/security/sudo/distinfo
+++ b/security/sudo/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.87 2016/09/12 17:12:24 taca Exp $
+$NetBSD: distinfo,v 1.88 2016/09/16 11:50:37 jperkin Exp $
SHA1 (sudo-1.8.17p1.tar.gz) = e9bb729513cd15e99def42019c35917bc9a73536
RMD160 (sudo-1.8.17p1.tar.gz) = c3af867a6047c21614c4550534fa2566d6540913
@@ -10,3 +10,4 @@ SHA1 (patch-ag) = cb03a0a7daf4b5ef203f23726ad3a335b712a718
SHA1 (patch-plugins_sudoers_Makefile.in) = d8612ac7bf2f5a892d9720c4df91810ca807f4ed
SHA1 (patch-plugins_sudoers_logging.c) = a42e54af2b6057804aecb3b6a48c565e8ac4df82
SHA1 (patch-src_Makefile.in) = 43f7266d3d106fca69003ee040342c3b201fd262
+SHA1 (patch-src_sudo__edit.c) = ef411520ccefbd36bb4adf3329e6144e54647372
diff --git a/security/sudo/patches/patch-src_sudo__edit.c b/security/sudo/patches/patch-src_sudo__edit.c
new file mode 100644
index 00000000000..80fd3706b4a
--- /dev/null
+++ b/security/sudo/patches/patch-src_sudo__edit.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_sudo__edit.c,v 1.1 2016/09/16 11:50:38 jperkin Exp $
+
+Don't assume O_SEARCH implies support for O_DIRECTORY.
+
+--- src/sudo_edit.c.orig 2016-06-18 02:44:21.000000000 +0000
++++ src/sudo_edit.c
+@@ -347,7 +347,11 @@ dir_is_writable(int dfd, struct user_det
+ * Use O_SEARCH/O_PATH and/or O_DIRECTORY where possible.
+ */
+ #if defined(O_SEARCH)
++# if defined(O_DIRECTORY)
+ # define DIR_OPEN_FLAGS (O_SEARCH|O_DIRECTORY)
++# else
++# define DIR_OPEN_FLAGS (O_SEARCH)
++# endif
+ #elif defined(O_PATH)
+ # define DIR_OPEN_FLAGS (O_PATH|O_DIRECTORY)
+ #elif defined(O_DIRECTORY)