Merge branch 'master' of ssh://camlistore.org:29418/runsit
diff --git a/exec.go b/exec.go
index 960e7ad..ead1d1b 100644
--- a/exec.go
+++ b/exec.go
@@ -102,7 +102,7 @@
 		}
 	}
 	if len(lr.Gids) != 0 {
-		if err := SetGroups(lr.Gids); err != nil {
+		if err := syscall.Setgroups(lr.Gids); err != nil {
 			log.Printf("setgroups: %v", err)
 		}
 	}
diff --git a/groups.go b/groups.go
index bc047bc..5fb3822 100644
--- a/groups.go
+++ b/groups.go
@@ -25,26 +25,8 @@
 	"os"
 	"strconv"
 	"strings"
-	"unsafe"
 )
 
-/*
-#include <grp.h>
-*/
-import "C"
-
-func SetGroups(gids []int) error {
-	if len(gids) == 0 {
-		return nil
-	}
-	list := make([]C.gid_t, len(gids))
-	for i, gid := range gids {
-		list[i] = C.gid_t(gid)
-	}
-	_, err := C.setgroups(C.size_t(len(list)), (*_Ctype___gid_t)(unsafe.Pointer(&list[0])))
-	return err
-}
-
 func LookupGroupId(group string) (gid int, err error) {
 	f, err := os.Open("/etc/group")
 	if err != nil {