docs: audit extended attribute endpoints
This commit is contained in:
@@ -3732,7 +3732,13 @@ int handle_func_0x56(uint8 *p, uint8 *responsedata, int task)
|
||||
switch (ufunc) {
|
||||
|
||||
#if 1
|
||||
case 0x01 : /* close extended attribute handle */
|
||||
case 0x01 : /* SDK 86/01 Close Extended Attribute Handle.
|
||||
* Coverage: present as a compatibility shim.
|
||||
* Request: reserved word (Lo-Hi), EAHandle long (Lo-Hi).
|
||||
* Reply: no payload, normal Completion response.
|
||||
* Difference: current code does not maintain an EA handle
|
||||
* table; it ignores the handle and returns success.
|
||||
*/
|
||||
{
|
||||
/*
|
||||
uint32 ea_handle=GET_BE32(p+2);
|
||||
@@ -3741,13 +3747,32 @@ int handle_func_0x56(uint8 *p, uint8 *responsedata, int task)
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x02 : /* write extended attribute handle */
|
||||
case 0x02 : /* SDK 86/02 Write Extended Attribute.
|
||||
* Coverage: present as a compatibility shim.
|
||||
* Request: Flags word (Lo-Hi), EAHandleStruct, total write
|
||||
* size, write position, access flag, value/key lengths,
|
||||
* key bytes, then value bytes.
|
||||
* Reply per NDK: ErrorCode, BytesWritten, NewEAHandle.
|
||||
* Difference: current code accepts the call with no reply
|
||||
* payload and does not persist EA data.
|
||||
*/
|
||||
{
|
||||
result=0; /* dummy */
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x03 : /* read extended attribute */
|
||||
case 0x03 : /* SDK 86/03 Read Extended Attribute.
|
||||
* Coverage: present as a compatibility shim.
|
||||
* Request: Flags word (Lo-Hi), EAHandleStruct, ReadPosition,
|
||||
* InspectSize, KeyLength, Key. Flags select whether the
|
||||
* handle struct identifies a volume/base handle or an EA
|
||||
* handle plus base handle.
|
||||
* Reply: ErrorCode, total value length, NewEAHandle, access,
|
||||
* ValueLength, Value.
|
||||
* Compatibility: current code returns ErrorCode 0xc9
|
||||
* (ERR_EA_NOT_FOUND) in the reply body, with zero lengths,
|
||||
* rather than implementing EA storage.
|
||||
*/
|
||||
{
|
||||
#if 0
|
||||
int flags = GET_16(p); /* LOW-HIGH */
|
||||
@@ -3775,7 +3800,16 @@ int handle_func_0x56(uint8 *p, uint8 *responsedata, int task)
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x04 : /* enumerate extended attributes */
|
||||
case 0x04 : /* SDK 86/04 Enumerate Extended Attribute.
|
||||
* Coverage: present as a compatibility shim.
|
||||
* Request: Flags word (Lo-Hi), EAHandleStruct, InspectSize,
|
||||
* EnumerateSequence, KeyLength, Key. The information
|
||||
* level is encoded in Flags bits 6..4.
|
||||
* Reply: level-dependent body beginning with ErrorCode,
|
||||
* total EA counts/sizes and NewEAHandle.
|
||||
* Difference: current code returns an all-zero fixed-size
|
||||
* body and no enumerated EA structures.
|
||||
*/
|
||||
{
|
||||
struct OUTPUT {
|
||||
uint8 dontknow1[16]; /* all zero */
|
||||
@@ -3787,7 +3821,15 @@ int handle_func_0x56(uint8 *p, uint8 *responsedata, int task)
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x05 : /* duplicate extended attributes */
|
||||
case 0x05 : /* SDK 86/05 Duplicate Extended Attributes.
|
||||
* Coverage: source case is present, but unimplemented.
|
||||
* Request: SrcFlags, DstFlags, SrcEAHandleStruct,
|
||||
* DstEAHandleStruct.
|
||||
* Reply per NDK: DuplicateCount, DataSizeDuplicated,
|
||||
* KeySizeDuplicated.
|
||||
* Current behavior: falls through with result still -0xfb,
|
||||
* so nwconn returns unknown request.
|
||||
*/
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
||||
13
src/nwconn.c
13
src/nwconn.c
@@ -6659,7 +6659,18 @@ static int handle_ncp_serv(void)
|
||||
break;
|
||||
|
||||
#if WITH_NAME_SPACE_CALLS
|
||||
case 0x56 : /* some extended atrribute calls */
|
||||
case 0x56 : /* SDK 86 Extended Attribute group / wire 0x56.
|
||||
* Coverage: forwarded to handle_func_0x56() in namspace.c.
|
||||
* Request handoff: nwconn strips the NCP header and passes
|
||||
* requestdata starting at SubFunction byte; the EA handler
|
||||
* then dispatches SDK 86/01 through 86/05.
|
||||
* Reply handoff: handler returns a non-negative payload
|
||||
* length for responsedata, or a negative completion code.
|
||||
* Source outcome: no missing through-3.x EA subfunctions
|
||||
* found in the NDK/Core-Protocols EA table; SDK 86/01..05
|
||||
* are all present below, though most are compatibility
|
||||
* shims rather than full EA storage.
|
||||
*/
|
||||
{
|
||||
int result = handle_func_0x56(requestdata, responsedata, ncprequest->task);
|
||||
if (result > -1) data_len = result;
|
||||
|
||||
Reference in New Issue
Block a user