ECToo / xdelta

Automatically exported from code.google.com/p/xdelta
0 stars 0 forks source link

xdelta3 no_output always fail when run as root #151

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The no_output test will always fail as root. Previously, there was code to 
check if uid()==0, but that has been removed in r343.

Previously reported and fixed in issue #67, 
http://code.google.com/p/xdelta/issues/detail?id=67

Tested on linux/amd64.

Original issue reported on code.google.com by ajpl.delacroix on 4 Nov 2012 at 7:55

GoogleCodeExporter commented 9 years ago
It's really unsafe to run this sort of test as root, right?

Original comment by josh.mac...@gmail.com on 5 Nov 2012 at 6:50

GoogleCodeExporter commented 9 years ago
BTW, the reason I removed that statement is that getuid() test isn't portable, 
i.e., the special case was difficult to maintain. That and I think it's unsafe.

Original comment by josh.mac...@gmail.com on 5 Nov 2012 at 7:04

GoogleCodeExporter commented 9 years ago
If it is unsafe, then maybe something should warn the user not to run 'xdelta 
test' as root?

Original comment by ajpl.delacroix on 5 Nov 2012 at 5:33

GoogleCodeExporter commented 9 years ago
If there was a portable way to detect whether you are running as root, we 
wouldn't have this problem.

Original comment by josh.mac...@gmail.com on 18 Nov 2012 at 6:11