diff --git a/TODO.md b/TODO.md index 87702f7..cacdbe3 100644 --- a/TODO.md +++ b/TODO.md @@ -341,8 +341,8 @@ Current status: Follow-up: - Implement the NetWare AFP NCP calls locally, using libatalk helpers rather - than proxying requests to `afpd`. Create Directory, Create File, and AFP - Delete are now implemented through existing mars_nwe create/remove helpers + than proxying requests to `afpd`. Create Directory, Create File, AFP + Delete, and AFP Rename are now implemented through existing mars_nwe create/remove/rename helpers and covered by Linux smoke tests. - Candidate libatalk pieces include the new AppleDouble/Finder Info/resource fork helper wrappers, plus future CNID/directory-id helpers, attribute @@ -364,9 +364,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 and Create File and - ended with `failures=0`. FinderInfo plus the Finder Hidden/System/Archive - AFP attributes now have + also verified AFP Delete cleanup for Create Directory/Create File plus AFP + Rename for both directories and files, and 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 allocation and broader AFP metadata writes still need a deliberate write-safe @@ -478,36 +478,37 @@ Endpoint order: routed through the existing NetWare directory-create helper for temporary smoke paths. The Linux smoke suite creates both a legacy and AFP 2.0 directory under the tested parent and verifies the returned namespace-derived - Entry ID. Local cleanup is deliberately best-effort because the smoke suite - normally runs as an unprivileged Unix user while mars_nwe creates the DOS - namespace directory as the server-side identity; repeated runs therefore use - fresh short DOS-compatible leaf names instead of requiring local delete rights. + Entry ID. AFP Delete is now used for server-side cleanup so the suite no + longer relies on local Unix `rmdir` permissions. - Runtime status: the create-directory smoke has been verified with - `failures=0`. The run created `SYS:PUBLIC/afptst0` through legacy AFP - Create Directory (`0x01`) and `SYS:PUBLIC/afptst02` through AFP 2.0 Create + `failures=0`. The latest run created `SYS:PUBLIC/afptst2` through legacy AFP + Create Directory (`0x01`) and `SYS:PUBLIC/afptst22` through AFP 2.0 Create Directory (`0x0d`), with both probes returning and re-verifying Entry ID - `0x00000005`. The same run also confirmed that regular-file AFP Entry IDs - stay on the nwatalk/fallback path (`0x067a8d0f` for `PMDFLTS.INI`) while - directory scan/basehandle IDs continue to use the NetWare namespace mapping. + `0x00000005`, then removed both objects through AFP Delete. - AFP Create File (`0x02`) and AFP 2.0 Create File (`0x0e`) are now routed through the existing NetWare file-create path for temporary smoke files. The Linux smoke helper creates both legacy and AFP 2.0 files under the tested parent, verifies the returned AFP file ID with Entry ID From Path Name, and - keeps local cleanup best-effort because AFP Delete is still pending. -- Runtime status: the create-file smoke has been verified. The run created - `SYS:PUBLIC/atst0` through legacy AFP Create File (`0x02`) and - `SYS:PUBLIC/atst02` through AFP 2.0 Create File (`0x0e`); both returned - nwatalk/fallback AFP file IDs (`0x333bee1c` and `0x4e329102`) and were - re-verified with AFP Entry ID From Path Name. The same run ended with - `failures=2` only because earlier create-directory leftovers - (`AFPTST0`/`AFPTST02`) already existed and cannot be removed by the - unprivileged local test user until AFP Delete exists; the create-file probes - themselves completed successfully. -- Next implement AFP Delete (`0x03`) through the existing NetWare delete/erase - policy path so the smoke suite can clean up its own temporary directories and - files through the server instead of relying on local Unix removal. -- Then implement AFP Rename (`0x07`) through the existing NetWare rename/move - path, preserving FinderInfo/xattrs and checking Entry ID behavior. + removes them through AFP Delete. +- Runtime status: the create-file smoke has been verified with AFP Delete + cleanup. The latest run created `SYS:PUBLIC/atst2` through legacy AFP Create + File (`0x02`) and `SYS:PUBLIC/atst22` through AFP 2.0 Create File (`0x0e`); + both returned nwatalk/fallback AFP file IDs (`0x53c18b6e` and `0x755cda24`), + were re-verified with AFP Entry ID From Path Name, and were removed through + AFP Delete. +- AFP Delete (`0x03`) is implemented through the existing NetWare delete/erase + policy path. It is used by the smoke suite for pre-test cleanup and + post-test cleanup of Create Directory, Create File, and Rename paths. +- AFP Rename (`0x07`) is implemented through the existing NetWare rename/move + paths. Directory rename uses the directory-aware move helper, while file + rename uses the NetWare file move path with file-only search attributes so + regular files are not filtered out by the directory attribute bit. +- Runtime status: the rename smoke has been verified with `failures=0`. The + run created and renamed `SYS:PUBLIC/d22240` to `SYS:PUBLIC/d22240r`, preserving the + namespace-derived directory Entry ID `0x00000005`; it also created and + renamed `SYS:PUBLIC/m22248` to `SYS:PUBLIC/m22248r`, preserving the + nwatalk/fallback AFP file Entry ID `0x78da3728`. Both renamed objects were + cleaned up through AFP Delete. - Keep Get Macintosh Info On Deleted File (`0x13`) for last. ## Deferred / optional protocol work diff --git a/tests/linux/README.md b/tests/linux/README.md index bfbdec0..36369ce 100644 --- a/tests/linux/README.md +++ b/tests/linux/README.md @@ -286,6 +286,38 @@ variants. The verified run deleted stale `afptst0`, `afptst02`, `atst0`, and `atst02` paths, recreated the directory and file pairs, deleted all four created objects again through AFP Delete, and ended with `failures=0`. + +## AFP Rename smoke test + +`afp_rename_smoke` sends the WebSDK/nwafp.h AFP Rename request through +libncp: + +```text +NCP 0x2222/35/07 AFP Rename +``` + +The helper derives the source and destination parent Entry IDs with AFP Entry +ID From Path Name, sends leaf names to AFP Rename, and verifies that the source +path disappears while the destination path resolves to the expected Entry ID. +Directory renames use the existing mars_nwe directory-aware move path. File +renames use the existing NetWare file move path with file-only search +attributes, so regular files are not filtered out by the directory search bit. + +Example: + +```sh +./tests/linux/afp_rename_smoke -S MARS -U SUPERVISOR -P secret \ + SYS:PUBLIC/oldname SYS:PUBLIC/newname +``` + +Runtime status: the smoke suite now covers AFP Rename for both directories and +regular files. The verified run created and renamed `SYS:PUBLIC/d22240` to +`SYS:PUBLIC/d22240r`, preserving the namespace-derived directory Entry ID +`0x00000005`. It also created and renamed `SYS:PUBLIC/m22248` to +`SYS:PUBLIC/m22248r`, preserving the nwatalk/fallback AFP file Entry ID +`0x78da3728`. Both renamed objects were removed through AFP Delete, and the +full suite ended with `failures=0`. + ## AFP Entry ID smoke test `afp_entry_id_smoke` sends the WebSDK-documented NetWare AFP request: