[okular] [Bug 392682] Okular ignores umask on save file as

Albert Astals Cid bugzilla_noreply at kde.org
Mon Apr 23 21:09:18 UTC 2018


https://bugs.kde.org/show_bug.cgi?id=392682

Albert Astals Cid <aacid at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |RESOLVED
      Latest Commit|                            |https://commits.kde.org/oku
                   |                            |lar/c5592689874f41df393b44f
                   |                            |3ba572acc751c5645
         Resolution|---                         |FIXED

--- Comment #2 from Albert Astals Cid <aacid at kde.org> ---
Git commit c5592689874f41df393b44f3ba572acc751c5645 by Albert Astals Cid, on
behalf of Chinmoy Ranjan Pradhan.
Committed on 23/04/2018 at 21:07.
Pushed by aacid into branch 'Applications/18.04'.

Obey umask rules when saving new file

Summary:
Okular saves a new file with permissions 0600 completely ignoring the umask
value. This is because it
makes use of QTemporaryFile which creates file with the said permissions and
which then Okular copies
to the new location.
So to overcome this generate new file permissions using old mask value and
change permissions of the
new file.

Test Plan:
Set umask to 0040
Open a pdf file from the same shell and save it under a new name.
Before patch:
file permisions -> 0600
After patch:
file permisions -> 0606

Reviewers: #okular, aacid

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12049

M  +12   -0    part.cpp

https://commits.kde.org/okular/c5592689874f41df393b44f3ba572acc751c5645

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list