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.
41 lines
1.6 KiB
C
41 lines
1.6 KiB
C
#ifndef TRUSTEE_H
|
|
#define TRUSTEE_H
|
|
|
|
#define TRUSTEE_BINDERY_USER 0x0001
|
|
#define TRUSTEE_BINDERY_GROUP 0x0002
|
|
|
|
#define TRUSTEE_RIGHT_READ 0x0001
|
|
#define TRUSTEE_RIGHT_WRITE 0x0002
|
|
#define TRUSTEE_RIGHT_OPEN 0x0004
|
|
#define TRUSTEE_RIGHT_CREATE 0x0008
|
|
#define TRUSTEE_RIGHT_DELETE 0x0010
|
|
#define TRUSTEE_RIGHT_OWNER 0x0020
|
|
#define TRUSTEE_RIGHT_SEARCH 0x0040
|
|
#define TRUSTEE_RIGHT_MODIFY 0x0080
|
|
#define TRUSTEE_RIGHT_SUPER 0x0100
|
|
|
|
#define TRUSTEE_RIGHT_ALL_386 (TRUSTEE_RIGHT_SUPER | TRUSTEE_RIGHT_READ | \
|
|
TRUSTEE_RIGHT_WRITE | TRUSTEE_RIGHT_CREATE | \
|
|
TRUSTEE_RIGHT_DELETE | TRUSTEE_RIGHT_MODIFY | \
|
|
TRUSTEE_RIGHT_SEARCH | TRUSTEE_RIGHT_OWNER)
|
|
|
|
int trustee_same(char *a, char *b);
|
|
int trustee_is_help(char *s);
|
|
int trustee_is_option(char *s);
|
|
int trustee_is_subdirs_option(char *s);
|
|
int trustee_is_files_option(char *s);
|
|
int trustee_current_dhandle(uint8 *connid, uint8 *dhandle);
|
|
void trustee_upcopy(char *dst, char *src, int max);
|
|
void trustee_basename(char *dst, char *src, int max);
|
|
void trustee_header_path(char *out, char *path, int max);
|
|
void trustee_join_path(char *out, char *base, char *name, int max);
|
|
int trustee_is_dot_dir(char *name);
|
|
int trustee_parse_right_word(char *s, uint16 *rights);
|
|
void trustee_rights_bracket(uint16 rights, char *out);
|
|
uint32 trustee_lookup_object(char *name, uint16 *objtype, int objtype_given);
|
|
int trustee_path_is_dir(char *path);
|
|
int trustee_path_has_wildcards(char *path);
|
|
void trustee_parent_pattern(char *dir, char *pattern, char *path, int maxdir, int maxpat);
|
|
|
|
#endif
|