File ianb-pastescript-a19e462769b4.diff of Package python-PasteScript

diff -ru paste/script/serve.py paste/script/serve.py
--- paste/script/serve.py	2010-11-17 19:38:52.000000000 +0100
+++ paste/script/serve.py	2012-02-08 06:30:50.000000000 +0100
@@ -497,6 +497,11 @@
         if self.verbose > 0:
             print 'Changing user to %s:%s (%s:%s)' % (
                 user, group or '(unknown)', uid, gid)
+        if hasattr(os, 'initgroups'):
+            os.initgroups(user, gid)
+        else:
+            os.setgroups([e.gr_gid for e in grp.getgrall()
+                          if user in e.gr_mem] + [gid]) 
         if gid:
             os.setgid(gid)
         if uid: