OSDN Git Service

* security.cc (get_file_attribute): Fix conditional.
authorcorinna <corinna>
Fri, 9 Apr 2004 07:55:56 +0000 (07:55 +0000)
committercorinna <corinna>
Fri, 9 Apr 2004 07:55:56 +0000 (07:55 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/security.cc

index b58ecab..4fcb5f2 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-09  Corinna Vinschen  <corinna@vinschen.de>
+
+       * security.cc (get_file_attribute): Fix conditional.
+
 2004-04-08  Christopher Faylor  <cgf@bosbc.com>
 
        * child_info.h: Update CHILD_INFO_MAGIC after 2004-04-03 change.
index c7533de..d9a1e5f 100644 (file)
@@ -1437,8 +1437,8 @@ get_file_attribute (int use_ntsec, HANDLE handle, const char *file,
 
   if (use_ntsec && allow_ntsec && wincap.has_security ())
     {
-      if (handle && get_nt_object_attribute (handle, SE_FILE_OBJECT,
-                                            attribute, uidret, gidret))
+      if (!handle || get_nt_object_attribute (handle, SE_FILE_OBJECT,
+                                             attribute, uidret, gidret))
        get_nt_attribute (file, attribute, uidret, gidret);
       return 0;
     }