From: Jiri Olsa <jolsa@redhat.com> Date: Wed, 29 Sep 2010 10:59:29 -0400 Subject: [fs] proc: make proc pid limits world readable Message-id: <1285757969-7852-1-git-send-email-jolsa@redhat.com> Patchwork-id: 28516 O-Subject: [PATCH RHEL5] BZ 611535 proc: make proc pid limits world readable Bugzilla: 611535 RH-Acked-by: Amerigo Wang <amwang@redhat.com> RH-Acked-by: Neil Horman <nhorman@redhat.com> RH-Acked-by: Jerome Marchand <jmarchan@redhat.com> RH-Acked-by: Jiri Pirko <jpirko@redhat.com> Bugzilla: 611535 https://bugzilla.redhat.com/show_bug.cgi?id=611535 Description: ============ Having the limits file world readable will ease the task of system management on systems where root privileges might be restricted. Having admin restricted with root priviledges, he/she could not check other users process' limits. Also it'd align with most of the /proc stat files. Upstream status: ================ patch is currently in the mm tree: The patch titled proc: make /proc/pid/limits world readable has been added to the -mm tree. Its filename is proc-make-proc-pid-limits-world-readable.patch asked Andrew Morton to merge it into the Linus's tree upstream discussion: http://lkml.org/lkml/2010/9/21/75 Brew: ===== https://brewweb.devel.redhat.com/taskinfo?taskID=2786665 Tested: ======= booted and verified the /proc/<pid>/limits file is world readable wbr, jirka diff --git a/fs/proc/base.c b/fs/proc/base.c index 6c0bff6..6fdcc52 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -263,7 +263,7 @@ static struct pid_entry tgid_base_stuff[] = { #ifdef CONFIG_AUDITSYSCALL E(PROC_TGID_LOGINUID, "loginuid", S_IFREG|S_IWUSR|S_IRUGO), #endif - E(PROC_TGID_LIMITS, "limits", S_IFREG|S_IRUSR), + E(PROC_TGID_LIMITS, "limits", S_IFREG|S_IRUGO), #if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE) E(PROC_TGID_COREDUMP_FILTER, "coredump_filter", S_IFREG|S_IRUGO|S_IWUSR), @@ -315,7 +315,7 @@ static struct pid_entry tid_base_stuff[] = { #ifdef CONFIG_AUDITSYSCALL E(PROC_TID_LOGINUID, "loginuid", S_IFREG|S_IWUSR|S_IRUGO), #endif - E(PROC_TID_LIMITS, "limits", S_IFREG|S_IRUSR), + E(PROC_TID_LIMITS, "limits", S_IFREG|S_IRUGO), #ifdef CONFIG_TASK_IO_ACCOUNTING E(PROC_TID_IO, "io", S_IFREG|S_IRUGO), #endif