diff --git a/src/connect.c b/src/connect.c index dec95b8..59e408f 100644 --- a/src/connect.c +++ b/src/connect.c @@ -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) { diff --git a/src/namspace.c b/src/namspace.c index 105d297..5d87cc6 100644 --- a/src/namspace.c +++ b/src/namspace.c @@ -2643,7 +2643,7 @@ static int nw_modify_file_dir(int namespace, xfree(uname); return(0); /* do nothing but report OK */ } - if (!tru_eff_rights_exists(dbe->nwpath.volume, uname, stb, + if (tru_eff_rights_exists(dbe->nwpath.volume, uname, stb, TRUSTEE_M)) result=-0x8c; /* no modify rights */ if (!result && (infomask & DOS_MSK_ATTRIBUTE)){ @@ -2651,7 +2651,7 @@ static int nw_modify_file_dir(int namespace, GET_32(dmi->attributes)); } if ( (!result) && (infomask & DOS_MSK_INHERIT_RIGHTS) - && tru_eff_rights_exists(dbe->nwpath.volume, uname, stb, TRUSTEE_A) ) { + && !tru_eff_rights_exists(dbe->nwpath.volume, uname, stb, TRUSTEE_A) ) { int mask = tru_get_inherited_mask(dbe->nwpath.volume, uname, stb); int grantmask = GET_16(dmi->rightsgrantmask); int revokemask = GET_16(dmi->rightsrevokemask); @@ -2663,7 +2663,7 @@ static int nw_modify_file_dir(int namespace, } if ((!result) && (infomask & DOS_MSK_MAX_SPACE)) { if (S_ISDIR(stb->st_mode)) { - if (!tru_eff_rights_exists(dbe->nwpath.volume, uname, stb, TRUSTEE_M)) + if (tru_eff_rights_exists(dbe->nwpath.volume, uname, stb, TRUSTEE_M)) result=-0x8c; else result=nsp_set_dir_quota_metadata((const char*)uname, diff --git a/src/nwattrib.c b/src/nwattrib.c index b227864..0096e5b 100644 --- a/src/nwattrib.c +++ b/src/nwattrib.c @@ -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)) {