quexten / goldwarden

A feature-packed Bitwarden compatible desktop client
MIT License
715 stars 22 forks source link

Polkit setup crashing on Fedora 39 #156

Open Lcchy opened 6 months ago

Lcchy commented 6 months ago

Hello, thanks so much for this great software! I appreciate the security focused approach.

On Fedora 39, when installing via the rpm, I am somehow unable to setup Polkit properly:

$ goldwarden setup polkit
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ====
Authentication is needed to run `/usr/bin/mv /tmp/goldwarden-policy /us ... actions/com.quexten.goldwarden.policy' as the super user
Authenticating as: lcchy
Password: 
==== AUTHENTICATION FAILED ====
panic: exit status 127

goroutine 1 [running]:
github.com/quexten/goldwarden/cmd.setupPolkit()
    /home/runner/work/goldwarden/goldwarden/cmd/setup_linux.go:48 +0x496
github.com/quexten/goldwarden/cmd.glob..func24(0xc96aa0?, {0x92c989?, 0x0?, 0x0?})
    /home/runner/work/goldwarden/goldwarden/cmd/setup_linux.go:80 +0x17
github.com/spf13/cobra.(*Command).execute(0xc96aa0, {0xd062b0, 0x0, 0x0})
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0xa91
github.com/spf13/cobra.(*Command).ExecuteC(0xc953a0)
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x425
github.com/spf13/cobra.(*Command).Execute(...)
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/quexten/goldwarden/cmd.Execute({{0x0, 0x0}, 0x0, {0xc000030a80, 0x2e}, 0x0, 0x0, {0x0, 0x0}, {0x0, ...}, ...})
    /home/runner/work/goldwarden/goldwarden/cmd/root.go:29 +0xea
main.main()
    /home/runner/work/goldwarden/goldwarden/main.go:52 +0x5f8

Any help would be very appreciated.

sandboiii commented 5 months ago

Hey, I had the same problem on Arch. I tried to run setup in Hyprland session and encountered this error. Then I opened X11 Cinnamon session and run setup again without any errors. Looks like there is a problem with Wayland.

quexten commented 5 months ago

@sandboiii, @Lcchy do you have a polkit agent set up? I.e what does pkexec whoami output?

quexten commented 5 months ago

For hyprland this should help: https://wiki.archlinux.org/title/Hyprland#Polkit_authentication

quexten commented 5 months ago

If that's not it, also try again on 0.2.15 please.

sandboiii commented 5 months ago

@quexten yeah, I haven't setup polkit agent and thus got this error. Now, I get this output after running setup:

failed setting selinux context
exit status 1
Polkit setup successfully

Is it acceptable to fail setting selinux context? My auth agent is /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1