Commit Graph

10 Commits

Author SHA1 Message Date
Mario Fetka
5da600c2a5 dosutils: match Novell paths for flags and trustees
Move FLAG, GRANT and REMOVE closer to the request paths used by the
Novell tools and extend the DOS comparison tests.

FLAG now reads attributes through the old NCP22 directory scan path and
writes them through NCP22/25 Set Directory/File Information. This keeps
extended attributes such as Delete Inhibit and Rename Inhibit intact and
matches the Novell behavior observed in the server logs.

GRANT now prefers NCP22/27 SetTrustee with an NCP87 fallback. Supervisor
rights are expanded like Novell does, so granting S sends and reports the
full SRWCEMFA mask. The visible output, path formatting and error text
are adjusted to match the Novell baseline.

REMOVE now prefers NCP22/2B DelTrustee with an NCP87 fallback. The
DelTrustee request layout is corrected, /SUBDIRS handling is aligned
with Novell, and the output/error text is matched to the baseline.

The FLAG, FLAGDIR, GRANT and REMOVE tests now compare NPUBLIC baselines
against the PUBLIC implementations and add delayed NOPASSUSER readback
checks using DLYSTRT and the maintainer LOGIN password option.
2026-05-28 07:54:41 +02:00
Mario Fetka
4ad455c6df dosutils: add maintainer helpers and compare-ready tools
Add maintainer-only support used by the automated DOS compatibility
tests.

This introduces the MAINTAINER_BUILD option for the DOS tools. In
maintainer builds, LOGIN accepts the hidden /PWD: and /PASSWORD:
arguments for automated test relogin, and the DLYSTRT helper is built to
delay-start DOS batch files after the invoking batch has returned to the
prompt.

Add the WHOAMI utility and wire it into the NET command dispatch. Also
adjust SLIST and RIGHTS output to match Novell behavior more closely,
including server-not-found handling, path formatting, Supervisor rights,
missing-path errors and usage text.

Extend the test scripts to compare NPUBLIC Novell baselines against the
PUBLIC implementations. LOGIN/LOGOUT can now run automatically via
DLYSTRT and the maintainer LOGIN password option. RIGHTS gains an
additional NOPASSUSER effective-rights matrix that covers single rights,
mixed rights, Supervisor rights, ALL/N and file trustee cases.

Normal builds remain free of maintainer-only helpers and hidden password
handling.
2026-05-27 20:14:01 +02:00
Mario Fetka
0df41482c7 dosutils: add creator and supporting NCP helpers
Add the CREATOR utility and wire it into the DOS tools build and NET
command dispatch.

Extend the client-side NCP helpers with the calls needed by the new and
updated tools, including DOS namespace information and effective-rights
queries. Also update MAP handling for automatic drive mappings used by
the login script.

This commit contains the tool/source support only. The DOS baseline test
suite is kept separate and will be added in a follow-up commit.
2026-05-27 13:31:02 +02:00
Mario Fetka
6d2d3f367f dosutils: use NCP87 DOS info fields in NDIR
Add a Client32 NCP87 helper for obtaining DOS namespace file and
subdirectory information and use it in NDIR.

The new helper reads the classic NCP87 subfunction 6 RIM_ALL DOS info
block, including timestamps, inherited rights, directory identifiers and
size metadata.

Use the NCP87 inherited rights mask for the inherited-rights column while
keeping the existing Client32 effective-rights path for the effective
rights column.  Also use the NCP87 modify, archive, last-access and
creation date fields for the /DATES display, falling back to DOS
findfirst timestamps when the NCP87 info request is not available.

Tighten the /DATES layout so the full Created/Copied timestamp remains
within an 80-column DOS screen.
2026-05-25 09:17:56 +02:00
Mario Fetka
7117bfff68 dosutils: add Novell-style NDIR listing tool
Add an initial Novell-style NDIR implementation for the DOS utilities.

The new tool supports basic DOS namespace directory listings using
_dos_findfirst/_dos_findnext, including wildcard paths, current-directory
listing, files-only and directories-only modes, recursive /SUB listings,
continuous output and Novell-style help text.

NDIR separates file and directory output into Novell-like sections,
prints long NetWare-style attribute brackets, and reports both file bytes
and allocated bytes in blocks using a simple per-file 4 KiB block
approximation for the initial implementation.

Add initial /RIGHTS support.  The rights format displays rights columns
for files and directories, obtains effective rights through Client32
NCP87, and falls back to the older directory-handle effective-rights path
when needed.  For now the inherited-rights column uses the effective
rights value until a separate inherited-rights mask is available.

Add initial /DATES support with a Novell-style date column layout showing
Last Updated, Last Archived, Accessed and Created/Copied fields.  The
initial implementation uses the DOS findfirst update timestamp for the
available date values and placeholder archive/access values until full
NetWare namespace date fields are exposed.

Add /SHORT and /BRIEF as compact output modes for recursive listings and
manual testing.  These modes keep the useful values while suppressing the
large Novell-style section headers and empty recursive sections.

Wire NDIR into the multicall dispatcher, CMake build and install list,
and document the supported command forms in the README.

Owner display, true inherited-right masks, full namespace date fields,
sorting and restrictions remain future work.
2026-05-25 08:49:47 +02:00
Mario Fetka
c50202e93b dosutils: factor shared helpers and update README
Move common DOS utility helper code into tools.c and expose it through
net.h.  This removes duplicated command-local helpers from GRANT,
RIGHTS, FLAG, FLAGDIR and the trustee helper layer.

The shared helpers cover case-insensitive argument comparison, help and
option detection, /FILES and /SUBDIRS parsing, current network directory
handle lookup, current volume prefix formatting, uppercase DOS path
copying, basename/header-path handling, wildcard detection and simple
path joining/splitting.

Keep the command frontends smaller and less coupled so the current
multicall utility can later be split into smaller grouped multicall
binaries, such as trustee tools, login/session tools and file/flag
tools.

Update the DOS utilities README for the newer Client32 and trustee
commands.  Document RIGHTS, GRANT, REVOKE and REMOVE in the status,
feature, command and install sections.  Add command reference entries
for the trustee tools, including Novell-style syntax, supported rights,
recursive/file options and missing-trustee behavior.

Also mention the shared trustee helper layer and common tools.c helpers
used by the newer command frontends.
2026-05-24 20:45:56 +02:00
Mario Fetka
4cafe16980 dosutils: add Novell-style REVOKE and REMOVE trustee tools
Implement REVOKE and REMOVE for the Client32 DOS utilities.

REVOKE now supports Novell-style syntax:

  REVOKE rightslist* [FOR path] FROM [USER|GROUP] name [options]

and removes rights from explicit trustee assignments.  It scans the
trustee list first, updates the trustee rights mask, and deletes the
trustee entry when no rights remain.

REMOVE now supports Novell-style syntax:

  REMOVE [USER | GROUP] name [FROM path] [option]

and deletes explicit trustee assignments for users or groups.

Both tools support USER/GROUP lookup, /FILES, /SUBDIRS,
/SUBDIRECTORIES, wildcard file targets, recursive directory handling,
Novell-style help text and summary output.  Missing trustee entries are
reported with Novell-style "No trustee for the specified ..." messages.

Add shared trustee helpers and Client32 NCP87 trustee scan/delete
support.  Also adjust GRANT ALL so it matches Novell behavior by not
granting Supervisor implicitly; Supervisor must be granted explicitly.
2026-05-24 20:23:43 +02:00
Mario Fetka
456349088e Split DOS utility install between legacy and new binaries
Keep the previous DOS utility binary as netold.exe and use it as the
default source for legacy command names.  Install the new net.exe only for
tools that are not available in the legacy binary, currently SLIST, FLAG
and FLAGDIR.

Add CMake selection logic so maintainers can opt into installing the new
binary for all command names with MARS_NWE_INSTALL_NEW_DOSUTILS, while the
default install remains conservative for older NETX/DOSX-style setups.

Update the staged net.exe to the current Client32-enabled build and add
netold.exe as the preserved legacy binary.
2026-05-24 02:34:17 +02:00
Mario Fetka
f375f79cce mars_dosutils-0.10 2026-05-24 00:29:46 +02:00
Mario Fetka
5e6805dd31 mars_dosutils-0.01 2011-11-13 00:40:40 +01:00