mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-05 07:03:38 +02:00
Fix conf.get_config() to ignore file type bits when comparing oscrc perms
This commit is contained in:
@@ -1869,7 +1869,8 @@ def get_config(override_conffile=None,
|
||||
|
||||
# make sure oscrc is not world readable, it may contain a password
|
||||
conffile_stat = os.stat(conffile)
|
||||
if conffile_stat.st_mode != 0o600:
|
||||
# applying 0o7777 mask because we want to ignore the file type bits
|
||||
if conffile_stat.st_mode & 0o7777 != 0o600:
|
||||
try:
|
||||
os.chmod(conffile, 0o600)
|
||||
except OSError as e:
|
||||
|
Reference in New Issue
Block a user