Commit Graph

87 Commits

Author SHA1 Message Date
Mario Fetka
362a5779cb tests: use WebSDK entry-id path layout for AFP open fork smoke
All checks were successful
Source release / source-package (push) Successful in 51s
2026-05-30 23:41:34 +02:00
a
b3a5468441 tests: add AFP open file fork entry-id smoke
All checks were successful
Source release / source-package (push) Successful in 52s
2026-05-30 23:29:25 +02:00
Mario Fetka
2b614af27b tests: record AFP open file fork write smoke success 2026-05-30 23:22:40 +02:00
Mario Fetka
9c1787345d tests: add AFP open file fork write smoke
All checks were successful
Source release / source-package (push) Successful in 52s
2026-05-30 23:13:51 +02:00
a
033ed7cefc tests: record WebSDK AFP get scan info smoke success 2026-05-30 23:06:25 +02:00
Mario Fetka
5a8a7f3488 tests: verify WebSDK AFP get and scan info layouts
All checks were successful
Source release / source-package (push) Successful in 47s
2026-05-30 22:58:06 +02:00
Mario Fetka
b1a5f9a0b3 tests: record WebSDK AFP set file information smoke success 2026-05-30 22:48:37 +02:00
a
e08ce594b5 nwconn: require WebSDK AFP set file information layout
All checks were successful
Source release / source-package (push) Successful in 48s
2026-05-30 22:40:58 +02:00
Mario Fetka
dce62be6d5 tests: add WebSDK AFP set file information smoke 2026-05-30 22:35:35 +02:00
a
5309422eb7 tests: record AFP rename smoke success 2026-05-30 22:27:54 +02:00
a
8360edfff7 tests: add AFP rename smoke
All checks were successful
Source release / source-package (push) Successful in 48s
2026-05-30 22:11:00 +02:00
Test
cd4ca7c4d9 tests: record AFP delete smoke success 2026-05-30 22:02:44 +02:00
Test
3368c8561c tests: add AFP delete smoke cleanup
All checks were successful
Source release / source-package (push) Successful in 49s
2026-05-30 21:55:45 +02:00
Mario Fetka
3b3a378a22 tests: record AFP create file smoke success
All checks were successful
Source release / source-package (push) Successful in 48s
2026-05-30 21:48:39 +02:00
Mario Fetka
434de903bd tests: add AFP create file smoke
All checks were successful
Source release / source-package (push) Successful in 48s
2026-05-30 21:41:08 +02:00
Mario Fetka
0a60e0ce7a tests: record AFP create directory smoke success
All checks were successful
Source release / source-package (push) Successful in 50s
2026-05-30 21:30:35 +02:00
Mario Fetka
643acaf737 tests: use unique AFP create directory smoke names
All checks were successful
Source release / source-package (push) Successful in 50s
2026-05-30 21:17:43 +02:00
Mario Fetka
2655f6e961 tests: limit AFP smoke log excerpt to recent lines
All checks were successful
Source release / source-package (push) Successful in 47s
2026-05-30 21:07:41 +02:00
Mario Fetka
9032848c9a nwconn: keep AFP file entry IDs on nwatalk fallback
All checks were successful
Source release / source-package (push) Successful in 47s
2026-05-30 21:00:20 +02:00
Mario Fetka
0a171048e8 tests: add AFP create directory smoke
All checks were successful
Source release / source-package (push) Successful in 46s
2026-05-30 20:52:43 +02:00
Mario Fetka
ee2271c099 tests: record AFP namespace entry id smoke success
All checks were successful
Source release / source-package (push) Successful in 48s
2026-05-30 20:22:44 +02:00
OpenAI
a4dd5c3678 tests: record AFP trustee access privileges smoke success
All checks were successful
Source release / source-package (push) Successful in 46s
2026-05-30 19:57:42 +02:00
OpenAI
a18de6abd2 nwconn: derive AFP access privileges from trustees
All checks were successful
Source release / source-package (push) Successful in 47s
2026-05-30 19:50:25 +02:00
Mario Fetka
fc7f099494 tests: record AFP create and access timestamp smoke success
All checks were successful
Source release / source-package (push) Successful in 48s
2026-05-30 19:42:32 +02:00
Mario Fetka
31a9234c8b nwconn: route AFP access timestamps through atime
All checks were successful
Source release / source-package (push) Successful in 48s
2026-05-30 19:27:38 +02:00
OpenAI
b442500ef9 nwconn: route AFP create timestamps through nwarchive fileinfo
All checks were successful
Source release / source-package (push) Successful in 50s
2026-05-30 19:18:35 +02:00
OpenAI
8bfedbacf1 tests: record AFP backup timestamp smoke success
All checks were successful
Source release / source-package (push) Successful in 52s
Record the successful Linux AFP smoke-suite run for the WebSDK Backup Date/Time Set File Information field. The smoke output confirms bitmap 0x2000, the AFP backup timestamp value derived from epoch 1700000000, and the corresponding mars_nwe archive metadata xattr.

This documents the intended split between the Archive file attribute, which is mapped through the existing NetWare attribute path, and the Backup Date/Time field, which is routed through nwarchive.c and stored in org.mars-nwe.netware.archive.

Tested-by: ./afp_smoke_suite.sh ... --backup-time-only --backup-time-epoch 1700000000 (reported failures=0)
2026-05-30 18:35:38 +02:00
OpenAI
bbc37565c8 nwconn: route AFP backup timestamps through nwarchive
All checks were successful
Source release / source-package (push) Successful in 48s
Implement the WebSDK AFP Set File Information Backup Date/Time request bitmap as a narrow metadata write that reuses mars_nwe's existing archive metadata helper instead of adding a new AFP-specific storage path.

The AFP Attributes word already maps Archive through the NetWare FILE_ATTR_A path; Backup Date/Time is a separate SetInfo field and belongs in the existing nwarchive.c archive date/time metadata.  Include nwarchive.h in nwconn, fill the AFP information record's Backup Date/Time fields from mars_nwe_get_archive_info(), and accept the SetInfo 0x2000 bitmap by calling mars_nwe_set_archive_info() after the normal AFP path resolution and Modify-rights gate.

Extend the Linux Set File Information smoke helper with --backup-time-epoch/--backup-time-only, verify the returned 120-byte file information record at offsets 28/30, and have afp_smoke_suite.sh dump user.org.mars-nwe.netware.archive so reports prove that the WebSDK field is stored through the NetWare archive metadata path.

Tests: git diff --check; bash -n tests/linux/afp_smoke_suite.sh; gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_set_file_info_smoke.c
2026-05-30 18:21:54 +02:00
OpenAI
3f3a3ce832 tests: record AFP WebSDK attribute bit smoke success
The AFP Set/Get File Information attribute path now follows the WebSDK attribute word instead of the earlier low-bit smoke placeholders.  Hidden, System, and Archive are mapped through the existing NetWare attribute store as FILE_ATTR_H, FILE_ATTR_S, and FILE_ATTR_A, while FinderInfo and Entry-ID remain AFP-specific metadata.

Record the runtime smoke result that verified the corrected bit layout.  The suite reports failures=0, exercises Hidden, System, and Archive set/clear with the documented 0x0200, 0x0400, and 0x2000 attribute bits, and confirms the SetInfo request bitmaps 0x0100 Attributes, 0x1000 Modify Date/Time, and 0x4000 FinderInfo.

Also document that user.org.mars-nwe.afp.attributes may legitimately be absent after this mapping: the tested attribute bits are no longer stored as AFP-only xattrs, so ENODATA in the optional xattr dump is expected when no AFP-only bits remain set.

Test status: based on the provided mars-afp-smoke report from 2026-05-30 18:04:21, which completed with failures=0 and preserved the expected FinderInfo, Entry-ID, Modify timestamp, DOS-name, Open Fork, SetInfo, and rights-negative coverage.
2026-05-30 18:11:10 +02:00
OpenAI
336b2ce73e tests: allow absent AFP-only attribute xattr in suite
All checks were successful
Source release / source-package (push) Successful in 44s
After aligning AFP Set File Information with the WebSDK attribute word,
Hidden, System, and Archive are represented by the existing NetWare
attribute store instead of org.mars-nwe.afp.attributes.  The default smoke
path can therefore legitimately have no AFP-only attribute xattr once those
bits are cleared or mapped away.

Update afp_smoke_suite.sh to treat the AFP-only attributes xattr dump as
optional while still reporting the getfattr output.  FinderInfo and Entry
ID xattrs remain mandatory because they are still AFP-specific metadata
stores.

Tests: bash -n tests/linux/afp_smoke_suite.sh
2026-05-30 18:04:00 +02:00
OpenAI
55fdf64c8e nwconn: align AFP attribute bits with WebSDK
All checks were successful
Source release / source-package (push) Successful in 46s
The WebSDK/NCP AFP File Information records use a distinct SetInfo request bitmap and attribute word.  The previous smoke-oriented implementation reused the low response-bit positions for Set Attributes, Modify Date/Time, FinderInfo, Hidden/Invisible, System, and Archive.  That made the current tests pass, but it was not faithful to the documented header semantics and risked keeping AFP metadata parallel to existing NetWare attributes.

Switch Set File Information to the documented request bitmap values: 0x0100 for Attributes, 0x1000 for Modify Date/Time, and 0x4000 for FinderInfo.  Switch the AFP attribute word to the documented NetWare-style bits: Hidden 0x0200, System 0x0400, Subdirectory 0x1000, and Archive 0x2000.

Map Hidden, System, and Archive through the existing NetWare attribute store via FILE_ATTR_H, FILE_ATTR_S, and FILE_ATTR_A.  This keeps AFP Set/Get/Scan aligned with mars_nwe's existing attribute helper instead of maintaining duplicate AFP-only xattr state.  FinderInfo remains AFP metadata and still uses the Modify-rights gate added earlier.

Update the Linux smoke helper and suite to use --hidden / --clear-hidden while keeping --invisible / --clear-invisible as compatibility aliases.  Document the corrected WebSDK bit values and the convergence rule that NetWare attributes must use mars_nwe NetWare helpers.

Tests: git diff --check; bash -n tests/linux/afp_smoke_suite.sh; gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_set_file_info_smoke.c
2026-05-30 17:48:51 +02:00
OpenAI
fb4934fddc tests: record AFP metadata rights negative smoke success
All checks were successful
Source release / source-package (push) Successful in 45s
Document the verified Linux smoke-suite result for the AFP Set File Information metadata rights gate.

The suite now uses the existing ncpfs trustee utilities to grant NOPASSUSER only read/file-scan rights on the smoke file, then verifies that FinderInfo, Invisible, and System metadata writes are rejected with completion 0x8c while the SUPERVISOR positive path remains green.

This records the intended WebSDK/NWAFP adapter semantics: AFP-specific xattrs remain the storage for FinderInfo and AFP-only metadata bits, but writes to those xattrs are still file metadata changes and must pass mars_nwe's NetWare Modify trustee policy instead of bypassing it.

Tests:

- afp_smoke_suite.sh --readonly-user NOPASSUSER --readonly-no-password --prepare-readonly-rights

- FinderInfo negative Set File Information -> 0x8c

- Invisible negative Set File Information -> 0x8c

- System negative Set File Information -> 0x8c

- final nwrevoke cleanup succeeds

- suite summary failures=0
2026-05-30 17:25:03 +02:00
OpenAI
4240aff077 tests: add AFP metadata rights negative smoke
All checks were successful
Source release / source-package (push) Successful in 52s
Extend the AFP Set File Information smoke helper with an explicit expected-completion mode so negative WebSDK/NWAFP probes can assert the server completion byte instead of treating any non-zero completion as a helper failure.

Use that support from afp_smoke_suite.sh to add optional Modify-rights negative coverage for AFP metadata writes.  When a readonly test user such as NOPASSUSER is supplied, the suite now verifies that FinderInfo and AFP-only Invisible/System xattr writes are rejected with completion 0x8c, matching the mars_nwe trustee/effective-rights Modify policy gate added to afp_set_file_information().

The optional --prepare-readonly-rights mode deliberately reuses the standard ncpfs trustee utilities rather than adding ad-hoc test NCPs: nwrevoke removes an explicit assignment for the readonly user on the smoke target, nwgrant grants only read/file-scan rights, and nwrevoke restores the object to inherited rights after the negative probes.  A cleanup trap also revokes the temporary assignment if the suite exits early.

This keeps the AFP smoke harness aligned with the convergence plan: AFP remains an Apple-facing adapter over existing mars_nwe NetWare trustee semantics, while test setup uses existing NetWare administration utilities.

Tests: bash -n tests/linux/afp_smoke_suite.sh; gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_set_file_info_smoke.c; git diff --check
2026-05-30 17:17:47 +02:00
OpenAI
dacfc0f7a1 nwconn: gate AFP metadata writes with Modify rights
All checks were successful
Source release / source-package (push) Successful in 54s
AFP Set File Information intentionally stores some Apple-specific metadata in mars_nwe-owned xattrs because FinderInfo and the narrow Invisible/System AFP bits do not have a complete NetWare-side representation yet.  Those xattrs are storage details, however, and should not let the AFP adapter bypass the same NetWare policy that protects ordinary metadata changes.

Add a small Modify-rights gate for AFP-specific metadata writes after the path-backed request has been resolved to a mars_nwe volume and Unix node.  The check uses the existing trustee/effective-rights helper with TRUSTEE_M before writing FinderInfo or AFP-only attribute xattrs.  Archive remains routed through the NetWare FILE_ATTR_A attribute helper, and Modify timestamp remains routed through nw_utime_node(), so their existing mars_nwe policy paths are unchanged.

This keeps the WebSDK/NWAFP Set File Information handler as an Apple-facing adapter over existing mars_nwe access control rather than a parallel metadata writer.  It also documents the convergence rule in TODO.md so later Create, Rename, and Delete work can continue to prefer existing NetWare helpers or thin wrappers over duplicated AFP-local file server logic.

Tests: git diff --check

TODO: add non-SUPERVISOR negative smoke coverage for missing Modify rights once a stable low-privilege test user and trustee setup are available.
2026-05-30 16:59:47 +02:00
OpenAI
e899704677 tests: record AFP DOS name namespace smoke success
All checks were successful
Source release / source-package (push) Successful in 49s
Record the follow-up Linux smoke-suite result for NCP 0x2222/35/18, AFP Get DOS Name From Entry ID, after the reverse lookup was changed to use the existing namedos.c DOS namespace alias builder.\n\nThe previous implementation returned the raw Unix/realcase relative path, which made SYS:PUBLIC/pmdflts.ini appear as public/pmdflts.ini.  The corrected path now returns the canonical DOS namespace spelling PUBLIC/PMDFLTS.INI, matching mars_nwe's existing DOS name semantics instead of adding AFP-local case handling.\n\nThe note keeps the broader convergence rule explicit: AFP handlers should reuse mars_nwe namespace, attribute, trustee, timestamp, open, and directory helpers wherever those NetWare semantics already exist, and only keep AFP-specific metadata in the AFP xattr namespace.\n\nTests:\n- ./afp_smoke_suite.sh ... SYS:PUBLIC/pmdflts.ini\n- AFP Get DOS Name From Entry ID volume=0 entry_id=0x440cb9b2 path=PUBLIC/PMDFLTS.INI verified\n- Server log: AFP Get DOS Name From Entry ID: vol=0 entry=0x440cb9b2 path='PUBLIC/PMDFLTS.INI'\n- Suite result: failures=0
2026-05-30 16:53:36 +02:00
OpenAI
b768c921c8 nwconn: return DOS namespace names for AFP entry ids
All checks were successful
Source release / source-package (push) Successful in 49s
Route AFP Get DOS Name From Entry ID through the existing mars_nwe DOS namespace alias helper instead of returning raw Unix directory entry names from the reverse lookup walk.

WebSDK semantics require this subfunction to return a DOSPathString. The current AFP entry ids are mars_nwe/libatalk metadata ids rather than namspace.c base handles, so the lookup still has to walk the volume tree, but each path component is now formatted with namedos.c build_dos_83_alias(). This keeps the Apple-facing adapter aligned with the existing DOS namespace rules used by normal NetWare clients.

Update the Linux smoke helper's default expectation for raw VOL:PATH smoke inputs to compare against the DOS 8.3 uppercase form. Explicit --expect remains available for callers that want to validate a specific alias.

Tests: git diff --check; gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_dos_name_smoke.c
2026-05-30 16:43:16 +02:00
OpenAI
7241a28393 nwconn: implement AFP DOS name reverse lookup
All checks were successful
Source release / source-package (push) Successful in 50s
Implement the WebSDK/NWAFP Get DOS Name From Entry ID subfunction (NCP 0x2222/35/18) as a conservative, read-only reverse lookup over mars_nwe's existing volume and AFP metadata infrastructure.

The documented request carries a volume number and 32-bit Macintosh directory entry ID, and the reply returns a length-prefixed DOS path string.  mars_nwe's current AFP entry IDs are not the namespace base handles maintained by namspace.c; they are mars_nwe/libatalk AFP metadata IDs cached through nwatalk.  Reuse the existing volume table as the search root and nwatalk_get_entry_id() as the identity probe instead of inventing a parallel namespace handle mapping.

The reverse lookup deliberately does not create fallback IDs while walking the volume.  It only matches entries that already have mars_nwe or Netatalk AFP metadata, which is the normal smoke-test sequence after Get Entry ID, Get File Information, or Scan File Information has cached the target ID.  This keeps the lookup read-only and avoids populating entry-id xattrs across an entire volume as a side effect.

Add a Linux afp_dos_name_smoke helper and wire it into the AFP smoke suite.  The helper can resolve the supplied VOL:PATH to an entry ID first, then sends the 0x12 request and verifies the returned path without the volume prefix.  The suite continues to exercise the existing path-backed AFP compatibility flow before future create/rename/remove work.

Tests:\n- git diff --check\n- bash -n tests/linux/afp_smoke_suite.sh\n- gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_dos_name_smoke.c\n\nTODO:\n- Replace the volume walk with a real CNID/base-ID index when persistent AFP identity storage grows one.\n- Return true DOS 8.3 aliases once the AFP reverse lookup is wired to the namespace alias helpers rather than preserving the cached path component spelling.
2026-05-30 16:08:30 +02:00
OpenAI
2482c2bd99 tests: assert unsupported AFP open fork modes
All checks were successful
Source release / source-package (push) Successful in 48s
Document and exercise the conservative AFP Open File Fork boundary before adding more destructive AFP write endpoints.

The current NCP 0x2222/35/08 implementation intentionally supports only path-backed data-fork read opens.  Resource-fork access still requires AppleDouble/resource-fork semantics, and write-open access must wait for an AFP write-fork path that preserves the existing NetWare share, lock, trustee, and file-handle behavior.

Extend the Linux smoke helper with a generic expected-completion option so unsupported paths can be asserted as successful negative coverage rather than treated as ad-hoc failures.  The smoke suite now checks that write-open requests return 0x84 and resource-fork opens return 0x9c while the positive data-fork read-open path remains unchanged.

This keeps the currently incomplete Open File Fork semantics explicit before moving on to Create/Rename/Remove.  It also gives Gitea reviewers a small incremental diff: helper option parsing, two suite probes, and README/TODO status updates only.

Tests:

- git diff --check

- bash -n tests/linux/afp_smoke_suite.sh

- gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_open_file_fork_smoke.c

TODO:

- Implement AFP write-open semantics only after the server can route them through the existing NetWare handle/share/lock code paths.

- Implement resource-fork opens only after AppleDouble/libatalk resource-fork storage semantics are available.
2026-05-30 15:48:24 +02:00
OpenAI
e3a79ba733 tests: record AFP archive attribute mapping smoke success
All checks were successful
Source release / source-package (push) Successful in 47s
Document the rebuilt-server smoke coverage for AFP Set File Information after mapping the AFP Archive attribute onto the existing NetWare FILE_ATTR_A path.

The prior Archive terminology cleanup established that the WebSDK attribute bit is Archive, not Backup. The follow-up implementation now keeps Archive out of org.mars-nwe.afp.attributes and routes it through the existing NetWare attribute store, while Finder Invisible and System remain narrow AFP metadata xattr bits. Record the runtime evidence so the intended storage split is explicit.

The smoke-suite run covers the path-backed AFP 0x10 attribute probes for Archive set and clear. Archive set reports AFP-visible attrs=0x0040, Clear Archive reports attrs=0x0000, and the final Linux xattr dump shows user.org.mars-nwe.afp.attributes=0x01000000. That confirms the AFP metadata xattr no longer contains Archive after the NetWare attribute bit has been cleared.

This also preserves the WebSDK SETCLR semantics in the documentation: the server logs attrs=0x8040 for Archive set and attrs=0x0040 for Archive clear. The helper continues to verify only the targeted bit so independently stored metadata can remain visible while a single attribute bit is being exercised.

Tests:

- ./afp_smoke_suite.sh ... --path SYS:PUBLIC/pmdflts.ini --unix-path /var/mars_nwe/SYS/public/pmdflts.ini

- getfattr -n user.org.mars-nwe.afp.attributes -e hex /var/mars_nwe/SYS/public/pmdflts.ini

- stat -c 'mtime_epoch=%Y mtime=%y' /var/mars_nwe/SYS/public/pmdflts.ini

Result: failures=0
2026-05-30 15:43:16 +02:00
OpenAI
51c04f148f nwconn: map AFP archive to NetWare attributes
All checks were successful
Source release / source-package (push) Successful in 57s
Route the AFP Set File Information Archive attribute through the existing NetWare attribute store instead of treating it as another mars_nwe AFP metadata xattr bit. The previous rename from Backup to Archive fixed the WebSDK naming, but the implementation still stored Archive together with Finder Invisible/System under org.mars-nwe.afp.attributes. That would duplicate NetWare's existing FILE_ATTR_A state and bypass the attribute path that already owns trustee Modify checks and volume attribute semantics.

Keep Finder Invisible and System as the narrow AFP metadata-only xattr bits for now, but strip Archive from nwatalk's xattr mask. AFP Get/Scan File Information now merges the AFP Archive bit from get_nw_attrib_dword(FILE_ATTR_A), while AFP Set File Information uses set_nw_attrib_word() for Archive set/clear. This reuses the existing nwattrib.c path, including TRUSTEE_M checks, instead of adding a new nwarchive.c flag. The org.mars-nwe.netware.archive xattr remains reserved for archive date/time/archiver metadata.

Tests: gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_set_file_info_smoke.c; bash -n tests/linux/afp_smoke_suite.sh; git diff --check

TODO: verify the updated archive mapping with afp_smoke_suite.sh and confirm that Archive set/clear is reflected by AFP Get File Information while user.org.mars-nwe.afp.attributes remains limited to Invisible/System.
2026-05-30 15:31:56 +02:00
OpenAI
068afd5d8a nwconn: rename AFP backup attribute to archive
All checks were successful
Source release / source-package (push) Successful in 51s
The NWAFP Set File Information attribute word uses a metadata bit that our earlier smoke code called Backup.  That name is too easy to confuse with the distinct AFP backup date/time fields in the Set/Get File Information records.  Treat the bit consistently as the Archive attribute in the server constants, Netatalk/xattr helper mask, Linux smoke helper, smoke suite, and documentation.

Keep --backup and --clear-backup as compatibility aliases in afp_set_file_info_smoke so existing local invocations continue to work, but make the generated suite use --archive and --clear-archive.  The source-level xattr payload remains unchanged: org.mars-nwe.afp.attributes still stores the same versioned attribute word and bit value 0x0040.

Tests: git diff --check; bash -n tests/linux/afp_smoke_suite.sh; gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_set_file_info_smoke.c
2026-05-30 14:47:32 +02:00
OpenAI
63f5fa699a nwconn: route AFP set file timestamps via NetWare helper
All checks were successful
Source release / source-package (push) Successful in 51s
Extend the conservative AFP Set File Information implementation to accept the file modification timestamp bitmap for path-backed file requests.  The WebSDK/NWAFP Set File Information payload carries the timestamp in the same bitmap-ordered parameter stream as file attributes and FinderInfo, so the parser now admits the documented modification timestamp field while continuing to reject every other Set File Information bitmap bit.

Do not implement a new AFP-specific timestamp backend.  After resolving the raw VOL:-style smoke path to the effective mars_nwe volume and Unix path, convert the AFP/NW DOS date+time fields to time_t and route the update through the existing nw_utime_node() helper.  That keeps trustee Modify-right checks and the established utime(2) fallback behavior shared with classic NetWare/NCP timestamp updates.

Keep the implementation deliberately file-only and path-backed.  Directory timestamps, create/access/backup timestamp fields, Entry-ID-only Set File Information, resource-fork semantics, DOS attribute mapping, Delete, Rename, Create, and Remove stay TODO so later patches can wire them to the existing NetWare helpers with focused smoke coverage.

Update afp_set_file_info_smoke with --mtime-epoch and --timestamp-only, verify the written AFP date/time via the follow-up Get File Information record, and extend afp_smoke_suite.sh to run the timestamp probe and record the backing Linux stat output.  The suite helper is already copied as a build target, so the new test is propagated into the build tree by the normal tests build.

Tests:

- git diff --check

- bash -n tests/linux/afp_smoke_suite.sh

- gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_set_file_info_smoke.c
2026-05-30 14:29:24 +02:00
OpenAI
6bcf93fc5d tests: record legacy AFP set file information smoke success
All checks were successful
Source release / source-package (push) Successful in 50s
Document the green Linux AFP smoke-suite run that exercises the legacy WebSDK/NWAFP Set File Information entry point alongside the AFP 2.0 path.

The report now comes from the build-tree copy of afp_smoke_suite.sh after the CMake sync fix, which matters because the tests are normally executed from the build directory. It confirms that subfunction 0x09 routes through the same deliberately narrow metadata-only implementation as subfunction 0x10: FinderInfo writes and Finder Invisible set/clear are verified through AFP Get File Information.

Record the relevant AFP-visible results and the Linux xattr state. FinderInfo remains aligned as TEXT/MARS in org.mars-nwe.afp.finder-info, the metadata attribute payload returns to the clean versioned value after the clear probes, and the cached entry id is visible through org.mars-nwe.afp.entry-id.

Tests:

- ./afp_smoke_suite.sh ... SYS:PUBLIC/pmdflts.ini

- Reported failures=0

- Verified legacy 0x09 FinderInfo and Invisible set/clear probes

TODO:

- Keep Set File Information restricted to metadata-only xattr writes until timestamp, enforcement, DOS/NetWare attribute mapping, fork write, and Entry-ID-only semantics are designed.
2026-05-30 13:43:14 +02:00
Mario Fetka
760468d929 tests: keep AFP smoke suite helper in sync
All checks were successful
Source release / source-package (push) Successful in 48s
Replace the configure-time file(COPY) of tests/linux/afp_smoke_suite.sh with an explicit build target and generated output in the build tests/linux directory.

The AFP smoke suite is normally run from the build tree alongside the compiled ncpfs/libncp helpers.  A configure-time copy could leave an older script in place after source updates, and clean builds did not reliably remove the copied runtime helper.  That made newly added AFP coverage, such as legacy 0x09 Set File Information probes, easy to miss during runtime validation.

Add an afp_smoke_suite custom target that copies the script with copy_if_different whenever the source script changes, marks it executable, and registers the build-tree copy as an additional clean file.  This keeps the runtime report helper aligned with the current source tree without changing any AFP protocol behavior.

Document that MARS_NWE_BUILD_LINUX_TESTS now installs the helper into the build tests/linux directory through the build target, and that clean removes the copied script so stale helpers do not survive rebuilds.

Tests: git diff --check
2026-05-30 13:38:32 +02:00
OpenAI
1270c7bfc1 tests: exercise legacy AFP attribute writes in smoke suite
All checks were successful
Source release / source-package (push) Successful in 51s
Extend the Linux AFP smoke-suite helper so the legacy AFP Set File Information subfunction 0x09 is covered for the narrow metadata attribute write path as well as FinderInfo.

The server now routes both WebSDK/NWAFP Set File Information entry points, 0x09 and AFP 2.0 0x10, through the same conservative path-backed implementation.  The helper already supports selecting 0x09, but the suite only executed the legacy FinderInfo probe.  Add legacy Invisible set/clear probes so the suite verifies that 0x09 also preserves the SETCLR bit semantics used by the AFP attribute xattr store.

Keep the coverage deliberately small: FinderInfo plus Invisible/System/Backup remain metadata-only xattr writes, while enforcement-sensitive attributes, timestamps, resource forks, create/delete/rename, and entry-id-only write lookup stay unsupported.

Tests: bash -n tests/linux/afp_smoke_suite.sh

Tests: git diff --check
2026-05-30 13:30:07 +02:00
OpenAI
73d4a61a11 nwconn: route legacy AFP set file information
All checks were successful
Source release / source-package (push) Successful in 47s
Wire the older WebSDK/NWAFP Set File Information subfunction (0x09) through the same deliberately narrow metadata-write implementation as AFP 2.0 Set File Information (0x10).  Both subfunctions now accept the path-backed VOL:-style smoke subset and persist only FinderInfo plus the metadata-only Invisible/System/Backup AFP attribute bits through mars_nwe's org.mars-nwe.afp.* xattrs.

This keeps the implementation conservative: 0x09 does not add timestamp writes, DOS/NetWare mode-bit mapping, create/delete/rename behavior, fork-write semantics, or entry-id-only lookup.  It simply exposes the same already-tested FinderInfo/attribute payload semantics to clients that issue the legacy AFP Set File Information opcode.

Update the Linux smoke helper with --afp09/--afp20 selection and include the legacy FinderInfo probe in afp_smoke_suite.sh so future reports cover both write opcodes automatically.

Tests:

- bash -n tests/linux/afp_smoke_suite.sh

- gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_set_file_info_smoke.c

- git diff --check
2026-05-30 13:14:22 +02:00
OpenAI
6cc380ec8c tests: mask AFP attribute smoke verification
All checks were successful
Source release / source-package (push) Successful in 47s
The AFP Set File Information smoke helper verifies the result of metadata attribute SETCLR requests through AFP 2.0 Get File Information. After adding more than one stored AFP metadata bit, the helper must not compare the entire attribute word against the bit currently being tested: existing xattr-backed bits such as Backup are supposed to be preserved while Invisible or System is set or cleared.

Track the targeted AFP attribute bit separately from the request word and verify only that bit in the returned file information record. This keeps the smoke semantics aligned with the WebSDK attribute SETCLR model: the request describes one bit operation, while the response reflects the full stored AFP attribute word.

Also document the observed smoke-suite failure mode where Backup remained set as 0x0040, so the Invisible probe correctly returned 0x0041/0x0040 even though the previous helper expected exact 0x0001/0x0000 values.

Tests:

- git diff --check

- gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_set_file_info_smoke.c

- bash -n tests/linux/afp_smoke_suite.sh
2026-05-30 13:08:20 +02:00
OpenAI
2f71b73fca tests: extend AFP smoke suite for metadata attributes
All checks were successful
Source release / source-package (push) Successful in 46s
The AFP Set File Information smoke coverage now includes the additional metadata-only file attribute bits implemented after the original FinderInfo and Invisible checks.  Extend the collectable Linux smoke-suite helper so a single report covers FinderInfo, Invisible set/clear, System set/clear, and Backup set/clear before dumping the mars_nwe AFP xattrs.

This keeps the helper aligned with the WebSDK/NWAFP attribute bitmap semantics exercised by afp_set_file_info_smoke: the Attributes request bitmap remains 0x0001, while the request attribute word uses SETCLR when setting System or Backup and the plain bit when clearing.  The suite clears each tested bit again so repeated runs normally leave org.mars-nwe.afp.attributes in the clean versioned zero state.

Document the runtime probes reported from SYS:PUBLIC/pmdflts.ini, including the AFP-visible attrs values and the server diagnostics that show the encoded SETCLR forms.  Also update TODO so the current smoke status states that the report helper now follows the supported FinderInfo plus Invisible/System/Backup metadata subset.

Tests:\n- bash -n tests/linux/afp_smoke_suite.sh\n- git diff --check\n\nTODO:\n- Keep rejecting the rest of AFP Set File Information until timestamp, enforcement, DOS/NetWare mapping, resource-fork, and entry-id-only write semantics are designed.
2026-05-30 13:03:59 +02:00
ChatGPT
cfd036e54c nwconn: persist additional AFP metadata attributes
All checks were successful
Source release / source-package (push) Successful in 49s
Extend the conservative AFP 2.0 Set File Information smoke path to accept the metadata-only System and Backup file attribute bits alongside the already-supported Finder Invisible bit.

The WebSDK/NWAFP Set File Information request uses the file Attributes bitmap to pass a set/clear attribute word. Netatalk stores several AFP file attributes in AppleDouble metadata while computing open-fork state dynamically and leaving enforcement-sensitive bits to the file/fork paths. Mirror only the low-risk mars_nwe subset here: persist Invisible, System, and Backup in the private org.mars-nwe.afp.attributes xattr, and keep NoWrite, NoRename, NoDelete, NoCopy, data-fork-open, resource-fork-open, timestamps, resource forks, and Entry-ID-only write semantics rejected until they have deliberate enforcement and backend design.

The xattr payload remains versioned and unchanged. Reads now expose the three supported metadata bits through Get/Scan File Information, and writes preserve the existing set/clear semantics over the supported mask.

Update the Linux Set File Information smoke helper with --system/--clear-system and --backup/--clear-backup options, while keeping the smoke-suite default unchanged. Document the expected Linux xattr forms 0x01000004 and 0x01000040 for those optional probes.

Tests: git diff --check; gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_set_file_info_smoke.c.
2026-05-30 12:55:25 +02:00
Mario Fetka
c57af8c7dc tests: record AFP smoke suite success
All checks were successful
Source release / source-package (push) Successful in 52s
Document the green Linux AFP smoke-suite report after the FinderInfo Set File Information payload-alignment fix.

The report covers the WebSDK/NWAFP smoke path for Entry ID by path, Entry ID from a live NetWare handle, Get File Information, Scan File Information, Alloc Temporary Directory Handle, Open File Fork, FinderInfo Set File Information, and Finder Invisible set/clear.  Record the suite-level failures=0 result for SYS:PUBLIC/pmdflts.ini so the current AFP compatibility baseline is captured in a single place.

Also record the Linux xattr evidence that matters for the metadata write paths: the FinderInfo value now starts with TEXTMARS without the previous leading padding byte, the attributes xattr reflects Invisible clear as 0x01000000 after the set/clear round-trip, and the cached mars_nwe AFP entry-id xattr stores 0x33f9a1ed in the versioned payload format.

Tests: external runtime report from tests/linux/afp_smoke_suite.sh against MARS/SUPERVISOR with SYS:PUBLIC/pmdflts.ini showed failures=0.
2026-05-30 12:47:52 +02:00