[Python-Dev] Re: [Python-checkins] python/dist/src/Lib/test test_shutil.py, 1.10, 1.11 (original) (raw)

Johannes Gijsbers jlg at dds.nl
Tue Dec 7 23:52:45 CET 2004


On Tue, Dec 07, 2004 at 02:54:50PM +0000, Michael Hudson wrote:

Is that really the best way to check for root? It may be, I guess, but I'd have expected os.geteuid() to be more reliable...

Ah yes, I suppose it is. I'll change it tomorrow night if no Unix-guru steps up with an alternative solution.

Or is it os.getuid()? I always get confused by these functions...

Based on my reading of the difference between geteuid and getuid, I'd go for geteuid.

Cheers,

Johannes



More information about the Python-Dev mailing list