aboutsummaryrefslogtreecommitdiff
path: root/tests/ipcperms.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ipcperms.c')
-rw-r--r--tests/ipcperms.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/ipcperms.c b/tests/ipcperms.c
index 84801efd..6d083d00 100644
--- a/tests/ipcperms.c
+++ b/tests/ipcperms.c
@@ -30,6 +30,12 @@
#define ADDR "/tmp/ipc_perms_test"
+#if defined(__sun)
+#define honor_chmod() false
+#else
+#define honor_chmod() true
+#endif
+
// Inproc tests.
#ifdef _WIN32
@@ -78,6 +84,9 @@ TestMain("IPC Permissions", {
if (geteuid() == 0) {
Skip("Running as root");
}
+ if (!honor_chmod()) {
+ Skip("System does not honor chmod");
+ }
strcpy(sa.sun_path, ADDR);
sa.sun_family = AF_UNIX;
So((cfd = socket(AF_UNIX, SOCK_STREAM, 0)) >=
@@ -111,4 +120,4 @@ TestMain("IPC Permissions", {
NNG_ENOTSUP);
});
})
-#endif \ No newline at end of file
+#endif