This is the mail archive of the gdb-patches@sources.redhat.com 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: RFC: Check permissions of .gdbinit files


On Wed, Jun 01, 2005 at 12:03:13AM +0300, Eli Zaretskii wrote:
>> Date: Tue, 31 May 2005 13:54:33 -0400
>> From: Christopher Faylor <me@cgf.cx>
>> 
>> On Tue, May 31, 2005 at 08:46:03AM +0300, Eli Zaretskii wrote:
>> >> Date: Mon, 30 May 2005 18:42:00 -0400
>> >> From: Daniel Jacobowitz <drow@false.org>
>> >> Cc: gdb-patches@sourceware.org
>> >> 
>> >> Bother; I thought about the portability for a while, but didn't quite
>> >> consider this.  We're still OK though - the whole thing is surrounded
>> >> by HAVE_GETUID, and MinGW does not have GETUID, if I understand
>> >> correctly.
>> >
>> >Maybe, I don't know.  Isn't the MinGW port linked against some
>> >library, such as libgw32c.a, that implements more Posix stuff?
>> 
>> MinGW does not have getuid().  Or, at least the version that I have
>> checked out doesn't have it.  It is possible to emulate getuid on WinNT+
>> and it is possible to fill in all of the fields in st_mode with
>> reasonable things but, AFAIK, Mingw's implementation doesn't do this.
>
>Yes, I agree with this analysis, provided that we talk about stock
>MinGW runtime.  But if the MinGW port is built with additional
>libraries, such as libgw32c, then I think it will have both getuid and
>S_IWOTH, and in that case there might be a problem I mentioned above.

libgw32c, AFAIK, should be treated as a different target entirely from
mingw.  I don't think we should be worrying about it.  I think we should
standardize on mingw and cygwin as the supported "platforms" for
Windows.

>>>In any case, the other issue still remains: if they do have getuid and
>>>S_IWOTH, non-readonly files will be reported world-writable.  So I'd
>>>suggest to either disable this feature entirely on Windows platforms,
>>>or write a Windows specific code that uses the Win32 API to get file
>>>ownership (GetSecurityInfo or some such).
>>
>>Did anyone read Ulrich Drepper's recent rant about this kind of thing?
>>:-)
>
>I don't think I've read it.  I'd appreciate a URL.

http://www.livejournal.com/users/udrepper/7326.html

cgf


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