Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Conversation

@as-cii
Copy link
Contributor

@as-cii as-cii commented May 28, 2019

Fixes #4115

This pull request upgrades text-buffer to prompt the user for privilege escalation when attempting to write to an unauthorized location on Linux. It takes advantage of Polkit, which has now become a required dependency in the Debian and RPM distributions (1e87055 and 949e53e). Note that distros such as Ubuntu Desktop ship with a version of Polkit already.

The packages distributed from this version onward will also install a .policy file (50f73a5 and 3b5eb5d) that takes care of customizing the privilege escalation prompt, as well as retaining admin access to dd (the command line utility that we use for flushing in-memory text into a file) for a short period of time.

🍐'd with @rafeca

Antonio Scandurra and others added 5 commits May 28, 2019 11:53
This is used by fs-admin to invoke `pkexec` and escalate privileges to
write into restricted locations.

Co-Authored-By: Rafael Oleza <[email protected]>
This is a polkit policy that is read when fs-admin invokes `dd` via
`pkexec` after trying to write into a restricted location. By specifying
`auth_admin_keep`, we are telling the polkit daemon to not prompt users
for a password again if they have already escalated privileges recently.

Co-Authored-By: Rafael Oleza <[email protected]>
@as-cii as-cii marked this pull request as ready for review May 29, 2019 12:24
@as-cii
Copy link
Contributor Author

as-cii commented May 29, 2019

I tested this on Ubuntu and Fedora, and Atom now correctly prompts me to escalate privileges when attempting to write to a restricted file. I plan to merge this as soon as we have a green build.

@as-cii as-cii merged commit 88019da into master May 29, 2019
@as-cii as-cii deleted the as-ro/save-restricted-files-on-linux branch May 29, 2019 14:44
@jhack-jos
Copy link

I tested this on Ubuntu and Fedora, and Atom now correctly prompts me to escalate privileges when attempting to write to a restricted file. I plan to merge this as soon as we have a green build.

@as-cii Thank you for the marvellous job! Is there any ETA for Windows 10? It is a long time we are waiting to be able to escalate privileges. The previous issues signling the problem now are closed, but as far as I know the feature is still not implemented. Shall I open a new issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ask for root password when required

4 participants