Commit Graph

8 Commits

Author SHA1 Message Date
Mario Fetka
34ec41e760 trustee: share trustee header path formatting
Move the shared GRANT/REMOVE/REVOKE header path formatting into trustee.c.

The Novell trustee tools display the server and volume separator as
SERVER/SYS: while keeping the remaining path separators as DOS backslashes.
Use one trustee_header_path() helper for that formatting instead of keeping
separate local copies in GRANT, REMOVE and REVOKE.

No behavior change.
2026-05-29 12:33:32 +02:00
Mario Fetka
f3e77819d8 dosutils: use shared option helper functions
Replace small local option helper wrappers with the shared tools.c helpers.

SLIST now uses tool_is_help_arg() directly, and REMOVE/REVOKE use
tool_is_files_option() and tool_is_subdirs_option() instead of Trustee-specific
wrappers. This keeps trustee.c focused on Rights/Trustee behavior and leaves
generic command-line option handling in tools.c.

No behavior change.
2026-05-29 12:27:02 +02:00
Mario Fetka
3740e1450c ncpapi: rename c32ncp files to NCP API names
Finish the c32ncp.c/c32ncp.h to ncpapi.c/ncpapi.h rename.

Update the build files, include directives, dependency tracking, header guard,
README references and file-level comments to use the new ncpapi naming. This
matches the current split where ncpapi contains the ncpXX_YY_* protocol API
wrappers and ncpcall contains the lower-level requester/transport helpers.

No behavior change.
2026-05-29 11:48:03 +02:00
Mario Fetka
7c1499a16c ncpapi: use protocol names for NCP wrapper functions
Rename the public NCP wrapper functions in c32ncp.c/c32ncp.h from c32_ncp*
implementation-oriented names to protocol-oriented ncpXX_YY_* names.

This prepares the code for a later c32ncp.c/c32ncp.h -> ncpapi.c/ncpapi.h
file rename while keeping the current file names unchanged for now. The new
names keep the NCP function/subfunction visible and describe the operation
performed by each wrapper.

Update all callers to use the new names. Transport-specific helpers such as
c32_get_ncp_handle() are left unchanged.

No behavior change.
2026-05-29 10:50:05 +02:00
Mario Fetka
9ef8aeccc0 trustee: use shared tool helpers for generic path handling
Remove generic wrapper helpers from trustee.c and switch GRANT/REMOVE/REVOKE
callers to the shared tools.c helpers directly.

Keep trustee.c focused on Trustee/Rights-specific behavior such as option
parsing, rights parsing/formatting, object lookup and trustee path handling.
The generic string, current directory handle, uppercase and path helper logic
now lives in tools.c where it can be reused by other DOS utilities.
2026-05-29 09:44:14 +02:00
Mario Fetka
50524cf759 dosutils: add GPL-2 headers and file descriptions
Add GPL-2-or-later license headers to the DOS utility source files and
document the purpose and local dependencies of each C, header and assembler
file.

Preserve the original Martin Stover copyright attribution for the historic
MARS-NWE utility sources, including files that did not previously carry an
explicit header but are part of the original tool set. Add Mario Fetka as the
2026 copyright holder for the current maintenance work, and use Mario-only
headers for files without original Martin Stover ownership.

Also add a root-level COPYING file containing the GPL-2 license text.
2026-05-29 08:07:09 +02:00
Mario Fetka
4a952b4c4c dosutils: align Novell-compatible tests and stage NCOPY work
Update the DOS utilities and test suite with the current Novell comparison
state.

Validated/updated tool behavior:
- improve CREATOR output by showing Novell-style attribute and rights masks
- extend FLAGDIR handling with old NCP22 directory attribute read/write
  fallback paths
- expand NDIR Novell-style formatting, filtering, /SUB handling, date output,
  DI/RI attribute display and richer metadata collection
- adjust REVOKE output/grammar, recursive /SUBDIRECTORIES behavior and trustee
  update/delete paths to better match Novell tools
- adjust SLIST header/output behavior for logged-in and logged-out cases
- update README status to reflect the currently green/tested tools

Test-suite changes:
- add/refresh Novell comparison tests for CREATOR, NDIR, REVOKE and SLIST
- update NCOPY tests and collection scripts for the current investigation state
- refresh per-tool README files and top-level test documentation
- keep MAP documented as still separately open

NCOPY:
- add the current NCOPY implementation and experimental NCP74/server-side-copy
  scaffolding
- build ncopy.c so it stays compile-tested
- keep NCOPY disabled in the NET multicall dispatch for now because the
  server-side-copy/open-handle path is still unsafe and needs further analysis

Build:
- include ncopy.c in the DOS utility build
- drop the temporary MARS_DOSUTILS_VERSION define wiring from CMake
2026-05-29 07:40:04 +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