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.
Stop logging the build_base NW_HPATH component buffer as a raw C string.
The path buffer is length-prefixed and not NUL-terminated. Printing it with %s
can over-read into following packet or process memory and pollute unrelated
client/test output, for example ZIP output appearing inside MAPDEBUG lines.
Use the safe NW_HPATH component formatter for the build_base ENTER log line as
well as individual component debug output.
No protocol behavior change.
Stop logging NW_HPATH path component buffers with %s in MAPDEBUG output.
The namespace path buffer is not a NUL-terminated C string. It contains a list
of length-prefixed components, so printing it directly can over-read into
following packet or process memory and pollute unrelated client/test output.
Add small debug formatters for complete NW_HPATH component lists and individual
components, and use them in build_base/add_hpath_to_nwpath debug messages.
No protocol behavior change.
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.
Novell NCOPY can allocate temporary directory handles while checking
effective directory rights before copying. On long-running test runs the
temporary directory handle table may already contain stale entries, causing
Allocate Temporary Directory Handle to fail with -0x9d / "no directory
handles". NCOPY then falls back to relative GetEffectiveRights requests that
fail and reports:
NWGetEffectiveDirectoryRights returned an error.
Restore recycling of stale temporary directory handles in xinsert_new_dir().
Free slots are still preferred. If none are available and the caller requests
a temporary handle, recycle the oldest temporary handle for the same task first,
then the oldest temporary handle globally. Permanent directory handles are not
recycled.
This matches the expected NetWare-style behaviour for temporary handles and
allows NCOPY-style allocate-temp-handle / get-effective-rights flows to keep
working after repeated tests.
Keep the server information fields semantically distinct after replacing
the legacy KOAN/14-Jun-03 strings.
The revision string now reports the Mars NWE release version, for
example:
Mars NWE 0.99.pl28
and the separate revision-date field is populated from a CMake-provided
build date in the traditional NetWare-style format, for example:
27-May-26
The build date can be overridden through CMake for reproducible builds;
otherwise it defaults to the current UTC build date.
Replace the old hard-coded server description date with a Mars NWE
version string built from the existing _VERS_H_, _VERS_L_ and _VERS_P_
build macros.
WHOAMI and similar clients display this value in the line:
Server <name> is running <description>.
Instead of reporting the legacy fixed value "14-Jun-03", the server now
reports a stable release-style description such as:
mars-nwe-0.99.pl28
Also advance the response buffer after writing the revision string so the
description field does not overwrite the previous field.
Add a shared MAINTAINER_BUILD CMake option for maintainer-only helpers
and diagnostics.
The option is disabled by default and is intended for development and
compatibility testing only. When enabled, it defines MAINTAINER_BUILD for
the build so server-side diagnostic code can be guarded behind the same
switch used by the DOS tools submodule.
This keeps extra NCP tracing and test-only support out of normal builds
while allowing both mars_nwe and dostools to use one common maintainer
mode.
Keep the Supervisor trustee bit when converting rights between the
internal v3 representation and the NCP22 wire format.
Mars calculated effective rights with the Supervisor bit set, for
example 0x01ff, but the NCP22 conversion collapsed the result to
0x00ff before returning it to DOS clients. As a result Novell RIGHTS
showed only:
[ RWCEMFA]
instead of the expected:
[SRWCEMFA]
Map the old Open right to bit 0x0004 and keep Supervisor on bit 0x0100
in both conversion directions so NCP22/3 and NCP22/42 preserve the full
effective rights mask.
Update the default net$log.dat template to map the standard search
drives with explicit DOS drive letters, matching the visible layout of
a Novell login more closely.
The default login script now maps:
F: -> SYS:SYSTEM
S1: -> Z:SYS:PUBLIC
S2: -> Y:SYS:
This makes MAP show the network search drives as Z: and Y: entries
instead of only adding SYS:PUBLIC and SYS: as unnamed search mappings.
Apply the ignore-case volume option when preparing the SYS:LOGIN
directory path during connection setup.
With SYS configured as `itO`, the installed tree may use lowercase
Unix directories such as `login/`, but the connection code still tried
to stat the hard-coded uppercase `LOGIN/` path. This caused new client
connections to abort with:
Stat error LOGIN Directory, Abort !!: No such file or directory
UnixPath=`.../SYS/LOGIN/`
Treat `VOL_OPTION_IGNCASE` like `VOL_OPTION_DOWNSHIFT` for this path so
the login directory is resolved as `login/` on ignore-case volumes.
Update the default net$log.dat template to use the same basic drive
layout as a standard Novell login script.
The default login now maps:
F: -> SYS:SYSTEM
S1: -> SYS:PUBLIC
S2: -> SYS:
This keeps the visible login result closer to Novell NetWare while
leaving the surrounding sample/login text intact.
Treat the `i` volume option like `k` when choosing the Unix-side
case for the automatically created SYS directories.
With a volume configured as `itO` (ignore case, trustees, OS/2 LFN),
the server currently recreates uppercase directories such as LOGIN,
PUBLIC, SYSTEM and MAIL on startup, even when the installed tree uses
lowercase login/public/system/mail. This leaves duplicate host
directories that appear as ambiguous entries from DOS clients.
Use lowercase Unix names for the auto-created SYS directories when
the volume is configured either as downshift (`k`) or ignore-case (`i`).
NCP22 uses bit 0x80 for Modify. MARS internally uses the same bit for
TRUSTEE_M, while Supervisor is represented internally as TRUSTEE_S at 0x100.
Only the Supervisor/Open bit needs translation.
The previous conversion mapped NCP22 0x80 incorrectly, causing GRANT M from
Novell tools to be stored without TRUSTEE_M internally. As a result, users with
directory Modify rights could not rename files even though NDIR/RIGHTS displayed
the rights as expected.
Align rename permission checks with NetWare trustee semantics. A same-directory
rename should be controlled by the Modify right instead of requiring a broader
R/W/M combination. For moves to another parent directory, require Create rights
on the destination parent.
Also invalidate the trustee rights cache after adding or deleting trustee
assignments so newly granted rights are visible immediately to subsequent
operations.
This fixes the MARIO trustee test where rename failed with R/W/M/F and even
R/W/C/E/M/F, while the same operation succeeded only with the broader all-rights
set.
Handle failures from seteuid(0) in su_quotactl() before calling
quotactl(). This fixes the warn_unused_result compiler warning and
returns an error to the quota caller if privilege elevation fails.
Keep the existing MARS debug logging switch separate from compiler
debug flags. ENABLE_DEBUG still controls the legacy DO_DEBUG/XDPRINTF
code paths, while the new ENABLE_DEBUG_BUILD option enables a real
debug build with -g3, -O0 and -fno-omit-frame-pointer.
When ENABLE_DEBUG_BUILD is set on single-config generators, CMake also
forces CMAKE_BUILD_TYPE=Debug so gdb/valgrind builds can be enabled
without manually passing compiler flags.
Add a FindQuota.cmake module that checks for the Linux quota headers and
symbols required by the MARS NWE quota backend. Prefer modern
<sys/quota.h> with quotactl(), and keep <linux/quota.h> as fallback for
older systems.
Enable quota support by default, but only compile it in when the required
headers and quota symbols are available. Also move the QTAINSYS define to
the detected sys/quota.h path so modern Linux builds use the correct
header automatically.
SYSCON reads volume/disk restrictions before opening the edit dialog.
For volumes that do not map to a quota-capable block device, such as
HOME on /home, the old code returned an error during the read path.
This made SYSCON abort with error -30312 before the user could even see
the restriction state.
Treat read requests on volumes without a quota backend as unrestricted:
return success with an unlimited quota and zero usage. Removing a
restriction on such a volume is also treated as a successful no-op.
Setting a non-zero restriction still fails, so admin tools do not report
a quota as enforced when no Linux quota backend exists.