Re: [PATCH] Use login_getpwclass() instead of login_getclass() so that the root vs. default login class distinction is made correctly.

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Wed, 17 Feb 2021 at 19:10, Damien Miller <djm@xxxxxxxxxxx> wrote:
>
> On Mon, 15 Feb 2021, Ed Maste wrote:
>
> > From: Brian Feldman <green@xxxxxxxxxxx>
> >
> > From FreeBSD 885a59f2e067 by Brian Feldman <green@xxxxxxxxxxx>.
> >
> > Details in FreeBSD PR 37416 https://bugs.freebsd.org/37416 - summary:
> >
> > > sshd uses the "default" login class for users with uid=0 instead of
> > > the "root" login class when setting up the user's session.
> > > ...
> diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
> index 50bac587..542ae58d 100644
> --- a/openbsd-compat/openbsd-compat.h
> +++ b/openbsd-compat/openbsd-compat.h
> @@ -48,6 +48,10 @@
>  #include "blf.h"
>  #include "fnmatch.h"
>
> +#if defined(HAVE_LOGIN_CAP) && !defined(HAVE_LOGIN_GETPWCLASS)
> +# define login_getpwclass(pw) login_getclass(pw->pw_class)
> +#endif
> +
>  #ifndef HAVE_BASENAME
>  char *basename(const char *path);
>  #endif

LGTM

Not sure if you want to move the openbsd-compat.h hunk to follow
HAVE_GETCWD, keeping them in alphabeticalish order?
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux