delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2003/02/21/10:46:19

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Date: Fri, 21 Feb 2003 16:03:27 +0100
From: Corinna Vinschen <vinschen AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Heads up: Changed stat/fstat for sockets
Message-ID: <20030221150327.GM1403@cygbert.vinschen.de>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.4i

Hi,

just so that nobody is surprised.  I've changed stat/fstat on sockets
to return values which are more similar to what Linux returns.  It's
a bit difficult to explain.  Basically it's now working like that:

- fstat() on an open socket returns the current owner and group in the
  st_uid/st_gid fields and 0777 permissions in st_mode (see below).

- stat() on AF_UNIX/AF_LOCAL sockets returns owner and group of the actual
  socket file in st_uid/st_gid.
  It returns the same st_ino value as the actual socket file on the disk,
  the actual file permissions in st_mode and the same st_dev value which
  would have been returned if the socket file would have been just a
  regular file on disk.

Other fields like st_rdev, st_blocks and st_size are appropriately tweaked
(mostly set to 0).

The device special files /dev/dgsocket, /dev/streamsocket, /dev/tcp and
/dev/udp are now correctly designated as character special files with
distinct minor device numbers.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

- Raw text -


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