mount.cifs: check access of credential files before opening
authorJeff Layton <jlayton@redhat.com>
Fri, 25 Sep 2009 10:45:10 +0000 (06:45 -0400)
committerKarolin Seeger <kseeger@samba.org>
Thu, 1 Oct 2009 12:29:18 +0000 (14:29 +0200)
commite3dd6f99a4a7b87399bb5cfe4d3e06ac4d78c81f
tree6ddbe42dd94bd171c9ff47c11b50bfd57f901b11
parentc173c1beb1334fcdcf55e458430341f193482b2e
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>
client/mount.cifs.c