delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/05/14/07:52:08

X-Spam-Check-By: sourceware.org
Date: Mon, 14 May 2007 13:51:34 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: chmod() converts local domain socket file to regular file
Message-ID: <20070514115134.GB12259@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20070427095846 DOT GA9290 AT pm513-1 DOT comsys DOT ntu-kpi DOT kiev DOT ua>
Mime-Version: 1.0
In-Reply-To: <20070427095846.GA9290@pm513-1.comsys.ntu-kpi.kiev.ua>
User-Agent: Mutt/1.4.2.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Apr 27 12:58, Andrey Simonenko wrote:
> Greetings,
> 
> Has Cygwin 1.5.24-2 and XP.
> 
> A program creates local domain socket.  If S_IRUSR bit is
> removed from the socket file, then this file is converted to a
> regular file.

This is a chicken-egg problem, sort of.  The fact that the file
represents an AF_LOCAL socket is coded into the content of the file
itself.  If you remove the S_IRxxx flags, the file can't be read anymore
and Cygwin can't figure out that this is a socket file.

It's arguably a bug in Cygwin that it's possible to remove the read
flags entirely from a socket file, but so far I'm not quite sure what
the best solution to this problem is.  I'm looking into fixing that but
for now the answer is just "don't do that".


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019