NCP22/4 Modify Maximum/Inherit Rights Mask
All checks were successful
Source release / source-package (push) Successful in 44s
All checks were successful
Source release / source-package (push) Successful in 44s
This commit is contained in:
@@ -2898,6 +2898,27 @@ int nw_set_dir_info(int dir_handle, uint8 *data, int len,
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
||||
int nw_modify_max_right_mask(int dir_handle, uint8 *data, int len,
|
||||
int max_rights)
|
||||
{
|
||||
char unname[256];
|
||||
struct stat stbuff;
|
||||
NW_PATH nwpath;
|
||||
int result = conn_get_kpl_path(&nwpath, &stbuff, dir_handle, data, len, 0);
|
||||
|
||||
if (result < 0) return(result);
|
||||
|
||||
xstrcpy(unname, build_unix_name(&nwpath, 0));
|
||||
if (s_stat(unname, &stbuff, NULL) || !S_ISDIR(stbuff.st_mode)) {
|
||||
result = -0x9c;
|
||||
} else {
|
||||
result = tru_set_inherited_mask(nwpath.volume, unname,
|
||||
&stbuff, max_rights);
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
||||
int nw_scan_user_trustee(int volume, int *sequence, uint32 id,
|
||||
int *access_mask, uint8 *path)
|
||||
{
|
||||
|
||||
19
src/nwconn.c
19
src/nwconn.c
@@ -608,10 +608,23 @@ static int handle_ncp_serv(void)
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x4 : { /* Modify Max Right MAsk */
|
||||
case 0x4 : { /* Modify Max Right Mask */
|
||||
/******** MODIFY MAX RIGHT MASK ****************/
|
||||
/* NO REPLY !! */
|
||||
completition = 0xfb; /* TODO */
|
||||
/*
|
||||
* Request:
|
||||
* byte directory handle
|
||||
* byte maximum/inherited rights mask
|
||||
* byte path length
|
||||
* byte path[path length]
|
||||
*
|
||||
* No reply data.
|
||||
*/
|
||||
int result = nw_modify_max_right_mask(
|
||||
(int)*(p+1),
|
||||
p+4,
|
||||
(int)*(p+3),
|
||||
(int)*(p+2));
|
||||
if (result) completition = (uint8)-result;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user