mount.cifs: check access of credential files before opening
commitb656deb5d7e97176c32b61b7659258846db16887
authorJeff Layton <jlayton@redhat.com>
Fri, 25 Sep 2009 11:03:44 +0000 (25 07:03 -0400)
committerKarolin Seeger <kseeger@samba.org>
Mon, 28 Sep 2009 11:51:13 +0000 (28 13:51 +0200)
tree673fe3a32083bbe15e42a3b51c32fa426c9ccfe8
parentfb513bdacaeaef7e3edb49d5b77661adf3a912bb
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>
Part 1/2 of a fix for CVE-2009-2948.
source/client/mount.cifs.c