diff --git a/doc/man-pages/pod1/fs_flushall.pod b/doc/man-pages/pod1/fs_flushall.pod index 38a9144611..cccbcd4552 100644 --- a/doc/man-pages/pod1/fs_flushall.pod +++ b/doc/man-pages/pod1/fs_flushall.pod @@ -42,7 +42,7 @@ as follows: =head1 PRIVILEGE REQUIRED -No special privileges are required for this command. +The issuer must be logged in as the local superuser C. =head1 SEE ALSO diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 17b9e0860e..1b304b5481 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -3680,6 +3680,7 @@ DECL_PIOCTL(PFlushVolumeData) * * \retval EINVAL Error if some of the standard args aren't set * \retval EIO Error if the afs daemon hasn't started yet + * \retval EACCES Error if the user doesn't have super-user credentials * * \post * Flush all cached contents. Exactly what stays and what @@ -3697,6 +3698,9 @@ DECL_PIOCTL(PFlushAllVolumeData) if (!afs_resourceinit_flag) /* afs daemons haven't started yet */ return EIO; /* Inappropriate ioctl for device */ + if (!afs_osi_suser(*acred)) + return EACCES; + return FlushVolumeData(NULL, *acred); }