* 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>
|
2008-05-22 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* path.cc (cygwin_conv_path): Define tp before setting up faul handler.
|
* path.cc (cygwin_conv_path): Define tp before setting up faul handler.
|
||||||
|
|
|
@ -154,8 +154,12 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp,
|
||||||
case USER:
|
case USER:
|
||||||
case DEF_USER:
|
case DEF_USER:
|
||||||
if (!(pw = internal_getpwuid (aclbufp[i].a_id))
|
if (!(pw = internal_getpwuid (aclbufp[i].a_id))
|
||||||
|| !sid.getfrompw (pw)
|
|| !sid.getfrompw (pw))
|
||||||
|| !add_access_allowed_ace (acl, ace_off++, allow,
|
{
|
||||||
|
set_errno (EINVAL);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (!add_access_allowed_ace (acl, ace_off++, allow,
|
||||||
sid, acl_len, inheritance))
|
sid, acl_len, inheritance))
|
||||||
return -1;
|
return -1;
|
||||||
break;
|
break;
|
||||||
|
@ -172,8 +176,12 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp,
|
||||||
case GROUP:
|
case GROUP:
|
||||||
case DEF_GROUP:
|
case DEF_GROUP:
|
||||||
if (!(gr = internal_getgrgid (aclbufp[i].a_id))
|
if (!(gr = internal_getgrgid (aclbufp[i].a_id))
|
||||||
|| !sid.getfromgr (gr)
|
|| !sid.getfromgr (gr))
|
||||||
|| !add_access_allowed_ace (acl, ace_off++, allow,
|
{
|
||||||
|
set_errno (EINVAL);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (!add_access_allowed_ace (acl, ace_off++, allow,
|
||||||
sid, acl_len, inheritance))
|
sid, acl_len, inheritance))
|
||||||
return -1;
|
return -1;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue