This is the mail archive of the cygwin-developers@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Some small patches



Hello,

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

Regards,
Corinna


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

Dec 08 23:50:00 1999  Corinna Vinschen  <corinna@vinschen.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.
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
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]