os.path.expanduser ignores os.seteuid

Graham Guttocks graham_guttocks at yahoo.co.nz
Tue Jun 4 14:22:55 EDT 2002


Why doesn't os.path.expanduser pay attention to the fact that I've
changed the process's effective user id?

As root:

Python 2.1.3 (#1, Apr 11 2002, 18:30:30) 
[GCC 2.95.3 20010315 (release) [FreeBSD]] on freebsd4
Type "copyright", "credits" or "license" for more information.
>>> import os
>>> os.seteuid(667)
>>> os.path.expanduser("~")
'/root'
>>> 

Other functions like os.getlogin() don't have this problem.

Any workarounds?


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com





More information about the Python-list mailing list