Commit Graph

27 Commits

Author SHA1 Message Date
Mario Fetka
13737d03c3 build: add optional Netatalk libatalk backend hook
Some checks failed
Source release / source-package (push) Failing after 41s
Add an opt-in CMake hook for Netatalk/libatalk and a small nwconn-side helper
layer for future AFP/Mac namespace work.

NetWare AFP NCP 0x23 calls still have to be decoded and answered by MARS-NWE;
libatalk is not used as an afpd proxy. Instead, expose local helper wrappers
that can read AppleDouble/Finder Info metadata and resource-fork sizes from a
backing Unix path when libatalk is available.

The WebSDK documents the AFP calls as NetWare server entry points for Mac
namespace semantics, and the SDK headers expose probes such as NWAFPSupported()
plus AFP entry-id and file-information calls. Those calls require AFP entry
IDs, Finder Info, resource forks, and per-volume Mac namespace state before
MARS-NWE can return success.

Keep NCP 0x23 returning invalid namespace for now, but record whether the
libatalk metadata backend was compiled in when rejecting AFP calls. Update
TODO.md to track the remaining NetWare AFP implementation work on top of the
new backend hook.

This adds build-time integration and local metadata helpers only; it does not
change AFP protocol behavior.
2026-05-30 01:25:55 +02:00
Mario Fetka
c80861b92b nwconn: implement extracted base handle restore
All checks were successful
Source release / source-package (push) Successful in 54s
Wire NCP 0x16/0x17 Extract a Base Handle and NCP 0x16/0x18 Restore an
Extracted Base Handle to connection-local directory-handle state.

The WebSDK documents NCP 0x2222/22/23 as taking a DirectoryHandle and
returning a 14-byte save buffer composed of a 10-byte ServerNetworkAddress
plus a 4-byte HandleID. The same documentation describes NCP 0x2222/22/24 as
taking that saved ServerNetworkAddress/HandleID pair and returning a
NewDirectoryHandle plus AccessRightsMask.

The SDK headers expose these calls as NWSaveDirectoryHandle() and
NWRestoreDirectoryHandle(), with the save buffer explicitly documented as 14
bytes. The Rust nwserver and lwared references do not implement this older
save/restore pair, and newer clients typically use the normal allocate/set
directory-handle calls instead, so keep the MARS-NWE HandleID opaque and
connection-local rather than guessing a global NetWare directory-base number.

Store extracted base-handle IDs in a small per-connection table that records
the saved volume/path tuple. Extract requires a live permanent directory
handle, and Restore validates the saved server address against this server
before allocating a new permanent directory handle for the saved path.

Add the SDK request/reply semantics to the inline endpoint comments and remove
the corresponding TODO entry.

This enables the documented endpoint path while keeping the saved HandleID
conservative and private to MARS-NWE.
2026-05-30 00:12:31 +02:00
Mario Fetka
0994605aa8 nwshare: track physical-record set entries
Add physical-record entries to the shared synchronization set table.

The Novell SDK documents the physical-record set calls as operating on the
caller's logged data byte range table: Log Physical Record adds byte ranges,
Lock Physical Record Set locks all logged ranges, Release Physical Record Set
unlocks them while keeping them logged, and Clear Physical Record Set unlocks
and removes them.

MARS-NWE already used the shared set handler for file and logical-record sets.
Extend the same table with type 4 entries for physical records, storing the
NetWare file handle, start offset, record length, timeout, lock directive, and
current locked state.

Add a type 4 handler that reuses nw_log_physical_record() for set lock and
release operations, and export share_set_physrec_add_rm() so nwconn can
maintain the set table when individual physical-record calls log or clear
ranges.

This prepares the documented Physical Record Set endpoints to use the existing
byte-range lock implementation.
2026-05-29 23:21:19 +02:00
Mario Fetka
44a309de40 nwserv: escape SAP names in debug logs
All checks were successful
Source release / source-package (push) Successful in 45s
SAP service names are fixed-size 48-byte fields and are not guaranteed to be
safe C strings in diagnostics.  Some NetWare 6.5 SAP service types advertise
non-printable or high-bit bytes in the name field, which made the debug log
hard to read and could run past the intended protocol field if logged with a
plain %s.

Add bounded formatting for SAP names used in debug output.  Stop at NUL within
the fixed field, keep printable ASCII unchanged, and escape other bytes as
\\xNN.

This is logging-only and does not change SAP/RIP protocol behavior.
2026-05-29 21:51:57 +02:00
Mario Fetka
dd91d45beb cmake: add ENABLE_BURSTMODE option
All checks were successful
Source release / source-package (push) Successful in 48s
Expose the existing experimental Packet Burst code through a CMake option.

Generate ENABLE_BURSTMODE in config.h from -DENABLE_BURSTMODE instead of
keeping it hard-coded to 0, and print the selected state during configuration.

Also fix the existing nwconn burst dispatch conditional so the source compiles
when ENABLE_BURSTMODE is enabled.

This only makes the existing Packet Burst code build-selectable; it does not
change the default behavior, which remains disabled.
2026-05-29 19:12:55 +02:00
Mario Fetka
55be945c02 nwqueue: implement change queue job entry
All checks were successful
Source release / source-package (push) Successful in 47s
Implement the Queue Change Job Entry endpoint for both the old NCP 17/6d
and newer NCP 17/7b variants.

Parse the queue job structure, look up the selected job by its job number,
and update the mutable job metadata fields while preserving server-managed
state such as client identity, entry time, job number, queue position, file
name/handle and servicing information.

Allow the job creator to update the standard user-changeable fields and allow
SUPERVISOR or Q_OPERATORS members to update the operator hold flag as well.
Return the documented queue/job/right/servicing completion codes for missing
queues, missing jobs, insufficient rights and jobs already being serviced.

This only updates NetWare queue metadata. It does not change the existing
Q_UNIX_PRINT/lp backend behavior and adds no CUPS dependency.
2026-05-29 17:13:47 +02:00
Mario Fetka
9f4f8fcbfe nwbind: implement NCP 17/4c list object relations
All checks were successful
Source release / source-package (push) Successful in 44s
Implement the Bindery "List Relations of an Object" endpoint.

Parse the NCP 17 subfunction 0x4c request, look up the requested bindery
object and set property, and return up to 32 related object IDs from the set
property value segments. Support the Novell last-seen cursor convention where
0xffffffff starts a new scan and subsequent calls continue after the last
returned object ID.

Add a small nwdbm helper for listing set-property members while preserving the
existing bindery property read-right checks. Reject wildcard object names with
the documented illegal-wildcard completion code.
2026-05-29 15:49:54 +02:00
Mario Fetka
e0fcd4809e nwbind: implement additional broadcast message calls
All checks were successful
Source release / source-package (push) Successful in 50s
Add the missing NCP 21 message service endpoints for disabling/enabling
broadcast reception and for the newer send/get broadcast message calls.

Track a per-connection broadcast_disabled flag and use a shared helper for
storing pending broadcast messages and notifying the target nwconn process.
The old NCP 21/00 send path now uses the same helper as the newer NCP 21/10
path.

Also improve UNKNOWN FUNCTION logging in nwconn.c by including the NCP type,
function and, where available, subfunction. This makes future missing-endpoint
logs easier to map back to SDK/NCP documentation.

Based on the existing MARS-NWE message handling, the old lwared broadcast
implementation, and the Novell WebSDK message service layouts.
2026-05-29 14:35:33 +02:00
Mario Fetka
3bf16d1e42 NCP22/25 modifierID
All checks were successful
Source release / source-package (push) Successful in 36s
2026-05-25 22:46:37 +02:00
Mario Fetka
cc144f60d0 NCP22/25 Create-Date/Create-Time/Creator-ID über xattr speichern
All checks were successful
Source release / source-package (push) Successful in 35s
2026-05-25 22:13:48 +02:00
Mario Fetka
b031402933 Archive-xattr-Patch
All checks were successful
Source release / source-package (push) Successful in 41s
2026-05-25 21:07:46 +02:00
Mario Fetka
cb63088676 Directory Rename/Move über NCP22/2E
All checks were successful
Source release / source-package (push) Successful in 37s
2026-05-25 18:13:31 +02:00
Mario Fetka
d9f7d226b9 fist implementation NCP23/F4 / F3
All checks were successful
Source release / source-package (push) Successful in 38s
2026-05-25 15:48:45 +02:00
Mario Fetka
0bc4a4b9c5 grant/revoke Request-Layout
All checks were successful
Source release / source-package (push) Successful in 46s
2026-05-25 14:11:06 +02:00
Mario Fetka
2c21eb77fd NCP22/4 Modify Maximum/Inherit Rights Mask
All checks were successful
Source release / source-package (push) Successful in 44s
2026-05-25 13:12:19 +02:00
Mario Fetka
e817405919 feat: add DOS long-name alias support 2026-05-24 00:50:32 +02:00
Mario Fetka
279231550b Add missing ipx header and fix xsockrt and ftrustee build issues 2026-04-20 23:39:42 +02:00
Mario Fetka
33d1da469a Tighten string helper prototypes and quiet pointer-sign warnings 2026-04-20 23:39:42 +02:00
Mario Fetka
f0bfd5a641 Clean up emutli warnings and libc feature macros 2026-04-20 23:39:42 +02:00
Mario Fetka
368b36eb95 Fix 64-bit filesystem and type handling 2026-04-20 23:39:42 +02:00
Mario Fetka
37171bcc17 update release fix cmake 2023-05-31 20:55:37 +02:00
Mario Fetka
1b91c1effe fix syslog 2023-05-31 19:06:51 +02:00
Mario Fetka
7bd5845990 Make it work on 32bit 2013-11-05 12:41:14 +01:00
Mario Fetka
35d12ee7aa Update to pld patches and integrate koan patch 2013-11-05 11:54:31 +01:00
Mario Fetka
be2d60525a update patches 2011-11-14 19:58:21 +01:00
Mario Fetka
53086a5b03 correct bug https://bugzilla.novell.com/show_bug.cgi?id=692201 2011-11-13 21:50:34 +01:00
Mario Fetka
0fbc9baf41 Restructure for camke build 2011-11-13 17:37:22 +01:00