Fix information leak in CIFS client lookup
Putting arbitary file names on lookup failures into the system log is not
a good idea, because usually everybody can read dmesg and that is thus
an information leak if a directory was read protected.
Also changed the error printout for this case to a signed number, because
it is normally negative and that makes it easier to read.
I'm not sure the message is all that useful anyways. Perhaps it
should be just removed completely? Or at least rate limited because
it allows to spam the kernel log nicely.
Signed-off-by: Andi Kleen <ak@suse.de>
Index: linux/fs/cifs/dir.c
===================================================================
--- linux.orig/fs/cifs/dir.c
+++ linux/fs/cifs/dir.c
@@ -518,7 +518,7 @@ cifs_lookup(struct inode *parent_dir_ino
/* if it was once a directory (but how can we tell?) we could do
shrink_dcache_parent(direntry); */
} else {
- cERROR(1, ("Error 0x%x on cifs_get_inode_info in lookup of %s",
+ cERROR(1, ("Error %d on cifs_get_inode_info in lookup of file",
rc, full_path));
/* BB special case check for Access Denied - watch security
exposure of returning dir info implicitly via different rc
--
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| majkls | sys_chroot+sys_fchdir Fix |
| Paul Mackerras | Re: [linux-pm] [PATCH] Remove process freezer from suspend to RAM pathway |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
