AUD_END);
}
} else { /* a store operation */
+ if (readonlyServer) {
+ return (VREADONLY);
+ }
if ((rights & PRSFS_INSERT) && OWNSp(client, targetptr)
&& (CallingRoutine != CHK_STOREACL)
&& (targetptr->disk.type == vFile)) {
* unless you are a system administrator */
/****** InStatus->Owner && UnixModeBits better be SET!! */
if (CHOWN(InStatus, targetptr) || CHGRP(InStatus, targetptr)) {
- if (readonlyServer)
- return (VREADONLY);
- else if (VanillaUser(client))
+ if (VanillaUser(client))
return (EPERM); /* Was EACCES */
else
osi_audit(PrivilegeEvent, 0, AUD_ID,
(client ? client->z.ViceId : 0), AUD_INT,
CallingRoutine, AUD_END);
} else {
- if (readonlyServer) {
- return (VREADONLY);
- }
if (CallingRoutine == CHK_STOREACL) {
if (!(rights & PRSFS_ADMINISTER)
&& !VolumeOwner(client, targetptr))
/* watch for chowns and chgrps */
if (CHOWN(InStatus, targetptr)
|| CHGRP(InStatus, targetptr)) {
- if (readonlyServer)
- return (VREADONLY);
- else if (VanillaUser(client))
+ if (VanillaUser(client))
return (EPERM); /* Was EACCES */
else
osi_audit(PrivilegeEvent, 0, AUD_ID,
#else
(InStatus->UnixModeBits & (S_ISUID | S_ISGID)) != 0) {
#endif
- if (readonlyServer)
- return (VREADONLY);
if (VanillaUser(client))
return (EACCES);
else
CallingRoutine, AUD_END);
}
if (CallingRoutine == CHK_STOREDATA) {
- if (readonlyServer)
- return (VREADONLY);
if (!(rights & PRSFS_WRITE))
return (EACCES);
/* Next thing is tricky. We want to prevent people
#endif
if ((targetptr->disk.type != vDirectory)
&& (!(targetptr->disk.modeBits & OWNERWRITE))) {
- if (readonlyServer)
- return (VREADONLY);
if (VanillaUser(client))
return (EACCES);
else
AUD_INT, CallingRoutine, AUD_END);
}
} else { /* a status store */
- if (readonlyServer)
- return (VREADONLY);
if (targetptr->disk.type == vDirectory) {
if (!(rights & PRSFS_DELETE)
&& !(rights & PRSFS_INSERT))