On Sat, 26 Feb 2022 11:16:44 -0600, Matthew Martin wrote:

> Anton spotted a doas regression failure in t-run-keepenv-path after the
> change to doas for LOGIN_SETALL. Since that test runs doas in a chroot
> and the setup does not create a login.conf, login_getclass in
> login_cap.c will return a login_cap_t with a NULL lc_cap (and errno set
> to ENOENT) on L133. setuserenv returns -1 if lc->lc_cap is NULL causing
> the "could not set user environment" failure.
>
> As all the login_getcap* functions as well as gsetrl and setuserpath
> succeed on a missing login.conf, the below path changes setuserenv to
> return 0 as well. This matches what happens if the class has no setenv
> capability right below. The comment is taken from gsetrl.

Looks good to me.  Unless someone objects I will commit this.

 - todd

Reply via email to