[symlink] fixing getea for symlinktargetname on regular file
cygwin does geteas for regular files and asks for nfssymlinktargetname for which we were doing an upcall and failing nfs41_readlink() with err_invalid. instead check that it's not a symlink in the driver and reply as we used to with 0 eavaluelenth
This commit is contained in:
parent
192a502785
commit
54551655d0
1 changed files with 22 additions and 2 deletions
|
|
@ -4746,8 +4746,28 @@ static NTSTATUS QueryCygwinEA(
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (AnsiStrEq(&NfsSymlinkTargetName, query->EaName, query->EaNameLength)) {
|
if (AnsiStrEq(&NfsSymlinkTargetName, query->EaName, query->EaNameLength)) {
|
||||||
status = QueryCygwinSymlink(RxContext, query, info);
|
__notnull PNFS41_FCB nfs41_fcb = NFS41GetFcbExtension(RxContext->pFcb);
|
||||||
goto out;
|
if (nfs41_fcb->BasicInfo.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
|
||||||
|
status = QueryCygwinSymlink(RxContext, query, info);
|
||||||
|
goto out;
|
||||||
|
} else {
|
||||||
|
const LONG LengthRequired = sizeof(FILE_FULL_EA_INFORMATION) +
|
||||||
|
NfsSymlinkTargetName.Length - sizeof(CHAR);
|
||||||
|
if (LengthRequired > RxContext->Info.LengthRemaining) {
|
||||||
|
status = STATUS_BUFFER_TOO_SMALL;
|
||||||
|
RxContext->InformationToReturn = LengthRequired;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
info->NextEntryOffset = 0;
|
||||||
|
info->Flags = 0;
|
||||||
|
info->EaValueLength = 0;
|
||||||
|
info->EaNameLength = (UCHAR)NfsActOnLink.Length;
|
||||||
|
RtlCopyMemory(info->EaName, NfsSymlinkTargetName.Buffer,
|
||||||
|
NfsSymlinkTargetName.Length);
|
||||||
|
RxContext->Info.LengthRemaining = LengthRequired;
|
||||||
|
status = STATUS_SUCCESS;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AnsiStrEq(&NfsV3Attributes, query->EaName, query->EaNameLength)) {
|
if (AnsiStrEq(&NfsV3Attributes, query->EaName, query->EaNameLength)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue