* security.cc (get_user_primary_group): Fix compiler warning.

(alloc_sd): Add DELETE permission for user when S_IWUSR is given.
This commit is contained in:
Corinna Vinschen 2001-07-27 09:17:57 +00:00
parent f9f2c11985
commit 8b43d2722b
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Fri 27 Jul 2001 10:29:00 Corinna Vinschen <corinna@vinschen.de>
* 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 <pieterdv@knoware.nl> Thu Jul 26 16:43:39 2001 Pieter de Visser <pieterdv@knoware.nl>
* thread.cc (__pthread_equal): Invert return value so that true is * thread.cc (__pthread_equal): Invert return value so that true is

View File

@ -425,7 +425,7 @@ get_user_primary_group (WCHAR *wlogonserver, const char *user,
WCHAR wuser[UNLEN + 1]; WCHAR wuser[UNLEN + 1];
NET_API_STATUS ret; NET_API_STATUS ret;
BOOL retval = FALSE; BOOL retval = FALSE;
UCHAR count; UCHAR count = 0;
if (usersid == well_known_system_sid) 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) if (attribute & S_IRUSR)
owner_allow |= FILE_GENERIC_READ; owner_allow |= FILE_GENERIC_READ;
if (attribute & S_IWUSR) if (attribute & S_IWUSR)
owner_allow |= FILE_GENERIC_WRITE; owner_allow |= FILE_GENERIC_WRITE | DELETE;
if (attribute & S_IXUSR) if (attribute & S_IXUSR)
owner_allow |= FILE_GENERIC_EXECUTE; owner_allow |= FILE_GENERIC_EXECUTE;
if ((attribute & (S_IFDIR | S_IWUSR | S_IXUSR)) if ((attribute & (S_IFDIR | S_IWUSR | S_IXUSR))