git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 29, 2010, 00:50 UTC
Message-ID
<7veib99608.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1288168793-11159-2-git-send-email-markus.duft@salomon.at>
mduft@s01en22.salomon.at writes:
Show 17 quoted lines
> 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.

Previous: mduft@s01en22.salomon.atNext: Markus Duft
Message 3 of 6 in “add support for SUA (interix)”
  1. mduft@s01en22.salomon.atOct 27, 2010
  2. 1/2 add support for the SUA layer (interix; windows)mduft@s01en22.salomon.at, Oct 27, 2010
  3. Junio C HamanoOct 29, 2010
  4. Markus DuftOct 29, 2010
  5. Junio C HamanoOct 29, 2010
  6. 2/2 add configure checks for previously created feature flagsmduft@s01en22.salomon.at, Oct 27, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.