* sec_acl.cc (setacl): Set errno to EINVAL if user or group don't exist.
This commit is contained in:
parent
b72918135c
commit
c1410a8d1e
@ -1,3 +1,7 @@
|
||||
2008-05-22 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* sec_acl.cc (setacl): Set errno to EINVAL if user or group don't exist.
|
||||
|
||||
2008-05-22 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* path.cc (cygwin_conv_path): Define tp before setting up faul handler.
|
||||
|
@ -154,9 +154,13 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp,
|
||||
case USER:
|
||||
case DEF_USER:
|
||||
if (!(pw = internal_getpwuid (aclbufp[i].a_id))
|
||||
|| !sid.getfrompw (pw)
|
||||
|| !add_access_allowed_ace (acl, ace_off++, allow,
|
||||
sid, acl_len, inheritance))
|
||||
|| !sid.getfrompw (pw))
|
||||
{
|
||||
set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
if (!add_access_allowed_ace (acl, ace_off++, allow,
|
||||
sid, acl_len, inheritance))
|
||||
return -1;
|
||||
break;
|
||||
case GROUP_OBJ:
|
||||
@ -172,9 +176,13 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp,
|
||||
case GROUP:
|
||||
case DEF_GROUP:
|
||||
if (!(gr = internal_getgrgid (aclbufp[i].a_id))
|
||||
|| !sid.getfromgr (gr)
|
||||
|| !add_access_allowed_ace (acl, ace_off++, allow,
|
||||
sid, acl_len, inheritance))
|
||||
|| !sid.getfromgr (gr))
|
||||
{
|
||||
set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
if (!add_access_allowed_ace (acl, ace_off++, allow,
|
||||
sid, acl_len, inheritance))
|
||||
return -1;
|
||||
break;
|
||||
case OTHER_OBJ:
|
||||
|
Loading…
x
Reference in New Issue
Block a user