grant/revoke Request-Layout
All checks were successful
Source release / source-package (push) Successful in 46s
All checks were successful
Source release / source-package (push) Successful in 46s
This commit is contained in:
@@ -2900,23 +2900,25 @@ int nw_set_dir_info(int dir_handle, uint8 *data, int len,
|
||||
|
||||
|
||||
int nw_modify_max_right_mask(int dir_handle, uint8 *data, int len,
|
||||
int max_rights)
|
||||
int grant_mask, int revoke_mask)
|
||||
{
|
||||
char unname[256];
|
||||
struct stat stbuff;
|
||||
NW_PATH nwpath;
|
||||
int old_mask;
|
||||
int new_mask;
|
||||
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);
|
||||
if (s_stat(unname, &stbuff, NULL) || !S_ISDIR(stbuff.st_mode))
|
||||
return(-0x9c);
|
||||
|
||||
old_mask = tru_get_inherited_mask(nwpath.volume, unname, &stbuff);
|
||||
new_mask = (old_mask | (grant_mask & 0xff)) & (~revoke_mask & 0xff);
|
||||
|
||||
return tru_set_inherited_mask(nwpath.volume, unname, &stbuff, new_mask);
|
||||
}
|
||||
|
||||
int nw_scan_user_trustee(int volume, int *sequence, uint32 id,
|
||||
|
||||
Reference in New Issue
Block a user