From b8016f99a3107f3ed1ab4a92f9ab6b927d287e58 Mon Sep 17 00:00:00 2001 From: OpenAI Date: Sat, 30 May 2026 09:40:48 +0000 Subject: [PATCH] nwarchive: scope private xattrs under NetWare namespace Move the mars_nwe NetWare-core archive/fileinfo xattr names from the flat org.mars-nwe namespace into an explicit org.mars-nwe.netware subnamespace. The earlier xattr namespace cleanup intentionally removed the unreleased user.mars_nwe names and introduced Netatalk-style org.mars-nwe source-level keys. Keeping archive and fileinfo at org.mars-nwe.archive and org.mars-nwe.fileinfo would make those NetWare server metadata records peers of AFP metadata instead of identifying their ownership. The archive date/time/archiver and file create/creator/modifier records are NetWare-core file metadata, so place them under org.mars-nwe.netware.* while leaving AFP metadata under org.mars-nwe.afp.*. No legacy fallback is added because the old names only existed in local test systems and have not been released. The existing nwxattr wrapper still maps source-level org.mars-nwe..* names to user.org.mars-nwe..* on Linux, mirroring Netatalk's org.netatalk.* EA abstraction. Tests: git diff --check TODO: keep future nwbind/nwserv/AFP metadata in explicit org.mars-nwe..* subnamespaces instead of adding new flat org.mars-nwe.* keys. --- TODO.md | 8 ++++---- src/nwarchive.c | 4 ++-- tests/linux/README.md | 10 ++++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/TODO.md b/TODO.md index 17d42df..ddcc850 100644 --- a/TODO.md +++ b/TODO.md @@ -258,12 +258,12 @@ Current status: - Optional build-time detection/linking for Netatalk/libatalk exists as a first local metadata backend hook. It is deliberately not an AFP protocol implementation yet. -- Existing mars_nwe private xattr payloads use the `org.mars-nwe.*` - namespace (`org.mars-nwe.archive` and `org.mars-nwe.fileinfo`) rather than +- Existing mars_nwe private xattr payloads use the `org.mars-nwe..*` + namespace (`org.mars-nwe.netware.archive` and `org.mars-nwe.netware.fileinfo`) rather than the unreleased test-only `user.mars_nwe.*` names. There is no legacy read fallback because the old names never shipped outside local test systems. - On Linux, mars_nwe's local xattr helper maps source-level `org.mars-nwe.*` - names to the portable `user.org.mars-nwe.*` storage namespace, mirroring + On Linux, mars_nwe's local xattr helper maps source-level `org.mars-nwe..*` + names to the portable `user.org.mars-nwe..*` storage namespace, mirroring Netatalk's `org.netatalk.*` EA abstraction. - NetWare AFP calls are NCP entry points for Mac namespace semantics on a NetWare volume, not transport-level AFP proxy calls to `afpd`. diff --git a/src/nwarchive.c b/src/nwarchive.c index 03a6c24..7e0cd67 100644 --- a/src/nwarchive.c +++ b/src/nwarchive.c @@ -7,7 +7,7 @@ #include #endif -#define MARS_NWE_ARCHIVE_XATTR "org.mars-nwe.archive" +#define MARS_NWE_ARCHIVE_XATTR "org.mars-nwe.netware.archive" #define MARS_NWE_ARCHIVE_VERSION 1 typedef struct { @@ -147,7 +147,7 @@ int mars_nwe_set_archive_info(char *unixname, } -#define MARS_NWE_FILEINFO_XATTR "org.mars-nwe.fileinfo" +#define MARS_NWE_FILEINFO_XATTR "org.mars-nwe.netware.fileinfo" #define MARS_NWE_FILEINFO_VERSION 1 typedef struct { diff --git a/tests/linux/README.md b/tests/linux/README.md index 044b603..04381f9 100644 --- a/tests/linux/README.md +++ b/tests/linux/README.md @@ -14,9 +14,11 @@ AppleDouble/CNID metadata and then the temporary stat-derived fallback. The first AFP write smoke path is deliberately limited to the FinderInfo bitmap of AFP 2.0 Set File Information; CNID allocation, DOS attribute mapping, resource fork writes, and data-fork writes remain separate write-safety work. mars_nwe -source uses Netatalk-style `org.mars-nwe.*` xattr names; on Linux the local -xattr helper stores those through the portable `user.` namespace, matching -Netatalk's `org.netatalk.*` EA abstraction style. +source uses Netatalk-style `org.mars-nwe..*` xattr names; AFP +metadata stays under `org.mars-nwe.afp.*` while NetWare-core metadata uses +`org.mars-nwe.netware.*`. On Linux the local xattr helper stores those through +the portable `user.` namespace, matching Netatalk's `org.netatalk.*` EA +abstraction style. Build with: @@ -372,7 +374,7 @@ The helper exercises only the first write-safe AFP subset: the file FinderInfo bitmap (`0x0020`). It sends a path-backed raw `VOL:`-style request, writes the 32-byte FinderInfo block to mars_nwe's private `org.mars-nwe.afp.finder-info` metadata key, and immediately verifies the update through AFP 2.0 Get File -Information. On Linux the source-level `org.mars-nwe.*` name is stored via the +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.