aboutsummaryrefslogtreecommitdiff
path: root/test.bash
diff options
context:
space:
mode:
Diffstat (limited to 'test.bash')
-rwxr-xr-xtest.bash8
1 files changed, 8 insertions, 0 deletions
diff --git a/test.bash b/test.bash
index efc6456..6289072 100755
--- a/test.bash
+++ b/test.bash
@@ -93,4 +93,12 @@ if find . -type f -name \*.go -print0 | xargs -0 grep -E 'syscall.(Setegid|Seteu
exit 1
fi
+if find . -type f -name \*.go -print0 | xargs -0 grep '\.Creat('; then
+ # MacOS does not have syscall.Creat(). Creat() is equivalent to Open(..., O_CREAT|O_WRONLY|O_TRUNC, ...),
+ # but usually you want O_EXCL instead of O_TRUNC because it is safer, so that's what we suggest
+ # instead.
+ echo "$MYNAME: Please use Open(..., O_CREAT|O_WRONLY|O_EXCL, ...) instead of Creat()! https://github.com/rfjakob/gocryptfs/issues/623"
+ exit 1
+fi
+
) 200> "$LOCKFILE"