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
170 lines
6.1 KiB
C
170 lines
6.1 KiB
C
/* c32ncp.h - minimal Client32 NCP helpers for mars-dosutils */
|
|
|
|
#ifndef C32NCP_H
|
|
#define C32NCP_H
|
|
int c32_get_ncp_handle(uint16 *handle_lo, uint16 *handle_hi);
|
|
|
|
|
|
typedef struct c32_nwfile_handle6 {
|
|
uint8 h[6];
|
|
} C32_NWFILE_HANDLE6;
|
|
|
|
#define C32_OC_MODE_OPEN 0x01
|
|
#define C32_OC_MODE_TRUNCATE 0x02
|
|
#define C32_OC_MODE_CREATE 0x08
|
|
|
|
#define C32_DAR_READ 0x0001
|
|
#define C32_DAR_WRITE 0x0002
|
|
#define C32_DAR_DENY_READ 0x0004
|
|
#define C32_DAR_DENY_WRITE 0x0008
|
|
#define C32_DAR_COMPAT 0x0010
|
|
|
|
int c32_ncp87_open_create_file(const char *path_name,
|
|
uint16 dir_handle,
|
|
uint8 open_create_mode,
|
|
uint32 create_attrs,
|
|
uint16 desired_access,
|
|
uint16 search_attrs,
|
|
C32_NWFILE_HANDLE6 *handle_out,
|
|
uint32 *file_size_out,
|
|
uint8 *open_create_action_out,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
int c32_ncp74_file_server_copy(const C32_NWFILE_HANDLE6 *src,
|
|
const C32_NWFILE_HANDLE6 *dst,
|
|
uint32 src_offset,
|
|
uint32 dst_offset,
|
|
uint32 count,
|
|
uint32 *copied_out);
|
|
|
|
int c32_ncp66_close_file(const C32_NWFILE_HANDLE6 *handle);
|
|
|
|
|
|
int c32_ncp87_obtain_rim_attributes(const char *name,
|
|
uint16 dir_handle,
|
|
uint32 *attr_out,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
|
|
typedef struct c32_dos_modify_info {
|
|
uint32 attributes;
|
|
uint16 creation_time;
|
|
uint16 creation_date;
|
|
uint32 creator_id;
|
|
uint16 modify_time;
|
|
uint16 modify_date;
|
|
uint32 modifier_id;
|
|
uint16 last_access_date;
|
|
uint16 archive_time;
|
|
uint16 archive_date;
|
|
uint32 archiver_id;
|
|
uint16 inherited_rights;
|
|
uint32 maximum_space;
|
|
} C32_DOS_MODIFY_INFO;
|
|
|
|
typedef struct c32_ndir_info {
|
|
uint32 space_allocated;
|
|
uint32 attributes;
|
|
uint16 flags;
|
|
uint32 data_size;
|
|
uint32 total_size;
|
|
uint16 number_of_streams;
|
|
uint16 creation_time;
|
|
uint16 creation_date;
|
|
uint32 creator_id;
|
|
uint16 modify_time;
|
|
uint16 modify_date;
|
|
uint32 modifier_id;
|
|
uint16 last_access_date;
|
|
uint16 archive_time;
|
|
uint16 archive_date;
|
|
uint32 archiver_id;
|
|
uint16 inherited_rights;
|
|
uint32 dir_ent_num;
|
|
uint32 dos_dir_num;
|
|
uint32 vol_number;
|
|
uint32 ea_data_size;
|
|
uint32 ea_key_count;
|
|
uint32 ea_key_size;
|
|
uint32 ns_creator;
|
|
uint8 name_len;
|
|
char name[256];
|
|
} C32_NDIR_INFO;
|
|
|
|
int c32_ncp87_obtain_ndir_info(const char *path_name,
|
|
uint16 dir_handle,
|
|
C32_NDIR_INFO *info_out,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
|
|
int c32_ncp87_modify_dos_attributes(char *name,
|
|
uint16 dir_handle,
|
|
uint32 attrs,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
int c32_ncp87_modify_dos_info(const char *name,
|
|
uint16 dir_handle,
|
|
uint32 change_mask,
|
|
C32_DOS_MODIFY_INFO *info,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
int c32_ncp87_get_effective_rights(const char *path,
|
|
uint16 dir_handle,
|
|
uint16 *rights_out,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
|
|
int c32_ncp87_get_effective_rights_by_dirent(uint8 vol_number,
|
|
uint32 dos_dir_number,
|
|
uint16 *rights_out,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
int c32_ncp87_add_trustee_rights(const char *path_name,
|
|
uint16 dir_handle,
|
|
uint32 object_id,
|
|
uint16 rights,
|
|
uint16 rights_mask,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
int c32_ncp22_set_trustee_rights(const char *path_name,
|
|
uint16 dir_handle,
|
|
uint32 object_id,
|
|
uint16 rights);
|
|
|
|
int c32_ncp22_delete_trustee_rights(const char *path_name,
|
|
uint16 dir_handle,
|
|
uint32 object_id);
|
|
|
|
int c32_ncp87_find_trustee_rights(const char *path_name,
|
|
uint16 dir_handle,
|
|
uint32 object_id,
|
|
uint16 *rights_out,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
int c32_ncp87_delete_trustee_rights(const char *path_name,
|
|
uint16 dir_handle,
|
|
uint32 object_id,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
#endif
|