aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0003-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
blob: b4bd646d61d9429ad988c5d014ddc2d293a76a52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From ef466581b53a1e64f53d4839bdacfab1d65cc6b9 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 18 Nov 2015 09:10:14 +0000
Subject: [PATCH] Fix definition of ALLPERMS and ACCESSPERMS

The ALLPERMS and ACCESSPERMS defines are not specified in POSIX so
assume it is not there instead of testing for specific implementations.

This is needed for musl libc.

Upstream-Status: Pending

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
 open-vm-tools/lib/hgfsServer/hgfsServerLinux.c      | 8 +++++---
 open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c | 3 +--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
index 4a0bc9378..6ed49e2b7 100644
--- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
+++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
@@ -105,11 +105,13 @@ typedef struct DirectoryEntry {
 #endif
 
 /*
- * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not defined in the
- * Solaris version of <sys/stat.h>.
+ * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not specified in
+ * POSIX.
  */
-#ifdef sun
+#ifndef ACCESSPERMS
 #   define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
+#endif
+#ifndef ALLPERMS
 #   define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
 #endif
 
diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c
index 219065f74..b5b7e6203 100644
--- a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c
+++ b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c
@@ -53,7 +53,7 @@
 
 #define DND_ROOTDIR_PERMS     (S_IRWXU | S_IRWXG | S_IRWXO)
 #define DND_STAGINGDIR_PERMS  (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
-#ifdef sun
+#ifndef ACCESSPERMS
 #define ACCESSPERMS           (S_IRWXU | S_IRWXG | S_IRWXO)
 #endif
 #ifdef __ANDROID__
@@ -62,7 +62,6 @@
  */
 #define NO_SETMNTENT
 #define NO_ENDMNTENT
-#define ACCESSPERMS           (S_IRWXU | S_IRWXG | S_IRWXO)
 #endif
 
 
-- 
2.25.1