* include/cygwin/in.h (in_attr_t): Define new type.

* include/arpa/inet.h (inet_addr): Change return type to in_addr_t.
(inet_lnaof): Ditto.
(inet_netof): Ditto.
(inet_network): Ditto.
* include/cygwin/types.h: Move many *_t typedefs here.  Protect them with
ifdefs.
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Change ntsec_atts to
mode_t.
* security.cc (get_attribute_from_acl): Accept mode_t attribute.
(get_nt_attribute): Ditto.
(get_file_attribute): Ditto.
(get_nt_object_attribute): Ditto.
(get_object_attribute): Ditto.
* security.h: Reflect above changes.
* syscalls.cc (chown_worker): Change attrib to mode_t.
This commit is contained in:
Christopher Faylor
2003-02-10 22:43:29 +00:00
parent eff24ab9c5
commit 407b8df695
8 changed files with 226 additions and 77 deletions

View File

@ -1224,7 +1224,7 @@ write_sd (const char *file, PSECURITY_DESCRIPTOR sd_buf, DWORD sd_size)
}
static void
get_attribute_from_acl (int * attribute, PACL acl, PSID owner_sid,
get_attribute_from_acl (mode_t *attribute, PACL acl, PSID owner_sid,
PSID group_sid, BOOL grp_member)
{
ACCESS_ALLOWED_ACE *ace;
@ -1319,7 +1319,7 @@ get_attribute_from_acl (int * attribute, PACL acl, PSID owner_sid,
}
static int
get_nt_attribute (const char *file, int *attribute,
get_nt_attribute (const char *file, mode_t *attribute,
__uid32_t *uidret, __gid32_t *gidret)
{
if (!wincap.has_security ())
@ -1387,7 +1387,7 @@ get_nt_attribute (const char *file, int *attribute,
int
get_file_attribute (int use_ntsec, const char *file,
int *attribute, __uid32_t *uidret, __gid32_t *gidret)
mode_t *attribute, __uid32_t *uidret, __gid32_t *gidret)
{
int res;
@ -1435,7 +1435,7 @@ get_file_attribute (int use_ntsec, const char *file,
static int
get_nt_object_attribute (HANDLE handle, SE_OBJECT_TYPE object_type,
int *attribute, __uid32_t *uidret, __gid32_t *gidret)
mode_t *attribute, __uid32_t *uidret, __gid32_t *gidret)
{
if (!wincap.has_security ())
return 0;
@ -1492,7 +1492,7 @@ get_nt_object_attribute (HANDLE handle, SE_OBJECT_TYPE object_type,
int
get_object_attribute (HANDLE handle, SE_OBJECT_TYPE object_type,
int *attribute, __uid32_t *uidret, __gid32_t *gidret)
mode_t *attribute, __uid32_t *uidret, __gid32_t *gidret)
{
if (allow_ntsec)
{