Commit Graph

6 Commits

Author SHA1 Message Date
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