Re: [PATCH v3 3/4] chsh: Add libuser support

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

 



On Wed, Feb 06, 2013 at 11:22:20PM -0700, Cody Maloney wrote:
>  login-utils/Makemodule.am |  3 ++
>  login-utils/chsh.c        | 22 ++++++++++++-
>  login-utils/libuser.c     | 80 +++++++++++++++++++++++++++++++++++++++++++++++
>  login-utils/libuser.h     | 14 +++++++++
>  4 files changed, 118 insertions(+), 1 deletion(-)
>  create mode 100644 login-utils/libuser.c
>  create mode 100644 login-utils/libuser.h

 Fixed and applied.

> +static int auth_lu(const char *service_name, struct lu_context *ctx, uid_t uid,
> +			const char *username) {
> +	if(!lu_uses_elevated_privileges(ctx)) {
> +		/* Drop privileges */
> +		if (setegid(getgid()) == -1) {
> +			errx(EXIT_FAILURE, _("Couldn't drop group privileges"));
> +			return FALSE;
> +		}

 errx() and err() are no-return functions ;-)

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux