rights: fix modify checks for DOS attribute updates
All checks were successful
Source release / source-package (push) Successful in 1m11s

This commit is contained in:
OpenAI
2026-06-10 20:07:58 +00:00
committed by Mario Fetka
parent 4cddc54962
commit 1df94ae08a
2 changed files with 2 additions and 2 deletions

View File

@@ -1896,7 +1896,7 @@ static int do_set_file_info(NW_PATH *nwpath, FUNC_SEARCH *fs)
if (!stat(unname, &statb)) {
if (S_ISFIFO(statb.st_mode) || (voloptions&VOL_OPTION_IS_PIPE))
return(0); /* do nothing but report OK */
if (tru_eff_rights_exists(nwpath->volume, unname, &statb, TRUSTEE_M))
if (!tru_eff_rights_exists(nwpath->volume, unname, &statb, TRUSTEE_M))
result=-0x8c; /* no modify rights */
} else result=-0xff;
if (!result) {

View File

@@ -221,7 +221,7 @@ static int set_nw_attrib(
int voloptions=get_volume_options(volume);
if (voloptions & VOL_OPTION_IS_PIPE)
return(0); /* we return with no error */
if (tru_eff_rights_exists(volume, unixname, stb, TRUSTEE_M))
if (!tru_eff_rights_exists(volume, unixname, stb, TRUSTEE_M))
return(-0x8c); /* no modify rights */
if (!(voloptions & VOL_OPTION_ATTRIBUTES)) {
if (!(get_unix_eff_rights(stb) & W_OK)) {