This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] fileio.exp FAILs if run as root


> Date: Sat, 8 Dec 2007 19:14:22 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> 
> Hi,
> 
> if you run gdb.base/fileio.exp as UID 0 it will print:
> 	FAIL: gdb.base/fileio.exp: Open for write but no write permission returns EACCES
> 	FAIL: gdb.base/fileio.exp: Unlinking a file in a directory w/o write access returns EACCES

People running the testsuite as root deserve what they get.  I don't
think we should complicate our code to make that possible, especially
if it involves calling setuid() which is notoriously unportable.

> 2007-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* gdb.base/fileio.c (ROOTSUBDIR): New macro.
> 	(main): CHDIR into ROOTSUBDIR.  CHOWN ROOTSUBDIR and CHDIR into
> 	ROOTSUBDIR if we are being run as root.
> 	* gdb.base/fileio.exp: Change the startup and finish cleanup.
> 	Change the test file reference to be into the `fileio.dir' directory.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]