On Fri, Dec 17, 2021 at 09:49:01PM +0100, Marc Haber wrote:
> sudo.prerm will error out unconditionally if there is no root password
> set. This breaks the replacement of sudo with sudo-ldap in autopkgtest
> environments and makes ugly workarounds necessary. How would we make
> this better?

I don't see the issue here.  That was put in there for a very good
reason: to not bork the system if something goes wrong during the
replacement.  A system without a root password set is a very
unorthodox use case.

Running autopkgtest with --env=SUDO_FORCE_REMOVE=yes should make this
work.  Of course, it would be nicer if the format for d/tests/control
offered something like Extra-Environment: to specify (a file with
definitions of) additional environment variables for a set of tests.

Since there is apparently no good way either to safely determine with
authority if you're running under an autopkgtest I think this is not
sudo's problem to solve, but that of autopkgtest.

Regards.

Reply via email to