mount.cifs: check access of credential files before opening
authorJeff Layton <jlayton@redhat.com>
Fri, 25 Sep 2009 11:03:44 +0000 (07:03 -0400)
committerVolker Lendecke <vl@samba.org>
Fri, 22 Jan 2010 10:22:03 +0000 (11:22 +0100)
commit4c58bbfd8488bfe88be8a304182c2e02b2f39dc1
tree821bc257ab1f5fcc85140c736fce84ded3b7f649
parent51d5d9e6f75e64b0947d47a91f07861be5b1e126
mount.cifs: check access of credential files before opening

It's possible for an unprivileged user to pass a setuid mount.cifs a
credential or password file to which he does not have access. This can cause
mount.cifs to open the file on his behalf and possibly leak the info in the
first few lines of the file.

Check the access permissions of the file before opening it.

Reported-by: Ronald Volgers <r.c.volgers@student.utwente.nl>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
source/client/mount.cifs.c