-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working in FreeBSD if sudo not available #11
Comments
Currently topgrade only supports privilege elevation with the help of tools like sudo or doas. Currently supported are doas, sudo, gsudo and pkexec as given by the following function.
As far as I know there is no way to elevate privileges without those tools. Maybe it's possible through dbus and polkit but this would require a lot of tinkering and is probably not worth the effort. If you use another piece of software instead of sudo/doas for privilege elevation it could be possible to get it to work as an alternative to sudo. |
No, I was running topgrade as root
…On Thu, Oct 13, 2022, 3:11 PM Thomas Schönauer ***@***.***> wrote:
Currently topgrade only supports privilege elevation with the help of
tools like sudo or doas. Currently supported are doas, sudo, gsudo and
pkexec as given by the following function.
pub fn sudo() -> Option<PathBuf> { which("doas") .or_else(||
which("sudo")) .or_else(|| which("gsudo")) .or_else(|| which("pkexec")) }
As far as I know there is no way to elevate privileges without those
tools. Maybe it's possible through dbus and polkit but this would require a
lot of tinkering and is probably not worth the effort.
If you use another piece of software instead of sudo/doas for privilege
elevation it could be possible to get it to work as an alternative to sudo.
—
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADXBOBZTFSZGB6KTGGSHPLWDAC7TANCNFSM6AAAAAAREGUGFY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'll look into that because normally it's not intended to be run directly as root. |
I looked into that but as far as I can tell solving this would require a rework of the way we run code as root. |
No worries, installing sudo/doas/... is an easier fix than rewriting
everything - maybe should just mention in readme
…On Wed, Oct 19, 2022 at 9:45 AM Thomas Schönauer ***@***.***> wrote:
I looked into that but as far as I can tell solving this would require a
rework of the way we run code as root.
—
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADXBOCLPP72FUVPYVSDN5LWD67KVANCNFSM6AAAAAAREGUGFY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
In followup to r-darwish/topgrade#1023
I was trying out topgrade and getting polkit errors, preventing topgrade from running.
Installing sudo solved the issue - but not sure topgrade should depend on sudo
(FreeBSD 13.1-RELEASE-p2)
I do not have doas installed!
desinstalled sudo to reproduce error:
root#: topgrade
―― 13:57:08 - FreeBSD Packages
Error checking for authorization org.freedesktop.policykit.exec: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: get_kinfo_proc() failed for pid 3001: No such process
Retry? (y)es/(N)o/(s)hell/(q)uit
―― 13:57:16 - Composer
Changed current directory to /root/.composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
―― 13:57:17 - FreeBSD Update
Error checking for authorization org.freedesktop.policykit.exec: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: get_kinfo_proc() failed for pid 3001: No such process
Retry? (y)es/(N)o/(s)hell/(q)uit
―― 13:57:21 - Summary
FreeBSD Packages: FAILED
composer: OK
FreeBSD Upgrade: FAILED
Error checking for authorization org.freedesktop.policykit.exec: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: get_kinfo_proc() failed for pid 3001: No such process
The text was updated successfully, but these errors were encountered: