Proposed change for Win9x file permissions...

Bill C. Riemers cygwin@docbill.net
Fri May 23 22:24:00 GMT 2003


Actually there are two patches.  The first one is to fhandler_disk_file.cc.
This changes the fstat()
function to show Win9x permissions masked by the "umask".  This is the same
thing early versions of
the Linux FAT driver did, before "umask" was added as a mount option.
Obviously that would be the better solution for Cygwin as well.  However, I
decided try the simpler option of just using the normal umask first.

This allows utilities like sshd to work as expected simply by wrapping them
in a script like:

    #!/bin/bash
    umask 0077;exec /usr/sbin/sshd "$@"

Of course there will be unexpected side effects if someone doesn't realize
that umask is used this way...   But it will probably be less problematic
than having completely unchangeable permissions
under Win9x.

The second patch corrects an obvious typo in winusers.h that prevents the
current CVS code from compiling.

                                                      Bill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin.patch
Type: application/octet-stream
Size: 1842 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030523/abe1d188/attachment.obj>


More information about the Cygwin-patches mailing list