From f1a9274d138800e34ca55daaf0df463be0fc2c02 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Sun, 13 Sep 2015 23:30:05 +0200 Subject: [PATCH] Add proper filesystem check for NetBSD FreeBSD and NetBSD are compatible here. --- src/shared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared.py b/src/shared.py index d82f00a5..340aa34c 100644 --- a/src/shared.py +++ b/src/shared.py @@ -423,8 +423,8 @@ def checkSensitiveFilePermissions(filename): # TODO: This might deserve extra checks by someone familiar with # Windows systems. return True - elif sys.platform[:7] == 'freebsd': - # FreeBSD file systems are the same as major Linux file systems + elif sys.platform[:7] == 'freebsd' or sys.platform[:6] == 'netbsd': + # The BSD file systems are the same as major Linux file systems present_permissions = os.stat(filename)[0] disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO return present_permissions & disallowed_permissions == 0