From c46d7be9a6cbbb16cd50038b30e818844793727d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 27 Mar 2008 20:03:32 +0000 Subject: * flock.cc (FLOCK_PARENT_DIR_ACCESS): Define. (FLOCK_INODE_DIR_ACCESS): Define. (FLOCK_MUTANT_ACCESS): Define. (FLOCK_EVENT_ACCESS): Define. (SD_MIN_SIZE): Define. (everyone_sd): Define to simplify calling _everyone_sd. (_everyone_sd): Replace everyone_sync_sd. Take SECURITY_DESCRIPTOR as argument and allow to specify access mask. (get_lock_parent_dir): Open/Create parent dir with FLOCK_PARENT_DIR_ACCESS. Add text to api_fatal message. (inode_t::inode_t): Open/Create dir with FLOCK_INODE_DIR_ACCESS. Open/Create mutant with FLOCK_MUTANT_ACCESS. Add text to api_fatal message. (lockf_t::create_lock_obj): Create event with FLOCK_EVENT_ACCESS. Add text to api_fatal message. (lockf_t::open_lock_obj): Open event with FLOCK_EVENT_ACCESS. On failure, just return NULL pointer instead of calling api_fatal. (lockf_t::get_lock_obj_handle_count): Replace call to small_printf with call to debug_printf. (lf_setlock): Handle a failure to open the lock event object as EDEADLK. Call system_printf if opening sync objects fail. * ntdll.h (DIRECTORY_TRAVERSE): Define. (DIRECTORY_CREATE_OBJECT): Define. (DIRECTORY_CREATE_SUBDIRECTORY): Define. (EVENT_QUERY_STATE): Define. --- winsup/cygwin/ntdll.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/ntdll.h') diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index 695c229cd..7ccd2e5bd 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -1,6 +1,6 @@ /* ntdll.h. Contains ntdll specific stuff not defined elsewhere. - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc. This file is part of Cygwin. @@ -189,8 +189,13 @@ typedef struct _FILE_ID_BOTH_DIR_INFORMATION #define LOCK_VM_IN_RAM 2 #define DIRECTORY_QUERY 1 +#define DIRECTORY_TRAVERSE 2 +#define DIRECTORY_CREATE_OBJECT 4 +#define DIRECTORY_CREATE_SUBDIRECTORY 8 #define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|0x0f) +#define EVENT_QUERY_STATE 1 + typedef ULONG KAFFINITY; typedef enum _SYSTEM_INFORMATION_CLASS -- cgit v1.2.3