Files
mars-nwe/TODO.md
Mario Fetka via ChatGPT 0027576f66
All checks were successful
Source release / source-package (push) Successful in 1m32s
docs: clarify compression stream layout and recycle payloads
2026-06-12 23:25:54 +02:00

14 KiB

TODO

This file is the project backlog, not a changelog. Keep patch chronology and handoff details in AI.md. Keep broad architecture prose in REDESIGN.md. This file should answer: what remains to be done, why it matters, and where the work belongs.

Implementation dashboard

Area Priority Status Notes
DOS namespace compatibility P0 Active next Legal names, wildcard semantics, case folding, reserved names and stable 8.3 aliases.
Salvage metadata / backup-tool compatibility P0 Planned next Keep .recycle payloads; make netware.metadata authoritative for deleted entries; deprecate .salvage JSON.
NetWare 3.x NCP endpoint completion P1 Active audit + implementation ENDPOINTS.md is the detailed decimal/hex audit table; keep this TODO as the short implementation queue.
NetWare 4.x endpoint compatibility P2 Partial / guarded ENDPOINTS.md tracks active compatibility vs guarded 4.x selectors.
Admin, queues, printing and TTS P2 Ongoing Console-operator model, queue path case handling, print/TTS compatibility cleanup.
Test infrastructure P1 Ongoing CTest where offline, live all-smokes where server/client state is required, DOS tool smokes.
Shared library layering P2 Planned cleanup Move reusable metadata/salvage/stream/compression helpers into libnwcore/libnwfs without importing whole NSS runtime subsystems.
Quota architecture Done Stabilized All-quota live smoke and DOS quota smoke cover QUOTA and SYS backends.

NetWare 3.x endpoint implementation queue

Default runtime work should finish documented NetWare 1.x/2.x/3.x behaviour first. The rows below are grouped by feature area, not by patch sequence. Status meanings: done = implemented and tested enough to leave the active queue; partial = useful code exists but layout/edge cases/tests remain; open = known implementation work remains; later = document or guard until a client/test requires it.

Family / endpoint area Generation Status Next work
Bindery/property relations, including NCP 17/4C List Relations of an Object 2.x/3.x open Add direct tests for group membership, GROUPS_I'M_IN, and relation-listing edge cases.
Message/bindery forwarded groups from nwconn to nwbind 2.x/3.x partial Keep dispatcher comments paired with parser layouts; verify forward-vs-incomplete paths.
Old direct file/logical/physical synchronization and lock calls 0x2222/01 through 0x2222/0e 1.x/2.x legacy partial Preserve old-client behaviour where DOS clients still exercise these calls; add minimal direct probes.
Broadcast/message compatibility around 0x2222/12 through 0x2222/15 1.x/2.x legacy partial Recheck observable DOS utility behaviour before changing parser logic.
Directory Services group 0x2222/22 namespace/directory selectors through the 3.x range 3.x partial Complete request/reply comments and tests for namespace, search-map and directory-handle edge cases.
Directory quota calls decimal 22/35, 22/36 (wire/code 0x23, 0x24) 3.x done Stable; keep regression tests only.
Directory quota scan decimal 22/40 (wire/code 0x28) 3.x partial Sequence byte order is handled; enrich scan reply semantics after related resource-fork/namespace fields are understood.
Salvage scan/recover/purge bridges, including old 22/27, 22/28, 22/29 style views 3.x partial Align NCP replies, JSON sidecars and NSS-shaped deleted metadata from one snapshot builder.
File Server Environment group 0x2222/23 usage/volume/LAN/server-status selectors 3.x partial Add selector-specific tests for monitor tools and ensure dummy/no-op replies are explicitly documented.
File Server Environment open-file, lock/semaphore monitor and console-control selectors 3.x open Decide exact compatibility replies for old admin tools; add direct tests where DOS tools do not trigger paths.
Semaphore groups, including forwarded selector families and direct old-style calls 2.x/3.x partial Separate implemented forwards from incomplete direct calls; add lock/semaphore probes.
Extended Attribute group 0x2222/86 3.x partial Keep work tied to backup/metadata compatibility and existing xattr roundtrip tests.
Name Space groups 0x2222/87 and 0x2222/89, DOS namespace selectors 3.x open Make DOS namespace rules match old clients before broad LONG/OS2 expansion.
Name Space groups 0x2222/87 and 0x2222/89, LONG/OS2 metadata/search selectors 3.x partial Implement only the pieces required by existing clients and 3.x filesystem semantics.
AFP/Mac selector families where they touch existing metadata storage 3.x adjacent partial Keep behind the AFP backend boundary; do not block DOS namespace or salvage metadata work.
Queue, print and TTS compatibility selectors 3.x partial Fix queue path case handling and keep TTS limited to documented client needs.

NetWare 4.x endpoint status queue

NetWare 4.x work is not a separate future-only bucket: some compatibility calls are already present. The rule is that new broad 4.x runtime behaviour must be explicitly chosen or guarded, while already useful compatibility implementations may remain active.

Family / endpoint area Status Policy / next work
0x2222/22/50 Get Object Effective Rights for Directory Entry partial / implemented compatibility Keep active compatibility code; verify layout and rights semantics against clients and direct tests.
0x2222/22/51 Get Extended Volume Information partial / implemented compatibility Keep active compatibility code; verify volume fields and ensure 3.x clients are not regressed.
Other Directory Services 4.x high selectors later / guarded Document exact request/reply layout before enabling default runtime behaviour.
Additional File Server Environment 4.x monitor/admin selectors later / guarded Implement only when a concrete admin tool or compatibility test requires it.
NDS/NCP Fragger and related 4.x infrastructure later / guarded Keep out of default runtime until transport/client scope is explicit.
TimeSync and NCP Extension families later / guarded Reference/stub only unless a real 3.x/4.x client path requires them.
Migration, compression, data migration and later OES/MOAB-style selectors reference-only Study reusable data models only; do not add default live endpoints during the 3.x push.

Active backlog by work area

1. Filesystem and namespace compatibility

Goal: finish NetWare 1.x/2.x/3.x filesystem behaviour before broad new runtime work.

  • Adapt DOS namespace behaviour from the NSS/reference model:
    • legal-name checks;
    • case folding;
    • wildcard matching;
    • reserved names;
    • stable 8.3 alias generation;
    • host-path conflict handling on case-sensitive filesystems.
  • After DOS namespace behaviour is stable, adapt LONG/OS2 namespace behaviour required by 3.x clients and existing MARS-NWE paths.
  • Keep trustee/effective-rights, data-stream, extended-attribute, object-id, search-map and salvage work scoped to what supports the 1.x/2.x/3.x target.
  • Avoid importing whole NSS/OES subsystems. Adapt data models and helper logic into MARS-NWE/libnwfs where useful.

2. Salvage metadata and backup-tool compatibility

Current base:

  • MARS-NWE already has a Samba-friendly salvage/recycle model: live deletes move payloads into .recycle. Keep .recycle as the payload backend.
  • New salvage state should be authoritative in netware.metadata on the recycled payload. .salvage JSON sidecars are a legacy transition/cache and should be phased out instead of becoming a second metadata authority.
  • Samba 4.23.6 vfs_recycle was checked: the normal recycle path uses rename, so Linux xattrs stay attached to the recycled inode. Files manually copied into .recycle without netware.metadata are not valid NetWare salvage objects unless an explicit admin repair tool marks them.

Follow-up:

  • Add shared libnwcore/libnwfs helpers for deleted metadata, xattr validation, NCP salvage reply input and future host tools.
  • Preserve .recycle payload compatibility. Do not replace the host layout with an NSS purge tree and do not move primary salvage payloads into .nwfs_streams.
  • If a compressed file is recycled, materialize the .recycle payload as a normal uncompressed Linux file so Samba/host tools can see it; keep the former compression state in netware.metadata for NCP recover/recompress policy.
  • For each salvaged file, set netware.metadata with the same NSS-shaped fields used for live files plus deleted-object information:
    • DOS attributes;
    • create/archive/modify/access times where available;
    • owner/archiver/modifier IDs;
    • inherited-rights mask;
    • trustees;
    • deleted time and deleted-by identity;
    • original parent/name identity.
  • Keep volume salvage reporting vocabulary aligned with NSS concepts such as purgeable bytes, non-purgeable bytes, deleted-file count, oldest deleted time, keep seconds and watermarks, even if MARS computes them by scanning .recycle payloads with netware.metadata.
  • Add host-side tests and tools that verify salvaged payloads expose NSS-shaped netware.metadata.
  • Remove the yyjson dependency only after new deletes no longer write .salvage JSON, old sidecars are migrated/retired, and no other required consumer remains.

3. Administration, queues, printing and operational behaviour

  • Add a real console-operator privilege model instead of mapping console rights directly to supervisor equivalence.
  • Decide where console-operator state should live:
    • bindery property;
    • server configuration;
    • explicit internal list similar to queue operator handling.
  • Fix queue spool path case handling so DOS/bindery names do not create duplicate Unix directories that differ only by case.
  • Resolve queue job file paths case-insensitively or use the queue object's already-resolved Unix spool directory instead of rebuilding it from a DOS path.
  • Continue Q_UNIX_PRINT cleanup where it improves observable NetWare client behaviour.
  • Keep TTS work focused on documented 2.x/3.x client compatibility; do not add a broad transaction subsystem unless a real client path needs it.

4. Extended attributes, AFP/Mac and metadata families

  • Continue extended-attribute work only where it supports the 3.x filesystem target, existing clients or backup-tool compatibility.
  • Keep AFP/Mac metadata work behind the existing backend boundary; do not let AFP cleanup block DOS namespace or salvage metadata work.
  • Align xattr naming and validation helpers so live files, salvaged files and test dump tools use the same NSS-shaped metadata builders.

5. Test infrastructure

  • Keep live smokes easy to collect: one bundle per functional area, with one log per volume and an nw.log slice from the start of the test.
  • Keep DOS tool smokes paired with Linux helper scripts when setup requires host state, for example quota limits or filesystem images.
  • Extend CTest only with checks that can run without a live IPX/NCP server.
  • Plan an isolated live-test server tree that can be driven from the CMake build once the transport no longer depends on host IPX setup.
  • The future test environment should generate its own SYS tree and quota image, then start a local MARS-NWE instance from the test build.

6. Third-party and shared-library layering

  • Keep mars-nwe-owned .c and .h files under GPL-compatible project control.
  • Maintain clear boundaries for third-party code:
    • libowfat-style helpers where they simplify core code;
    • MatrixSSL/libnwssl only where needed for existing SSL/FLAIM/NICI work;
    • FLAIM wrappers without invasive upstream source rewrites.
  • Keep shared helper naming consistent:
    • generic filesystem/quota helpers under nwfs_*;
    • Linux quota helpers under nwfs_lnxquota_*;
    • NetWare metadata quota helpers under nwfs_nwquota_*;
    • salvage/metadata snapshot helpers in a shared libnwcore/libnwfs layer once they exist.

Done / stabilized areas

These items are no longer active TODOs. Keep patch-by-patch chronology in AI.md; this section records the stable functional result only.

Quota landscape

  • Directory quotas on the Linuxquota-backed QUOTA volume are implemented and live-tested through NetWare 3.x NCP decimal 22/35 and 22/36 (wire/code 0x23 and 0x24) for set, get, clear, Linux Project Quota mirroring, and NSS-shaped netware.metadata.
  • User quotas on QUOTA use Linux quota as the authoritative live backend and enforce deny-before-data on NCP writes.
  • User quotas on SYS use the NWQUOTA metadata backend as the authoritative state and enforce deny-before-data on NCP writes.
  • netware.userquota.0 is the canonical NSS-shaped userquota mirror; reserved2 remains zero and is not used as a live MARS usage counter.
  • The all-quota live smoke covers ctest, directory quota, Linuxquota userquota, SYS metadata, NWQUOTA userquota and an nw.log slice.
  • The DOS quota smoke proves the same write-deny boundary from DOS board tools for both QUOTA and SYS.

NSS low-level library imports

  • Import small GPL-2 NSS low-level library helpers with original file/API names where they can be compiled outside the NSS runtime.
  • Keep imported compiled helpers directly in src/core//libnwcore, not under a new artificial nss/ subdirectory; preserve original names so the NSS provenance and possible external-source compatibility remain clear.
  • Initial compiled import is bitmap.c/bitmap.h in libnwcore; replace local duplicate bitmap/bit allocation helpers gradually only after tests cover each call site.
  • Keep libowfat-provided primitives where they are already the better fit; use NSS helpers where NetWare/NSS source compatibility or media-layout semantics matter.