diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b58ecab47..4fcb5f2a6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2004-04-09 Corinna Vinschen + + * security.cc (get_file_attribute): Fix conditional. + 2004-04-08 Christopher Faylor * child_info.h: Update CHILD_INFO_MAGIC after 2004-04-03 change. diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index c7533dee0..d9a1e5f85 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -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; }