Commit Graph

530 Commits

Author SHA1 Message Date
OpenAI
6b2c9f99f8 ncp: keep 87 salvage handlers local 2026-05-31 21:30:54 +02:00
OpenAI
629d17427f ncp: share salvage endpoint operation helpers 2026-05-31 21:19:11 +02:00
OpenAI
4bfb1a46bd ncp: add legacy salvage endpoints 2026-05-31 21:05:29 +02:00
Test
3b03a57c76 ncp: validate salvage scan path request
All checks were successful
Source release / source-package (push) Successful in 1m1s
2026-05-31 20:18:24 +02:00
Test
e47a745d0b salvage: match scan entries by directory base
All checks were successful
Source release / source-package (push) Successful in 56s
2026-05-31 20:14:41 +02:00
Review Bot
cb0967c7e1 salvage: reuse scan path for recover lookup 2026-05-31 20:07:08 +02:00
Mario Fetka
ef86d78fa7 ncp: order 87 salvage subfunctions numerically
All checks were successful
Source release / source-package (push) Successful in 50s
2026-05-31 19:56:37 +02:00
OpenAI
0e9f65d821 ncp: keep 87 subfunction dispatch in namespace handler
All checks were successful
Source release / source-package (push) Successful in 54s
2026-05-31 19:50:34 +02:00
Mario Fetka
23be038087 NCP 87/17 Recover Salvageable File
All checks were successful
Source release / source-package (push) Successful in 58s
2026-05-31 19:39:29 +02:00
OpenAI
1b6e84b858 salvage: use decimal NCP 87 salvage subfunctions
All checks were successful
Source release / source-package (push) Successful in 52s
2026-05-31 18:33:54 +02:00
Test
51ae60a6f8 salvage: add initial NCP scan endpoint
All checks were successful
Source release / source-package (push) Successful in 57s
2026-05-31 18:06:51 +02:00
test
5d574078ff salvage: add recycle filters and versioning
All checks were successful
Source release / source-package (push) Successful in 53s
2026-05-31 15:54:51 +02:00
OpenAI
afa4a00f39 salvage: parse recycle behaviour flags 2026-05-31 15:31:04 +02:00
OpenAI
34c9e2a6ed salvage: reserve low ini range for recycle options 2026-05-31 15:23:37 +02:00
Mario Fetka
05f9c4d0de salvage: require bundled static yyjson
Some checks failed
Source release / source-package (push) Failing after 11m41s
2026-05-31 14:03:01 +02:00
ChatGPT
3fb45fd624 salvage: hook delete path through nwsalvage
All checks were successful
Source release / source-package (push) Successful in 55s
2026-05-31 13:35:58 +02:00
Mario Fetka
5fc5a5218f salvage: preserve trustee metadata
All checks were successful
Source release / source-package (push) Successful in 52s
2026-05-31 12:37:40 +02:00
Mario Fetka
ce34e2df65 salvage: preserve xattr backed metadata 2026-05-31 12:32:44 +02:00
Mario Fetka
2c089f5fe3 salvage: expand metadata schema for server fields
All checks were successful
Source release / source-package (push) Successful in 58s
2026-05-31 12:27:44 +02:00
Mario Fetka
054ea6c867 salvage: add yyjson metadata helpers 2026-05-31 11:49:57 +02:00
Mario Fetka
5d0c665b52 salvage: load config through ini getter 2026-05-31 11:34:50 +02:00
Mario Fetka
47709fe935 salvage: add repository path helpers 2026-05-31 11:27:49 +02:00
Mario Fetka
bedec0d2c0 salvage: add initial config helper 2026-05-31 11:27:39 +02:00
OpenAI
ac79fa9d22 nwconn: support AFP scan from directory entry IDs
All checks were successful
Source release / source-package (push) Successful in 47s
2026-05-31 09:03:43 +02:00
Mario Fetka
63ee154c89 tests: drop transient AFP SetInfo layout markers 2026-05-31 07:49:27 +02:00
Mario Fetka
6230aa1d7c nwconn: resolve AFP entry-id-relative name lookups 2026-05-31 07:38:15 +02:00
Mario Fetka
77a40f9ed2 nwconn: share AFP entry-id resolver with metadata paths 2026-05-31 06:44:56 +02:00
Mario Fetka
fa96ebb264 nwatalk: use standalone mars_nwe AFP xattr backend 2026-05-31 06:15:03 +02:00
a
1cec6a64aa nwconn: resolve AFP open fork entry ids through nwatalk metadata 2026-05-30 23:29:25 +02:00
Mario Fetka
330d20a0e1 nwconn: route AFP open fork writes through NetWare opens 2026-05-30 23:13:51 +02:00
Mario Fetka
f0864c1150 nwconn: align AFP get and scan info layouts with WebSDK 2026-05-30 22:58:06 +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
211d04ea62 nwconn: accept WebSDK AFP set file information layout 2026-05-30 22:35:35 +02:00
a
bcacd6142d nwconn: search files only for AFP file rename
All checks were successful
Source release / source-package (push) Successful in 48s
2026-05-30 22:20:33 +02:00
a
02e247b133 nwconn: implement AFP rename through NetWare move paths 2026-05-30 22:10:02 +02:00
Test
4183a63689 nwconn: implement AFP delete through NetWare remove paths 2026-05-30 21:55:14 +02:00
Mario Fetka
37039a773f nwconn: implement AFP create file through NetWare file creation
All checks were successful
Source release / source-package (push) Successful in 49s
2026-05-30 21:36:03 +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
d1a7780532 nwconn: implement AFP create directory through NetWare directory creation
All checks were successful
Source release / source-package (push) Successful in 48s
2026-05-30 20:46:29 +02:00
Mario Fetka
f9c7a795df nwconn: align AFP endpoint names with WebSDK
All checks were successful
Source release / source-package (push) Successful in 48s
2026-05-30 20:39:14 +02:00
Mario Fetka
faa44d060b nwconn: derive AFP entry ids from NetWare handles
All checks were successful
Source release / source-package (push) Successful in 45s
2026-05-30 20:15:06 +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
34504f1381 Fix Compile
All checks were successful
Source release / source-package (push) Successful in 46s
2026-05-30 19:33:57 +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
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
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
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
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