cert-show: writable files does not mean dirs
ipalib.util.check_writable_file didn't check whether the argument is an actual file which is now fixed. https://pagure.io/freeipa/issue/6883 Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
1 parent
6c061b6836
commit
33b3d7ad7a
1 file changed
+1
-1
+1
-1
@@ -170,7 +170,7 @@ def check_writable_file(filename):
|
||||
if filename is None:
|
||||
raise errors.FileError(reason=_('Filename is empty'))
|
||||
try:
|
||||
if os.path.exists(filename):
|
||||
if os.path.isfile(filename):
|
||||
if not os.access(filename, os.W_OK):
|
||||
raise errors.FileError(reason=_('Permission denied: %(file)s') % dict(file=filename))
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user