[PATCH] Drop SETGROUPS_NOOP

Corinna Vinschen vinschen at redhat.com
Fri Feb 25 01:23:14 EST 2005


[Resend, the original message seems to be lost somehow]

Hi,

the SETGROUPS_NOOP define is used only for Cygwin.  But it's also
combined with the HAVE_SETGROUPS test in bsd-misc.c.  So, since
setgroups() exists and is functional in Cygwin, this is actually a
noop in the more general sense.  The below patch drops that entirely.


Corinna

Index: acconfig.h
===================================================================
RCS file: /cvs/openssh_cvs/acconfig.h,v
retrieving revision 1.180
diff -p -u -r1.180 acconfig.h
--- acconfig.h	16 Aug 2004 13:12:06 -0000	1.180
+++ acconfig.h	24 Feb 2005 12:59:52 -0000
@@ -52,9 +52,6 @@
 #undef SPT_TYPE
 #undef SPT_PADCHAR
 
-/* setgroups() NOOP allowed */
-#undef SETGROUPS_NOOP
-
 /* SCO workaround */
 #undef BROKEN_SYS_TERMIO_H
 
Index: configure.ac
===================================================================
RCS file: /cvs/openssh_cvs/configure.ac,v
retrieving revision 1.247
diff -p -u -r1.247 configure.ac
--- configure.ac	24 Feb 2005 01:12:35 -0000	1.247
+++ configure.ac	24 Feb 2005 12:59:53 -0000
@@ -158,7 +158,6 @@ case "$host" in
 	AC_DEFINE(NO_X11_UNIX_SOCKETS)
 	AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT)
 	AC_DEFINE(DISABLE_FD_PASSING)
-	AC_DEFINE(SETGROUPS_NOOP)
 	;;
 *-*-dgux*)
 	AC_DEFINE(IP_TOS_IS_BROKEN)
Index: openbsd-compat/bsd-misc.c
===================================================================
RCS file: /cvs/openssh_cvs/openbsd-compat/bsd-misc.c,v
retrieving revision 1.25
diff -p -u -r1.25 bsd-misc.c
--- openbsd-compat/bsd-misc.c	15 Aug 2004 08:41:00 -0000	1.25
+++ openbsd-compat/bsd-misc.c	24 Feb 2005 12:59:53 -0000
@@ -122,17 +122,6 @@ int truncate(const char *path, off_t len
 }
 #endif /* HAVE_TRUNCATE */
 
-#if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP)
-/*
- * Cygwin setgroups should be a noop.
- */
-int
-setgroups(size_t size, const gid_t *list)
-{
-	return (0);
-}
-#endif 
-
 #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
 int nanosleep(const struct timespec *req, struct timespec *rem)
 {
Index: openbsd-compat/bsd-misc.h
===================================================================
RCS file: /cvs/openssh_cvs/openbsd-compat/bsd-misc.h,v
retrieving revision 1.17
diff -p -u -r1.17 bsd-misc.h
--- openbsd-compat/bsd-misc.h	15 Aug 2004 08:41:00 -0000	1.17
+++ openbsd-compat/bsd-misc.h	24 Feb 2005 12:59:53 -0000
@@ -67,10 +67,6 @@ int utimes(char *, struct timeval *);
 int truncate (const char *, off_t);
 #endif /* HAVE_TRUNCATE */
 
-#if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP)
-int setgroups(size_t, const gid_t *);
-#endif
-
 #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
 #ifndef HAVE_STRUCT_TIMESPEC
 struct timespec {

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.




More information about the openssh-unix-dev mailing list