This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: cygwin XP Fast User Switching Support?
On Tue, May 20, 2003 at 01:13:12PM -0400, Igor Pechtchanski wrote:
>On Tue, 20 May 2003, Christopher Faylor wrote:
>
>> On Tue, May 20, 2003 at 04:57:04PM +0200, Corinna Vinschen wrote:
>> >On Tue, May 20, 2003 at 09:42:26AM -0400, Jason Tishler wrote:
>> >> In the above case, the event created to improve the security of Cygwin's
>> >> AF_UNIX implementation is not visible to psql unless it is running in
>> >> Terminal Session 0. Note this problem affects all client/server apps
>> >> using AF_UNIX sockets when the server runs as a service. I'm concerned
>> >> that there may be other cases too...
>> >
>> >There are. More or less all shared objects created in Cygwin are
>> >affected by this. I've created a patch for it. Could you please
>> >apply the below patch and test if it works now?
>> >
>> >Basically it adds a new wincap capability (has_terminal_services) which
>> >is true only for 2K, XP, 2003 and then it prepends a "Global\" to the
>> >name of shared objects if we're running on one of these systems.
>>
>> Why go to the bother of checking if the capability exists? If just adding
>> Global is all that's required why don't we just modify shared_name to always
>> do that?
>>
>> cgf
>
>MSDN (<http://msdn.microsoft.com/library/en-us/termserv/termserv/kernel_object_namespaces.asp>)
>says:
>
> On Windows 2000 without Terminal Services, these keywords are ignored.
> On earlier versions of the system, the functions for creating or
> opening these objects fail if you specify a name containing the
> backslash character (\).
Ok. In that case, my only comment on this patch is that
secret_event_name is not thread safe.
Neither is shared_name, for that matter, but hopefully shared_name is only being
called during process startup. secret_event_name could easily be called from
multiple threads. Just passing a buf argument to the function should make it
thread safe.
cgf