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.
132 lines
4.7 KiB
C
132 lines
4.7 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);
|
|
|
|
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
|