Re: [PATCH 1/2] add support for the SUA layer (interix; windows)

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

 



mduft@xxxxxxxxxxxxxxxxxx writes:

> diff --git a/daemon.c b/daemon.c
> index 9326d3a..d68a31f 100644
> --- a/daemon.c
> +++ b/daemon.c
> @@ -956,7 +956,11 @@ static int serve(char *listen_addr, int listen_port, struct passwd *pass, gid_t
>  		    listen_addr, listen_port);
>  
>  	if (pass && gid &&
> -	    (initgroups(pass->pw_name, gid) || setgid (gid) ||
> +	    (
> +#ifndef NO_INITGROUPS
> +		    initgroups(pass->pw_name, gid) || 
> +#endif
> +	     setgid (gid) ||
>  	     setuid(pass->pw_uid)))
>  		die("cannot drop privileges");
>  

It would be much nicer to do this:

        #ifdef NO_INITGROUPS
        #define initgroups(x,y) (0) /* nothing */
        #endif

near the beginning of the file.  That would make life of people who have
changes in flight that would touch the same area of the code a lot easier.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]