Add proper filesystem check for NetBSD
FreeBSD and NetBSD are compatible here.
This commit is contained in:
parent
72ea076099
commit
f1a9274d13
|
@ -423,8 +423,8 @@ def checkSensitiveFilePermissions(filename):
|
||||||
# TODO: This might deserve extra checks by someone familiar with
|
# TODO: This might deserve extra checks by someone familiar with
|
||||||
# Windows systems.
|
# Windows systems.
|
||||||
return True
|
return True
|
||||||
elif sys.platform[:7] == 'freebsd':
|
elif sys.platform[:7] == 'freebsd' or sys.platform[:6] == 'netbsd':
|
||||||
# FreeBSD file systems are the same as major Linux file systems
|
# The BSD file systems are the same as major Linux file systems
|
||||||
present_permissions = os.stat(filename)[0]
|
present_permissions = os.stat(filename)[0]
|
||||||
disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO
|
disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO
|
||||||
return present_permissions & disallowed_permissions == 0
|
return present_permissions & disallowed_permissions == 0
|
||||||
|
|
Reference in New Issue
Block a user