ea: fail non-cygwin EAs without named attr support
if non-cygwin EAs are given to Create, SetEaInfo, or QueryEaInfo and the server does not support named attributes, fail with STATUS_EAS_NOT_SUPPORTED. also adds access checks for FILE_READ_EA and FILE_WRITE_EA Create will accept all 3 cygwin EAs: NfsV3Attributes, NfsActOnLink, and NfsSymlinkTargetName. it now handles NfsActOnLink by adding FILE_OPEN_REPARSE_POINT to the create options SetEaInfo will only accept NfsV3Attributes for setting the file mode. the other two will fail with STATUS_INVALID_PARAMETER. removed handling of NfsActOnLink in setattr.c QueryEaInfo will accept all 3 cygwin EAs Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
b3229d20f6
commit
c837631750
2 changed files with 82 additions and 22 deletions
|
|
@ -558,10 +558,8 @@ static int handle_setexattr(nfs41_upcall *upcall)
|
|||
|
||||
nfs41_open_stateid_arg(state, &stateid);
|
||||
|
||||
if ((strncmp("NfsV3Attributes", eainfo->EaName, eainfo->EaNameLength) == 0 &&
|
||||
strlen("NfsV3Attributes") == eainfo->EaNameLength) ||
|
||||
(strncmp("NfsActOnLink", eainfo->EaName, eainfo->EaNameLength)== 0 &&
|
||||
strlen("NfsActOnLink") == eainfo->EaNameLength)) {
|
||||
if (strncmp("NfsV3Attributes", eainfo->EaName, eainfo->EaNameLength) == 0
|
||||
&& sizeof("NfsV3Attributes")-1 == eainfo->EaNameLength) {
|
||||
info.mode = args->mode;
|
||||
info.attrmask.arr[1] |= FATTR4_WORD1_MODE;
|
||||
info.attrmask.count = 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue