Skip to content
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

Sudo in nix-portable #83

Open
traverseda opened this issue Jan 7, 2024 · 6 comments
Open

Sudo in nix-portable #83

traverseda opened this issue Jan 7, 2024 · 6 comments

Comments

@traverseda
Copy link

I'm using nix-portable to configure stuff related to my dotfiles, including setting up a shell and terminal multiplexer. Currently this means I can't run sudo commands when I'm using said dotfiles, at least if I'm not a system that doesn't have real nix.

Is there a way to tweak the bubblewrap config to fix this?

@DavHau
Copy link
Owner

DavHau commented Jan 8, 2024

I don't quite get what's the problem. Why can you not use sudo?

@traverseda
Copy link
Author

...is that not happening for anyone else?

./nix-portable nix run nixpkgs#bash
$ sudo
sudo: /etc/sudo.conf is owned by uid 65534, should be 0
sudo: The "no new privileges" flag is set, which prevents sudo from running as root.
sudo: If sudo is running in a container, you may need to adjust the container configuration to disable the flag.

@traverseda
Copy link
Author

traverseda commented Jan 8, 2024

➜  ~ which bwrap 
/usr/bin/bwrap
➜  ~ bwrap --version
bubblewrap 0.8.0

@DavHau
Copy link
Owner

DavHau commented Jan 8, 2024

I never tried using sudo. Maybe have a look at the bwrap cmdline flags. If you can find out what we need to change, we can add it to nix-portable.

@traverseda
Copy link
Author

traverseda commented Jan 8, 2024

Looking into it, seems like it's not going to be possible.

containers/bubblewrap#378 (comment)

Not surprising, I imagine it's difficult to allow overriding paths, allowing privilege escalation, and allowing setuid binaries, without opening up security holes.

How would you like to handle this bug? Close it, mark it as un-fixable?

@jennydaman
Copy link

For the sake of keeping note: FUSE doesn't seem to work in bwrap either, so neither will AppImage work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants