mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
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:
parent
6c061b6836
commit
33b3d7ad7a
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user