* [PATCH] ceph: change permission for readonly debugfs entries
@ 2018-02-10 6:18 Chengguang Xu
2018-02-12 14:39 ` Ilya Dryomov
0 siblings, 1 reply; 2+ messages in thread
From: Chengguang Xu @ 2018-02-10 6:18 UTC (permalink / raw)
To: ceph-devel; +Cc: zyan, idryomov, Chengguang Xu
Remove write permission for debugfs entries which only have readonly function.
Signed-off-by: Chengguang Xu <cgxu519@icloud.com>
---
fs/ceph/debugfs.c | 8 ++++----
net/ceph/debugfs.c | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
index 644def8..abdf98d 100644
--- a/fs/ceph/debugfs.c
+++ b/fs/ceph/debugfs.c
@@ -260,7 +260,7 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
goto out;
fsc->debugfs_mdsmap = debugfs_create_file("mdsmap",
- 0600,
+ 0400,
fsc->client->debugfs_dir,
fsc,
&mdsmap_show_fops);
@@ -268,7 +268,7 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
goto out;
fsc->debugfs_mds_sessions = debugfs_create_file("mds_sessions",
- 0600,
+ 0400,
fsc->client->debugfs_dir,
fsc,
&mds_sessions_show_fops);
@@ -276,7 +276,7 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
goto out;
fsc->debugfs_mdsc = debugfs_create_file("mdsc",
- 0600,
+ 0400,
fsc->client->debugfs_dir,
fsc,
&mdsc_show_fops);
@@ -292,7 +292,7 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
goto out;
fsc->debugfs_dentry_lru = debugfs_create_file("dentry_lru",
- 0600,
+ 0400,
fsc->client->debugfs_dir,
fsc,
&dentry_lru_show_fops);
diff --git a/net/ceph/debugfs.c b/net/ceph/debugfs.c
index 1eef680..0ef0f32 100644
--- a/net/ceph/debugfs.c
+++ b/net/ceph/debugfs.c
@@ -418,7 +418,7 @@ int ceph_debugfs_client_init(struct ceph_client *client)
goto out;
client->monc.debugfs_file = debugfs_create_file("monc",
- 0600,
+ 0400,
client->debugfs_dir,
client,
&monc_show_fops);
@@ -426,7 +426,7 @@ int ceph_debugfs_client_init(struct ceph_client *client)
goto out;
client->osdc.debugfs_file = debugfs_create_file("osdc",
- 0600,
+ 0400,
client->debugfs_dir,
client,
&osdc_show_fops);
@@ -434,7 +434,7 @@ int ceph_debugfs_client_init(struct ceph_client *client)
goto out;
client->debugfs_monmap = debugfs_create_file("monmap",
- 0600,
+ 0400,
client->debugfs_dir,
client,
&monmap_show_fops);
@@ -442,7 +442,7 @@ int ceph_debugfs_client_init(struct ceph_client *client)
goto out;
client->debugfs_osdmap = debugfs_create_file("osdmap",
- 0600,
+ 0400,
client->debugfs_dir,
client,
&osdmap_show_fops);
@@ -450,7 +450,7 @@ int ceph_debugfs_client_init(struct ceph_client *client)
goto out;
client->debugfs_options = debugfs_create_file("client_options",
- 0600,
+ 0400,
client->debugfs_dir,
client,
&client_options_show_fops);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ceph: change permission for readonly debugfs entries
2018-02-10 6:18 [PATCH] ceph: change permission for readonly debugfs entries Chengguang Xu
@ 2018-02-12 14:39 ` Ilya Dryomov
0 siblings, 0 replies; 2+ messages in thread
From: Ilya Dryomov @ 2018-02-12 14:39 UTC (permalink / raw)
To: Chengguang Xu; +Cc: Ceph Development, Yan, Zheng
On Sat, Feb 10, 2018 at 7:18 AM, Chengguang Xu <cgxu519@icloud.com> wrote:
> Remove write permission for debugfs entries which only have readonly function.
>
> Signed-off-by: Chengguang Xu <cgxu519@icloud.com>
> ---
> fs/ceph/debugfs.c | 8 ++++----
> net/ceph/debugfs.c | 10 +++++-----
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
> index 644def8..abdf98d 100644
> --- a/fs/ceph/debugfs.c
> +++ b/fs/ceph/debugfs.c
> @@ -260,7 +260,7 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
> goto out;
>
> fsc->debugfs_mdsmap = debugfs_create_file("mdsmap",
> - 0600,
> + 0400,
> fsc->client->debugfs_dir,
> fsc,
> &mdsmap_show_fops);
> @@ -268,7 +268,7 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
> goto out;
>
> fsc->debugfs_mds_sessions = debugfs_create_file("mds_sessions",
> - 0600,
> + 0400,
> fsc->client->debugfs_dir,
> fsc,
> &mds_sessions_show_fops);
> @@ -276,7 +276,7 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
> goto out;
>
> fsc->debugfs_mdsc = debugfs_create_file("mdsc",
> - 0600,
> + 0400,
> fsc->client->debugfs_dir,
> fsc,
> &mdsc_show_fops);
> @@ -292,7 +292,7 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
> goto out;
>
> fsc->debugfs_dentry_lru = debugfs_create_file("dentry_lru",
> - 0600,
> + 0400,
> fsc->client->debugfs_dir,
> fsc,
> &dentry_lru_show_fops);
> diff --git a/net/ceph/debugfs.c b/net/ceph/debugfs.c
> index 1eef680..0ef0f32 100644
> --- a/net/ceph/debugfs.c
> +++ b/net/ceph/debugfs.c
> @@ -418,7 +418,7 @@ int ceph_debugfs_client_init(struct ceph_client *client)
> goto out;
>
> client->monc.debugfs_file = debugfs_create_file("monc",
> - 0600,
> + 0400,
> client->debugfs_dir,
> client,
> &monc_show_fops);
> @@ -426,7 +426,7 @@ int ceph_debugfs_client_init(struct ceph_client *client)
> goto out;
>
> client->osdc.debugfs_file = debugfs_create_file("osdc",
> - 0600,
> + 0400,
> client->debugfs_dir,
> client,
> &osdc_show_fops);
> @@ -434,7 +434,7 @@ int ceph_debugfs_client_init(struct ceph_client *client)
> goto out;
>
> client->debugfs_monmap = debugfs_create_file("monmap",
> - 0600,
> + 0400,
> client->debugfs_dir,
> client,
> &monmap_show_fops);
> @@ -442,7 +442,7 @@ int ceph_debugfs_client_init(struct ceph_client *client)
> goto out;
>
> client->debugfs_osdmap = debugfs_create_file("osdmap",
> - 0600,
> + 0400,
> client->debugfs_dir,
> client,
> &osdmap_show_fops);
> @@ -450,7 +450,7 @@ int ceph_debugfs_client_init(struct ceph_client *client)
> goto out;
>
> client->debugfs_options = debugfs_create_file("client_options",
> - 0600,
> + 0400,
> client->debugfs_dir,
> client,
> &client_options_show_fops);
Applied.
Thanks,
Ilya
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-12 14:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-10 6:18 [PATCH] ceph: change permission for readonly debugfs entries Chengguang Xu
2018-02-12 14:39 ` Ilya Dryomov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.