Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-07-27 13:17:57 +0400
committerCorinna Vinschen <corinna@vinschen.de>2001-07-27 13:17:57 +0400
commit8b43d2722b227acbd875be69c41707cb6bff689c (patch)
tree80f6da92abb1edf02fb81619536608c7d632c4a5 /winsup/cygwin/security.cc
parentf9f2c119858109e9d22ad8e762280690cebfdf1e (diff)
* security.cc (get_user_primary_group): Fix compiler warning.
(alloc_sd): Add DELETE permission for user when S_IWUSR is given.
Diffstat (limited to 'winsup/cygwin/security.cc')
-rw-r--r--winsup/cygwin/security.cc4
1 files changed, 2 insertions, 2 deletions
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))