viced: prevent writes on readonly fileservers 34/13934/3
authorMarcio Barbosa <mbarbosa@sinenomine.net>
Thu, 14 Nov 2019 04:15:47 +0000 (01:15 -0300)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 29 Nov 2019 16:51:41 +0000 (11:51 -0500)
commit0593017177edd5b3bc6609d9dfcce55f15bba3e9
treef5ba275707998af7afdfd4ce9c9634d425954326
parent2ae2a15c9dc9b26eaa15964cc96fdeeb6d82c74c
viced: prevent writes on readonly fileservers

Currently, a fileserver can be initialized as readonly. In this mode,
writes on this server should not be allowed. Unfortunately, updates on
files stored by readonly fileservers are not completely prevented. In
some situations, the check for RO server is omitted (e.g. if the user is
the owner of the file to be updated). In other situations, the same
check is redundant.

To fix these problems, consolidate this check in one place.

Change-Id: Id53e15216404dfe691a87c7b4964ff08924c262c
Reviewed-on: https://gerrit.openafs.org/13934
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
src/viced/afsfileprocs.c