Skip to contentSkip to conversation

nfsd: remove read permission bit for ctl sysctl

PATCH In review Petr Vorel 3 participants 3 messages Mar 13, 2020

Subsystems (2)
lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 nfsd: remove read permission bit for ctl sysctl

It's meant to be read only.

Fixes 89c905beccbb ("nfsd: allow forced expiration of NFSv4 clients")

---
Hi,

does not really fix anything, it's just confusing to have read permission bit when not used.

Kind regards,
Petr

 fs/nfsd/nfs4state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4state.c +1 -1
index 65cfe9ab47be..475ece438cfc 100644
@@ -2636,7 +2636,7 @@ static const struct file_operations client_ctl_fops = {
 static const struct tree_descr client_files[] = {
 	[0] = {"info", &client_info_fops, S_IRUSR},
 	[1] = {"states", &client_states_fops, S_IRUSR},
-	[2] = {"ctl", &client_ctl_fops, S_IRUSR|S_IWUSR},
+	[2] = {"ctl", &client_ctl_fops, S_IWUSR},
 	[3] = {""},
 };
 
Signature · 1 line
2.16.4
#1 lore raw
Quoted 14 lines · Petr Vorel

It's meant to be read only.

Fixes 89c905beccbb ("nfsd: allow forced expiration of NFSv4 clients")

---
Hi,

does not really fix anything, it's just confusing to have read permission bit when not used.

Hi Petr, applied to nfsd-5.7-testing, with the patch description corrected to read:

"It's meant to be write-only."

Quoted 11 lines

Kind regards,
Petr

fs/nfsd/nfs4state.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4state.c +0 -0
index 65cfe9ab47be..475ece438cfc 100644

fs/nfsd/nfs4state.c static const struct file_operations client_ctl_fops = { · line 2641

Quoted 7 lines
fs/nfsd/nfs4state.c +1 -1
@@ -2636,7 +2636,7 @@ static const struct file_operations client_ctl_fops = {
 static const struct tree_descr client_files[] = {
 	[0] = {"info", &client_info_fops, S_IRUSR},
 	[1] = {"states", &client_states_fops, S_IRUSR},
-	[2] = {"ctl", &client_ctl_fops, S_IRUSR|S_IWUSR},
+	[2] = {"ctl", &client_ctl_fops, S_IWUSR},
 	[3] = {""},
 };

--
Chuck Lever

#2 lore raw
Quoted 4 lines

Hi Petr, applied to nfsd-5.7-testing, with the patch description corrected to read:

"It's meant to be write-only."

Thanks, Chuck!

Kind regards,
Petr