delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/12/08/19:12:19

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-ID: <384EF220.D7FA1128@vinschen.de>
Date: Thu, 09 Dec 1999 01:04:48 +0100
From: Corinna Vinschen <corinna AT vinschen DOT de>
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: de,en
MIME-Version: 1.0
To: cygdev <cygwin-developers AT sourceware DOT cygnus DOT com>,
Chris Faylor <cgf AT cygnus DOT com>
Subject: Some small patches

This is a multi-part message in MIME format.
--------------09A092ECCD265A3AE5A90043
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Hello,

I have attached some small patches relative to winsup-991207.

Regards,
Corinna


ChangeLog:
==========

Dec 08 23:50:00 1999  Corinna Vinschen  <corinna AT vinschen DOT de>

	* security.cc (get_nt_attribute): Additional debug output.
	Corrected behaviour in case of NULL ACL.
	* syscalls.cc (stat_worker): Remote drives may get stat
	info from fh.fstat() now.
	* include/winnt.h: Added defines for W2K ACL control flags.
	* include/cygwin/socket.h: Added missing PF_NETBIOS.
--------------09A092ECCD265A3AE5A90043
Content-Type: text/plain; charset=us-ascii;
 name="cv-patch-991208"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="cv-patch-991208"

Index: security.cc
===================================================================
RCS file: /src/cvsroot/winsup-991207/security.cc,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 security.cc
--- security.cc	1999/12/08 22:51:39	1.1.1.1
+++ security.cc	1999/12/08 23:51:59
@@ -581,16 +581,35 @@ get_nt_attribute (const char *file, int 
   if (! GetSecurityDescriptorGroup (sd, &group_sid, &dummy))
     debug_printf ("GetSecurityDescriptorGroup %E");
 
+// DEBUG
+  SECURITY_DESCRIPTOR_CONTROL sdc;
+  DWORD rev;
+
+  if (GetSecurityDescriptorControl (sd, &sdc, &rev))
+    {
+      debug_printf ("SE_DACL_AUTO_INHERITED: %d",
+                    (sdc & SE_DACL_AUTO_INHERITED) != 0);
+      debug_printf ("SE_DACL_PROTECTED: %d",
+                    (sdc & SE_DACL_PROTECTED) != 0);
+
+    }
+// END DEBUG
+
   PACL acl;
   BOOL acl_exists;
 
-  if (! GetSecurityDescriptorDacl (sd, &acl_exists, &acl, &dummy)
-      || ! acl_exists
-      || ! acl)
+  if (! GetSecurityDescriptorDacl (sd, &acl_exists, &acl, &dummy))
     {
       __seterrno ();
       debug_printf ("GetSecurityDescriptorDacl %E");
       return -1;
+    }
+
+  if (! acl_exists || ! acl)
+    {
+      *attribute |= S_IRWXU | S_IRWXG | S_IRWXO;
+      syscall_printf ("file: %s No ACL = %x", file, *attribute);
+      return 0;
     }
 
   BOOL has_owner_bits = FALSE;
Index: syscalls.cc
===================================================================
RCS file: /src/cvsroot/winsup-991207/syscalls.cc,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 syscalls.cc
--- syscalls.cc	1999/12/08 22:51:39	1.1.1.1
+++ syscalls.cc	1999/12/08 23:51:59
@@ -948,7 +948,7 @@ stat_worker (const char *caller, const c
   if (atts == -1 || !(atts & FILE_ATTRIBUTE_DIRECTORY) ||
       (os_being_run == winNT
        && (((dtype = GetDriveType (drive)) != DRIVE_NO_ROOT_DIR
-	     && dtype != DRIVE_REMOTE
+	     //&& dtype != DRIVE_REMOTE
 	     && dtype != DRIVE_UNKNOWN))))
     {
       fhandler_disk_file fh (NULL);
Index: include/winnt.h
===================================================================
RCS file: /src/cvsroot/winsup-991207/include/winnt.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 winnt.h
--- include/winnt.h	1999/12/08 22:51:48	1.1.1.1
+++ include/winnt.h	1999/12/08 23:52:00
@@ -704,6 +704,12 @@ typedef BYTE BOOLEAN,*PBOOLEAN;
 #define SE_DACL_DEFAULTED 8
 #define SE_SACL_PRESENT 16
 #define SE_SACL_DEFAULTED 32
+#define SE_DACL_AUTO_INHERIT_REQ 256
+#define SE_SACL_AUTO_INHERIT_REQ 512
+#define SE_DACL_AUTO_INHERITED 1024
+#define SE_SACL_AUTO_INHERITED 2048
+#define SE_DACL_PROTECTED 4096
+#define SE_SACL_PROTECTED 8192
 #define SE_SELF_RELATIVE 0x8000
 #define SECURITY_DESCRIPTOR_MIN_LENGTH 20
 #define SECURITY_DESCRIPTOR_REVISION 1
Index: include/cygwin/socket.h
===================================================================
RCS file: /src/cvsroot/winsup-991207/include/cygwin/socket.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 socket.h
--- include/cygwin/socket.h	1999/12/08 22:51:49	1.1.1.1
+++ include/cygwin/socket.h	1999/12/08 23:52:00
@@ -90,6 +90,7 @@ struct msghdr 
 #define PF_LAT          AF_LAT
 #define PF_HYLINK       AF_HYLINK
 #define PF_APPLETALK    AF_APPLETALK
+#define PF_NETBIOS      AF_NETBIOS
 
 #define PF_MAX          AF_MAX
 


--------------09A092ECCD265A3AE5A90043--



- Raw text -


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