diff --git a/TODO.md b/TODO.md index cacdbe3..0c54d30 100644 --- a/TODO.md +++ b/TODO.md @@ -275,46 +275,25 @@ Current status: `rights=0xff`. Entry-ID-only allocation remains TODO until persistent CNID/base-ID lookup exists. - `AFP Set File Information` (`0x09`) and `AFP 2.0 Set File Information` - (`0x10`) are implemented only for path-backed file metadata smoke writes: - the FinderInfo bitmap (`0x0020`) and the AFP - Attributes bitmap (`0x0001`) restricted to AFP Hidden, System, and - Archive. Archive is mapped to the existing NetWare `FILE_ATTR_A` attribute - path, while Hidden and System remain mars_nwe AFP metadata xattr bits. Linux - smoke coverage exists in `tests/linux/afp_set_file_info_smoke`; runtime - FinderInfo coverage is green for `SYS:PUBLIC/pmdflts.ini` with Finder type - `TEXT` and creator `MARS`. The helper writes 32 bytes of FinderInfo to - `org.mars-nwe.afp.finder-info`, stores AFP-only Hidden/System bits in - `org.mars-nwe.afp.attributes`, maps Archive through the existing NetWare - attribute store, and verifies the result through AFP 2.0 Get File Information. The smoke-suite report helper now includes AFP 2.0 FinderInfo, legacy AFP `0x09` FinderInfo, AFP 2.0 Hidden/System/Archive set/clear probes, - and legacy AFP `0x09` Invisible set/clear probes, and has green - `failures=0` runs for `SYS:PUBLIC/pmdflts.ini`; the latest run was from the - build-tree copy of `afp_smoke_suite.sh` after the CMake sync fix and confirms - legacy `0x09` FinderInfo plus legacy `0x09` Invisible set/clear in the same - report as AFP 2.0 `0x10`. It confirms the corrected FinderInfo payload - alignment by reading - `user.org.mars-nwe.afp.finder-info=0x544558544d415253...` (`TEXTMARS` with no - leading padding byte), confirms attribute set/clear via the versioned - attributes xattr ending clean when AFP-only bits are present. Current - Entry IDs are derived from the mars_nwe NetWare namespace/basehandle path and - only cached in `org.mars-nwe.afp.entry-id` as AFP compatibility metadata when - that write is permitted; an xattr cache write failure is non-fatal because - the namespace handle remains the source of truth. - System remains on the narrow AFP xattr-only attribute path, while Archive is - routed through the existing NetWare attribute path; runtime probes verified - System set/clear and Archive set/clear with AFP-visible attrs `0x0004`, - `0x0000`, and `0x0040`, with server diagnostics showing the matching WebSDK - SETCLR forms `0x8004`, `0x0004`, `0x8040`, and `0x0040`. A post-fix - full-suite run against the rebuilt server completed with `failures=0` and the - final `user.org.mars-nwe.afp.attributes=0x01000000`, confirming that Archive - is no longer duplicated in the AFP metadata xattr after Clear Archive. The smoke - helper verifies the targeted attribute bit by mask instead of comparing the - full AFP attribute word, because other stored metadata bits such as System may legitimately remain set while - another bit is being tested, and Archive may be supplied by the NetWare - attribute store. The earlier - smoke-helper `--backup` spelling is only kept as an alias; new docs and the - suite use Archive to avoid confusing this AFP attribute with the separate - backup date/time fields. All other Set File Information bits and AFP attribute bits remain - rejected until their write/enforcement semantics are explicitly designed. + (`0x10`) now require the fixed WebSDK/NWAFP request layouts for path-backed + file metadata smoke writes. The legacy request uses `path_len` at offset 54; + the AFP 2.0 request uses ProDOSInfo at offsets 54..59 and `path_len` at + offset 60. The compact mars_nwe-only smoke packet layout has been removed. + The covered bitmaps are FinderInfo (`0x4000`), Attributes (`0x0100`), Access + Date/Time (`0x0400`), Create Date/Time (`0x0800`), Modify Date/Time + (`0x1000`), and Backup Date/Time (`0x2000`). FinderInfo is stored in + `org.mars-nwe.afp.finder-info`; AFP-only Hidden/System metadata is stored in + `org.mars-nwe.afp.attributes`; Archive is mapped to the existing NetWare + `FILE_ATTR_A` attribute path; Create and Backup Date/Time use the existing + mars_nwe NetWare metadata helpers; Access Date/Time uses the normal file + `atime` path; and Modify Date/Time uses the shared timestamp helper. Linux + smoke coverage exists in `tests/linux/afp_set_file_info_smoke`, which now + always reports `layout=websdk` and verifies the result through AFP 2.0 Get + File Information. Runtime status: the WebSDK-layout-only smoke run for + `SYS:PUBLIC/pmdflts.ini` completed with `failures=0`, including legacy `0x09` + and AFP 2.0 `0x10` FinderInfo, Hidden/System/Archive set/clear, + Access/Create/Modify/Backup timestamp probes, and the NOPASSUSER Modify-rights + negative probes. - The AFP dispatcher now decodes the WebSDK/NWAFP subfunction number in diagnostics so real client probes can be mapped to the corresponding AFP call before implementation work starts. @@ -364,8 +343,9 @@ Follow-up: remains directory iteration based: `last_seen` skips past the previously returned object, but the next returned Entry ID is not required to be numerically greater than the continuation token. The latest full smoke run - also verified AFP Delete cleanup for Create Directory/Create File plus AFP - Rename for both directories and files, and ended with `failures=0`. + also verified AFP Delete cleanup for Create Directory/Create File, AFP Rename + for both directories and files, and WebSDK-layout-only Set File Information + for FinderInfo, attributes, and timestamps; it ended with `failures=0`. FinderInfo plus the Finder Hidden/System/Archive AFP attributes now have deliberately narrow write paths through AFP Set File Information `0x09` and AFP 2.0 Set File Information `0x10`; CNID @@ -591,6 +571,28 @@ bitmap `0x0800`, both for epoch `1700000000` with the returned AFP date Access Date/Time remained on the normal file `atime` path and did not create an AFP metadata xattr. + +### AFP Set File Information WebSDK layout convergence + +AFP Set File Information now requires the fixed WebSDK/NWAFP packet layouts for +both legacy `0x09` and AFP 2.0 `0x10`. The earlier compact mars_nwe smoke +layout was removed because it was not wire-compatible. Legacy requests carry +Attributes at offset 8, Create Date at 10, Access Date at 12, Modify Date/Time +at 14/16, Backup Date/Time at 18/20, FinderInfo at 22, and `path_len` at 54. +AFP 2.0 requests use the same fixed metadata fields, include ProDOSInfo at +54..59, and carry `path_len` at 60. + +Runtime status: the WebSDK-layout-only Set File Information smoke run is +verified with `failures=0`. The suite reported `layout=websdk` for both AFP +2.0 `0x10` and legacy `0x09` FinderInfo writes, Hidden set/clear, System +set/clear, Archive set/clear, and Access/Create/Modify/Backup timestamp probes +against `SYS:PUBLIC/pmdflts.ini`. The verified run used AFP Entry ID +`0x42ede1c8`, kept FinderInfo as `TEXTMARS`, confirmed the final AFP-only +attributes xattr may be absent when no AFP-only bits remain set, and confirmed +NetWare file-info/archive metadata through the existing +`user.org.mars-nwe.netware.fileinfo` and `user.org.mars-nwe.netware.archive` +xattrs. + AFP Get/Scan AccessPrivileges convergence: - AFP Get File Information and AFP Scan File Information now use the same diff --git a/tests/linux/README.md b/tests/linux/README.md index 36369ce..7b73ac1 100644 --- a/tests/linux/README.md +++ b/tests/linux/README.md @@ -723,16 +723,23 @@ NCP 0x2222/35/09 AFP Set File Information NCP 0x2222/35/16 AFP 2.0 Set File Information ``` -The helper exercises two deliberately narrow write-safe AFP metadata subsets: -the file FinderInfo bitmap (`0x0020`), the file Attributes bitmap (`0x0001`) -restricted to metadata-only file flags: AFP Hidden, System, and Archive, -and the file modification timestamp bitmap (`0x0010`). It sends path-backed -raw `VOL:`-style requests, writes the 32-byte FinderInfo block to mars_nwe's -private `org.mars-nwe.afp.finder-info` metadata key, writes the narrow AFP -attribute word to `org.mars-nwe.afp.attributes`, routes modification timestamp -writes through the existing NetWare timestamp helper, and immediately verifies -the updates through AFP 2.0 Get File Information. On Linux the source-level `org.mars-nwe.afp.*` name is stored via the -portable `user.` xattr namespace by mars_nwe's local xattr wrapper, the same +The helper now always sends the fixed WebSDK/NWAFP Set File Information packet +layout; the earlier compact smoke-test layout is intentionally gone. Legacy +`0x09` requests put `path_len` at offset 54. AFP 2.0 `0x10` requests include +ProDOSInfo at offsets 54..59 and put `path_len` at offset 60. The smoke covers +the deliberately narrow write-safe metadata subsets currently implemented by +mars_nwe: FinderInfo (`0x4000`), Attributes (`0x0100`) for Hidden/System/Archive, +Access Date/Time (`0x0400`), Create Date/Time (`0x0800`), Modify Date/Time +(`0x1000`), and Backup Date/Time (`0x2000`). It sends path-backed raw +`VOL:`-style requests, writes the 32-byte FinderInfo block to mars_nwe's private +`org.mars-nwe.afp.finder-info` metadata key, writes AFP-only Hidden/System bits +to `org.mars-nwe.afp.attributes`, maps Archive through the existing NetWare +attribute store, routes Create and Backup Date/Time through the existing +mars_nwe NetWare metadata helpers, routes Access through the normal file +`atime` path, routes modification timestamp writes through the existing NetWare +timestamp helper, and immediately verifies the updates through AFP 2.0 Get File +Information. On Linux the source-level `org.mars-nwe.afp.*` name is stored via +the portable `user.` xattr namespace by mars_nwe's local xattr wrapper, the same pattern Netatalk uses for its `org.netatalk.*` metadata names. Example: @@ -756,19 +763,21 @@ subfunction: SYS:PUBLIC/pmdflts.ini ``` -Verified runtime output: +Verified runtime output from the WebSDK-layout-only smoke run: ```text -AFP Set File Info subfunction=0x10 path=SYS:PUBLIC/pmdflts.ini bitmap=0x4000 attrs=0x2000 create=0x5cbe access=0x5cbe modify=0x5cbea1ee backup=0x00000000 finder_type=TEXT finder_creator=MARS entry_id=0x00000004 verified +AFP Set File Info subfunction=0x10 layout=websdk path=SYS:PUBLIC/pmdflts.ini bitmap=0x4000 attrs=0x2000 create=0x5cbe access=0x5cbe modify=0x5cbeb52a backup=0x00000000 finder_type=TEXT finder_creator=MARS entry_id=0x42ede1c8 verified +AFP Set File Info subfunction=0x09 layout=websdk path=SYS:PUBLIC/pmdflts.ini bitmap=0x4000 attrs=0x2000 create=0x5cbe access=0x5cbe modify=0x5cbeb52a backup=0x00000000 finder_type=TEXT finder_creator=MARS entry_id=0x42ede1c8 verified ``` Server diagnostics show the effective resolved volume, the request volume byte, -the FinderInfo bitmap, and follow-up Get File Information verification with the -same namespace-derived Entry ID: +the WebSDK layout, the FinderInfo bitmap, and follow-up Get File Information +verification with the same AFP file Entry ID: ```text -AFP 2.0 Set File Information: vol=0 request_vol=0 entry=0x00000000 mask=0x4000 path='SYS:PUBLIC/pmdflts.ini' ... -AFP 2.0 Get File Information: vol=0 entry=0x00000000 mask=0xffff path='SYS:PUBLIC/pmdflts.ini' reply_entry=0x00000004 +AFP 2.0 Set File Information: vol=0 request_vol=0 entry=0x00000000 mask=0x4000 path='SYS:PUBLIC/pmdflts.ini' layout=websdk finder_info attrs=0x0000 atime=-1 mtime=-1 +AFP Set File Information: vol=0 request_vol=0 entry=0x00000000 mask=0x4000 path='SYS:PUBLIC/pmdflts.ini' layout=websdk finder_info attrs=0x0000 atime=-1 mtime=-1 +AFP 2.0 Get File Information: vol=0 entry=0x00000000 mask=0xffff path='SYS:PUBLIC/pmdflts.ini' reply_entry=0x42ede1c8 ``` Linux xattr checks for the FinderInfo and cached Entry ID look like this: @@ -825,6 +834,14 @@ For System the AFP metadata xattr stores `0x01000004`. Archive is verified through AFP Get File Information after updating the NetWare attribute store; it no longer lives in `user.org.mars-nwe.afp.attributes`. Use `--clear-system` and `--clear-archive` to remove those bits. + + +Runtime status: the latest full AFP smoke suite verified that every Set File +Information probe uses `layout=websdk` and that the compact mars_nwe-only packet +shape is no longer accepted by the helper. The verified run covered AFP 2.0 +and legacy FinderInfo, Hidden set/clear, System set/clear, Archive set/clear, +Access Date/Time, Create Date/Time, Modify Date/Time, Backup Date/Time, and the +NOPASSUSER Modify-rights negative probes, then ended with `failures=0`. The older helper spellings `--backup` and `--clear-backup` remain accepted as compatibility aliases, but the suite and documentation use Archive because this bit is the AFP file attribute, not the separate AFP backup date/time field.