7a5b452443
We can't handle the S_ISGID bit if the child didn't inherit a NULL SID ACE with the S_ISGID bit set. On directories without default ACL entries we would have to add an inheritable NULL SID ACE and nothing else. This in turn results in permission problems when calling set_file_sd from set_created_file_access. That's fixable, but it would only work for files created from Cygwin while files created from native Windows tools end up with really ugly permissions. This patch only makes sure that the S_ISGID bit is reset for a directory if it has no inheritable ACEs. Still having the 's' bit shown in ls or getfacl output would be misleading. So, calling `setfacl -k' on a dir also removes the S_ISGID bit now. * sec_acl.cc (set_posix_access): Drop S_ISGID bit on directories without inheritable ACEs. Explain why. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at http://cygwin.com You might especially be interested in http://cygwin.com/faq/faq.programming.html#faq.programming.building-cygwin