mount.cifs: don't allow it to be run as setuid root program
commit565f8e10c9828c4d998f494d6c1a280e9a8927d5
authorJeff Layton <jlayton@redhat.com>
Tue, 26 Jan 2010 13:45:58 +0000 (26 08:45 -0500)
committerKarolin Seeger <kseeger@samba.org>
Thu, 6 May 2010 12:12:46 +0000 (6 14:12 +0200)
tree3408ee8a00799c67b35d08dce7e8cba604b7e885
parente1ce92a0927c89bfc5aa06a1bc616ca187745a90
mount.cifs: don't allow it to be run as setuid root program

mount.cifs has been the subject of several "security" fire drills due to
distributions installing it as a setuid root program. This program has
not been properly audited for security and the Samba team highly
recommends that it not be installed as a setuid root program at this
time.

To make that abundantly clear, this patch forcibly disables the ability
for mount.cifs to run as a setuid root program. People are welcome to
trivially patch this out, but they do so at their own peril.

A security audit and redesign of this program is in progress and we hope
that we'll be able to remove this in the near future.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
The last 5 patches address bug #6853 (mount.cifs race that allows user to
replace mountpoint with a symlink).
(cherry picked from commit f94a377fb58f7b104aa633236f3391c9af6a7b12)
source3/client/mount.cifs.c