Diff for /embedaddon/sudo/common/setgroups.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 16:23:02 version 1.1.1.2, 2012/05/29 12:26:49
Line 36 Line 36
 #include <limits.h>  #include <limits.h>
   
 #include "missing.h"  #include "missing.h"
   #include "sudo_debug.h"
   
 int  int
 sudo_setgroups(int ngids, const GETGROUPS_T *gids)  sudo_setgroups(int ngids, const GETGROUPS_T *gids)
 {  {
     int maxgids, rval;      int maxgids, rval;
       debug_decl(sudo_setgroups, SUDO_DEBUG_UTIL)
   
    rval = setgroups(ngids, gids);    rval = setgroups(ngids, (GETGROUPS_T *)gids);
     if (rval == -1 && errno == EINVAL) {      if (rval == -1 && errno == EINVAL) {
         /* Too many groups, try again with fewer. */          /* Too many groups, try again with fewer. */
 #if defined(HAVE_SYSCONF) && defined(_SC_NGROUPS_MAX)  #if defined(HAVE_SYSCONF) && defined(_SC_NGROUPS_MAX)
Line 51  sudo_setgroups(int ngids, const GETGROUPS_T *gids) Line 53  sudo_setgroups(int ngids, const GETGROUPS_T *gids)
 #endif  #endif
             maxgids = NGROUPS_MAX;              maxgids = NGROUPS_MAX;
         if (ngids > maxgids)          if (ngids > maxgids)
            rval = setgroups(maxgids, gids);            rval = setgroups(maxgids, (GETGROUPS_T *)gids);
     }      }
    return rval;    debug_return_int(rval);
 }  }

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>