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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:56

mduft@s01en22.salomon.at writes:
quoted hunk
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.

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

From: Markus Duft <hidden>
Date: 2016-06-15 22:49:56

On 10/29/2010 02:50 AM, Junio C Hamano wrote:
mduft@s01en22.salomon.at writes:
[snip]
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.
ok, i see the point, thanks for your suggestion! I'll change this.

may i ask where i should send v3 of the patch so it gets processed further?
just the ml again, or is there a specific maintainer i should send this to?

regards,
thanks for the help :)
Markus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help