[Gambas-user] Any possible way to level up?
Bruce Steers
bsteers4 at gmail.com
Fri Jun 3 09:14:37 CEST 2022
Is there ANY possible way to get a gambas program to raise it's su
privilages after launch?
I have a program doing some copy/move/delete commands that may or may not
be in root only accessible locations.
I don't want to force the app to be run as root but would be handy if it
could get su privileges once run if needed.
My currently used option is to gather any commands that need to be run as
root into a temporary bash script then run the script via Desktop.RunAsRoot
(pkexec) but this will ask for password each time i run a command,
Option i'm working on (it's a bit hacky but it works)..
I have a hidden TerminalView object that runs bash through pkexec so a one
time password request activates the hidden su bash terminal and then I can
run commands through it at will without having to authorize again.
Problems are output text comes with all the terminal escape chars/codes and
needs filtering and i'm limited to only using shell commands not gambas
internal ones.
anyone ever worked on having a gambas app raise it's privileges?
Ideally i'd like to up the level then use gambas internal copy/move methods
rather than shell commands.
Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220603/39f19412/attachment.htm>
More information about the User
mailing list