Skip to contentSkip to conversation

permissions on /proc/tty/driver/

PATCH Thomas Voegtle 1 participant 2 messages Feb 29, 2008 – Mar 3, 2008 Proc filesystem

lore
Share & tools
lore
#0 lore raw

Hi,

we noticed that only root can enter /proc/tty/driver/, which appears to be wrong, because the files therein are actually world readable...

---
 fs/proc/proc_tty.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
fs/proc/proc_tty.c +3 -1
index 49816e0..eb73d96 100644
@@ -224,7 +224,9 @@ void __init proc_tty_init(void)
 	 * password lengths and inter-keystroke timings during password
 	 * entry.
 	 */
-	proc_tty_driver = proc_mkdir_mode("tty/driver", S_IRUSR | S_IXUSR, NULL);
+	proc_tty_driver = proc_mkdir_mode("tty/driver",
+			S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH,
+			NULL);
 
 	create_proc_read_entry("tty/ldiscs", 0, NULL, tty_ldiscs_read_proc, NULL);
 	entry = create_proc_entry("tty/drivers", 0, NULL);
Signature · 7 lines
1.5.3

      Thomas

-- 
 Thomas Vögtle    email: [email protected]
 ----- http://www.voegtle-clan.de/thomas ------
#1 lore raw
Quoted 2 lines · Thomas Voegtle

we noticed that only root can enter /proc/tty/driver/, which appears to be wrong, because the files therein are actually world readable...

I found out why this was done:

http://www.kernel.org/pub/linux/kernel/v2.4/ChangeLog-2.4.29

Chris Wright:
o /proc/tty/driver/serial reveals the exact number of characters used
in serial links (CAN-2003-0461)

So, please ignore this patch I sent.

Thomas

Signature · 2 lines
 Thomas Vögtle    email: [email protected]
 ----- http://www.voegtle-clan.de/thomas ------