[MacPorts] #21559: python's os.getgroups() fails as root on 10.6 SL

MacPorts noreply at macports.org
Tue Sep 22 18:35:18 PDT 2009


#21559: python's os.getgroups() fails as root on 10.6 SL
--------------------------------------+-------------------------------------
 Reporter:  league@…                  |       Owner:  macports-tickets@…                   
     Type:  defect                    |      Status:  new                                  
 Priority:  Normal                    |   Milestone:                                       
Component:  ports                     |     Version:  1.8.99                               
 Keywords:                            |        Port:  python26                             
--------------------------------------+-------------------------------------
 My rdiff-backup script fails on snow leopard because of this issue that
 arose with python25. When run as root, os.getgroups() causes an OSError
 exception. This did not occur on 10.5, but it occurs on 10.6 with
 '''both''' python 2.5 and 2.6.

 {{{
 % python2.6
 Python 2.6.2 (r262:71600, Sep 22 2009, 09:48:09)
 [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import os
 >>> os.getgroups()
 [501, 204, 100, 98, 81, 80, 79, 61, 12, 101, 402, 102]
 >>>
 % sudo python2.6
 Python 2.6.2 (r262:71600, Sep 22 2009, 09:48:09)
 [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import os
 >>> os.getgroups()
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 OSError: [Errno 22] Invalid argument
 >>>
 }}}

 As I said, my main concern is getting rdiff-backup to work as root. That
 relies explicitly on python25, but I imagine the fix would be the same for
 both. Incidentally, the python 2.6.1 distributed with the OS does not
 exhibit this problem, so building rdiff-backup against that may be a
 workaround.

-- 
Ticket URL: <http://trac.macports.org/ticket/21559>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list