[Bug 2127766] Re: snap run --strace doesn't work with sudo-rs [sudo -E not supported]
Ernest Lotter
2127766 at bugs.launchpad.net
Fri Nov 28 09:20:20 UTC 2025
** Description changed:
+ [SRU] 2.73: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/2132084
+
+ [ Impact ]
+
+ <add info...>
+
+ [ Test Plan ]
+
+ 1. Reproduce with snapd snap < 2.73
+
+ <add info...>
+
+ 2. Prove fixed with snapd snap 2.73
+
+ <add info...>
+
+ ---original---
+
sudo-rs became the default sudo in 25.10, which broke this snap run
--strace,
$ snap run --strace <snap>.<app>
warning: preserving the entire environment is not supported, `-E` is ignored
- [sudo: authenticate] Password:
+ [sudo: authenticate] Password:
error: exit status 1
It does work if I switch back to GNU Coreutils' sudo. The reason being
many required environment variables are no longer passed through, and
the strace fails due to SNAP_INSTANCE_NAME not being set, before we get
to execve'ing the snap application itself.
I commented on this use case in the sudo-rs issue tracker:
https://github.com/trifectatechfoundation/sudo-rs/issues/1299
Maybe snapd needs to have a whitelist of environment variables?
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rust-sudo-rs in Ubuntu.
https://bugs.launchpad.net/bugs/2127766
Title:
snap run --strace doesn't work with sudo-rs [sudo -E not supported]
Status in snapd:
Fix Committed
Status in rust-sudo-rs package in Ubuntu:
Won't Fix
Status in snapd package in Ubuntu:
New
Bug description:
[SRU] 2.73:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/2132084
[ Impact ]
<add info...>
[ Test Plan ]
1. Reproduce with snapd snap < 2.73
<add info...>
2. Prove fixed with snapd snap 2.73
<add info...>
---original---
sudo-rs became the default sudo in 25.10, which broke this snap run
--strace,
$ snap run --strace <snap>.<app>
warning: preserving the entire environment is not supported, `-E` is ignored
[sudo: authenticate] Password:
error: exit status 1
It does work if I switch back to GNU Coreutils' sudo. The reason being
many required environment variables are no longer passed through, and
the strace fails due to SNAP_INSTANCE_NAME not being set, before we
get to execve'ing the snap application itself.
I commented on this use case in the sudo-rs issue tracker:
https://github.com/trifectatechfoundation/sudo-rs/issues/1299
Maybe snapd needs to have a whitelist of environment variables?
To manage notifications about this bug go to:
https://bugs.launchpad.net/snapd/+bug/2127766/+subscriptions
More information about the foundations-bugs
mailing list