docs: audit file server lock semaphore stubs

This commit is contained in:
Mario Fetka
2026-06-02 19:02:47 +00:00
parent 598b353535
commit 8f95e256b5
3 changed files with 116 additions and 0 deletions

19
AI.md
View File

@@ -954,3 +954,22 @@ Latest endpoint audit checkpoint from patch 0245:
and file-user provider state.
Next patch number should be `0246`.
Latest endpoint audit checkpoint from patch 0246:
- Continued the NDK-first File Server Environment pass with the newer NetWare
3.x/4.x monitor selectors `23/237` through `23/242` at wire `0xed` through
`0xf2`: physical record locks by connection/file, physical record locks by
file, logical records by connection, logical record information, connection
semaphores, and semaphore information.
- Each selector is documented as its own disabled `#if 0` `src/nwbind.c` case
with a case-local `Request:` and `Response:` summary, matching the post-0244
endpoint-audit formatting rule.
- These endpoints must not be implemented from approximations. They require
real byte-range lock state, namespace/data-stream mapping, logical-record
lock/log state, and semaphore open/value/wait provider state.
- The next NDK-first `23/xx` pass should skip unlisted gaps and continue with
the next documented NetWare 1.x/2.x/3.x selector or planned 4.x selector after
`23/242`.
Next patch number should be `0247`.

24
TODO.md
View File

@@ -1573,3 +1573,27 @@ Follow-up:
- Continue the NDK-first `23/xx` pass with the next small block, likely the
newer lock and semaphore monitor selectors `23/237` through `23/242`, keeping
one case and Request/Response comment per selector.
### File Server Environment lock/semaphore monitor stubs 23/237..242
Current status:
- Patch `0246` continues the NDK-first `23/xx` pass with the in-scope NetWare
3.x/4.x monitor selectors:
- `23/237` / wire `0xed` Get Physical Record Locks By Connection And File
- `23/238` / wire `0xee` Get Physical Record Locks By File
- `23/239` / wire `0xef` Get Logical Records By Connection
- `23/240` / wire `0xf0` Get Logical Record Information
- `23/241` / wire `0xf1` Get Connection's Semaphores
- `23/242` / wire `0xf2` Get Semaphore Information
- Each selector is represented as its own disabled `#if 0` case in
`src/nwbind.c` with adjacent Request/Response details.
- Future implementation requires real byte-range locks, data-stream/namespace
file identity, logical-record locks/logs, and semaphore provider state. Do
not synthesize replies from partial open-file or connection information.
Follow-up:
- Continue NDK-first with the next documented NetWare 1.x/2.x/3.x selector or
planned 4.x selector after `23/242`, skipping unlisted gaps and ignoring
5.x-only endpoints.

View File

@@ -3272,6 +3272,79 @@ static void handle_fxx(int gelen, int func)
*/
return(-1);
break;
case 0xed : /* SDK 23/237 / wire 0xed Get Physical Record Locks By Connection And File */
/*
* Request: SubFuncStrucLen=22, SubFunctionCode=237,
* TargetConnectionNumber, DataStreamNumber,
* VolumeNumber, DirectoryBase, LastRecordSeen.
* Response: NextRequestRecord, NumberOfLocks, then
* task/lock-type/record-start/record-end records for the
* connection's physical locks on the file.
* Requires real byte-range lock state plus namespace/data
* stream mapping; do not fake from open-file records alone.
*/
return(-1);
break;
case 0xee : /* SDK 23/238 / wire 0xee Get Physical Record Locks By File */
/*
* Request: SubFuncStrucLen=5+PathLen, SubFunctionCode=238,
* DataStreamNumber, VolumeNumber, DirectoryBase,
* LastRecordSeen.
* Response: NextRequestRecord, NumberOfLocks, then
* LoggedCount, ShareableLockCount, RecordStart, RecordEnd,
* LogicalConnectionNumber, TaskNumber, and LockType records.
* Requires real byte-range lock ownership and share/log
* counters for the requested file.
*/
return(-1);
break;
case 0xef : /* SDK 23/239 / wire 0xef Get Logical Records By Connection */
/*
* Request: SubFuncStrucLen=5, SubFunctionCode=239,
* TargetConnectionNumber, LastRecordSeen.
* Response: NextRequestRecord, NumberOfRecords, then
* TaskNumber, LockStatus, LockNameLen, and LockName records
* for logical records held/logged by the connection.
* Requires real logical-record lock/log state.
*/
return(-1);
break;
case 0xf0 : /* SDK 23/240 / wire 0xf0 Get Logical Record Information */
/*
* Request: SubFuncStrucLen=4+LogicalRecordNameLen,
* SubFunctionCode=240, LastRecordSeen,
* LogicalRecordNameLen, LogicalRecordName.
* Response: ShareableLockCount, UseCount, Locked,
* NextRequestRecord, NumberOfRecords, then
* ConnectionNumber, TaskNumber, and LockStatus records.
* Requires real logical-record ownership and wait state.
*/
return(-1);
break;
case 0xf1 : /* SDK 23/241 / wire 0xf1 Get Connection's Semaphores */
/*
* Request: SubFuncStrucLen=5, SubFunctionCode=241,
* ConnectionNumber, LastRecordSeen.
* Response: NextRequestRecord, NumberOfSemaphores, then
* OpenCount, SemaphoreValue, TaskNumber,
* SemaphoreNameLen, and SemaphoreName records.
* Requires real semaphore open/value/wait state.
*/
return(-1);
break;
case 0xf2 : /* SDK 23/242 / wire 0xf2 Get Semaphore Information */
/*
* Request: SubFuncStrucLen=4+SemaphoreNameLen,
* SubFunctionCode=242, LastRecordSeen,
* SemaphoreNameLen, SemaphoreName.
* Response: NextRequestRecord, OpenCount, SemaphoreValue,
* NumberOfRecords, then LogicalConnectionNumber and
* TaskNumber records for users of the semaphore.
* Requires real semaphore provider state; do not synthesize
* from connection presence.
*/
return(-1);
break;
case 0xfd : /* SDK 23/253 / wire 0xfd Send Console Broadcast */
/*
* Newer variant of SDK 23/209: StationList is long[] and