diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-03-23 18:11:11 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-03-24 13:52:30 +0100 |
commit | 9906c6d2a55b6f8a27903f0ef08aa8949d7a71c2 (patch) | |
tree | f4e2ab13bf2d447bf4331e4a2e8022c038e536b9 /ucb | |
parent | 7422687028d33a9a4029aeb9265bc59578f5aef9 (diff) |
rhbz#1559633: Treat EPERM same as EACCES when opening files
For example, Linux open(2) with O_RDWR fails with EPERM if the file is flagged
as FS_IMMUTABLE_FL. (And there is an #ifdef IOS "Horrible hack" block in
openFilePath in sal/osl/unx/file.cxx that is apparently a workaround for a
similar scenario where open returns EPERM instead of EACCES on iOS, and which
can probably be removed again after this commit.)
Change-Id: I00cbd28d4b83b223920776998e9245b6261bb748
Reviewed-on: https://gerrit.libreoffice.org/51788
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/file/filglob.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index fce29672b555..56b581e5477f 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx @@ -310,6 +310,7 @@ namespace fileaccess { case FileBase::E_ROFS: // #i4735# handle ROFS transparently as ACCESS_DENIED case FileBase::E_ACCES: + case FileBase::E_PERM: // permission denied<P> ioErrorCode = IOErrorCode_ACCESS_DENIED; break; |