Subject: multi user stuff for cygwin.dll
From: [email-masked] (Gunther Ebert)

15 Jan 1997 03:05:59 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0Gold (WinNT; I)
Original-To: [email-masked]
Original-Sender: [email-masked]

Hi,

some time ago I tried to build a NT service with the Cygnus
libraries. The service workes well but if I try to run another
cygwin program in my interactive session at the same time one
of the programs fails. I investigated this behaviour and I realized
that the first cygwin program creates some shared objects like a
file mapping (for the shared memory), event and mutex (for
synchronization) object. The second program which is running under
a different user account than the first one cannot access these
objects because of an 'access denied' error. To work around this
I made some cygwin patches:

- change the access control lists of the objects mentioned above
  that everyone has full access now (that fixes the described 
  problem). 

Another problem is that ls and id are displaying wrong information
if there is no valid /etc/passwd file. If there is one the user
name will be displayed correctly but the group is always 'everyone'.
To work around this I made the following cygwin patches:
- change grp.cc that getgrgid() retrieves the real group name for
  a group id, that makes ls and id displaying the real group names
  instead of 'everyone' (but it does only work in NT domains because
  local user accounts don't have a 'primary group')
- to provide a real group and user id we need a valid /etc/passwd 
  file. To get this I have written a little program mkpasswd which 
  creates a passwd file (it actually prints it to stdout) from all 
  domain/machine users.

All that works fine on my NT 3.51 SP5 box and it is - important -
not language dependend.

The next thing could be making ls to display the real file owner,
not just the current user.

Of course these changes apply only on Windows NT, on Windows 95 all
remains unchanged.
If somebody is interested in ...

Gunther
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".