From 8b43d2722b227acbd875be69c41707cb6bff689c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 27 Jul 2001 09:17:57 +0000 Subject: [PATCH] * security.cc (get_user_primary_group): Fix compiler warning. (alloc_sd): Add DELETE permission for user when S_IWUSR is given. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/security.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 383ea038e..8a5c54f20 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Fri 27 Jul 2001 10:29:00 Corinna Vinschen + + * security.cc (get_user_primary_group): Fix compiler warning. + (alloc_sd): Add DELETE permission for user when S_IWUSR is given. + Thu Jul 26 16:43:39 2001 Pieter de Visser * thread.cc (__pthread_equal): Invert return value so that true is diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index b55582bd4..fbc6c8869 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -425,7 +425,7 @@ get_user_primary_group (WCHAR *wlogonserver, const char *user, WCHAR wuser[UNLEN + 1]; NET_API_STATUS ret; BOOL retval = FALSE; - UCHAR count; + UCHAR count = 0; if (usersid == well_known_system_sid) { @@ -1376,7 +1376,7 @@ alloc_sd (uid_t uid, gid_t gid, const char *logsrv, int attribute, if (attribute & S_IRUSR) owner_allow |= FILE_GENERIC_READ; if (attribute & S_IWUSR) - owner_allow |= FILE_GENERIC_WRITE; + owner_allow |= FILE_GENERIC_WRITE | DELETE; if (attribute & S_IXUSR) owner_allow |= FILE_GENERIC_EXECUTE; if ((attribute & (S_IFDIR | S_IWUSR | S_IXUSR))