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.
This commit is contained in:
Mario Fetka
2026-05-28 07:54:41 +02:00
parent 0fa4a6f700
commit 5da600c2a5
23 changed files with 2653 additions and 659 deletions

View File

@@ -1,46 +1,38 @@
# REMOVE baseline test
# REMOVE comparison test
`RMVSTA.BAT` captures Novell `\NPUBLIC\REMOVE` behavior for trustee removal.
`RMVSTA.BAT` compares Novell `\NPUBLIC\REMOVE` against the public implementation `\PUBLIC\REMOVE`.
Run as `SUPERVISOR` or a user with Access Control rights:
Run as `SUPERVISOR` or equivalent. The automatic NOPASSUSER readback needs the maintainer `LOGIN /PWD:` support and `DLYSTRT`:
```bat
SET LGNTPWD=your-supervisor-password
F:
CD \
RMVSTA
```
`RMVSTA` performs a direct comparison first:
```text
F:\RMVCMP\OUT Novell baseline with \NPUBLIC\REMOVE
F:\RMVCMP\PUBOUT public implementation with \PUBLIC\REMOVE
F:\RMVCMP\COMPARE.LOG
```
Then it starts `C:\RMVTMP\RMVC.BAT` through `DLYSTRT`. The helper logs in as `NOPASSUSER` and captures effective-rights readback after the public REMOVE operations:
```text
F:\RMVCMP\UNOV \NPUBLIC\RIGHTS as NOPASSUSER
F:\RMVCMP\UPUB \PUBLIC\RIGHTS as NOPASSUSER
F:\RMVCMP\UCOMP.LOG
```
The matrix covers single trustee rights, mixed rights, `S`, `ALL`, `N`, file trustees with `/FILES`, and recursive removal with `/SUBDIRS`.
`RMVZIP.BAT` is intentionally manual. Run it after inspecting the results:
```bat
RMVZIP
```
Result directory:
```text
F:\RMVCMP
```
Test directory:
```text
F:\RMVTEST
```
The setup uses `\NPUBLIC\GRANT` to create trustees for user `MARIO`, then runs `\NPUBLIC\REMOVE` for the baseline.
Note: Novell `REMOVE` help names the recursive option `/Subdirs`; this test uses `/SUBDIRS`, not `/SUBDIRECTORIES`.
Captured cases:
- `D01` help / usage
- `D02` no arguments
- `D10` remove `USER MARIO` from a directory
- `D11` remove `MARIO` without the explicit `USER` keyword
- `D20` `/SUBDIRS`
- `D21` `/FILES` on an explicit file
- `D22` `/FILES` on all files in a directory
- `D30` relative path from `F:\RMVTEST`
- `D90` no trustee
- `D91` missing user
- `D92` missing path
- `D93` `/FILES` and `/SUBDIRS` together
- `D94` bad grammar
`RMVZIP.BAT` packages `RUN.LOG`, `SUMMARY.TXT`, `OUT`, and `SETUP`, then removes the generated `F:\RMVTEST` tree so the SYS root does not accumulate test directories.
The ZIP step packages `OUT`, `PUBOUT`, `UNOV`, `UPUB`, setup logs, comparison logs, and then removes the generated `F:\RMVTEST` and `C:\RMVTMP` trees.