From 363d44919fd78888f4ff32a51972931ca12244b6 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 3 Apr 2024 16:47:13 +0200 Subject: [PATCH] Properly check for the sticky bit --- dnscrypt-proxy/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnscrypt-proxy/common.go b/dnscrypt-proxy/common.go index 2218a9c9..647ccfac 100644 --- a/dnscrypt-proxy/common.go +++ b/dnscrypt-proxy/common.go @@ -176,7 +176,7 @@ func maybeWritableByOtherUsers(p string) (bool, string, error) { return false, p, err } mode := st.Mode() - if mode&2 == 2 && !(st.IsDir() && mode&01000 == 01000) { + if mode.Perm()&2 != 0 && !(st.IsDir() && mode&os.ModeSticky == os.ModeSticky) { return true, p, nil } p = path.Dir(p)