Prasanna Kumar Kalever b5ceb1a9de fuse: fix return value check for setuid
setuid() sets the effective user ID of the calling process. If the
effective UID of the caller is root, the real UID and saved set-user-ID
are also set. On success, zero is returned.  On error, -1 is returned,
and errno is set appropriately.

there are cases where setuid() can fail even when the caller is UID 0;
it is a grave security error to omit checking for a failure return from
setuid(). if an environment limits the number of processes a user can
have, setuid() might fail if the target uid already is at the limit.

Fix is to check return value of setuid.

Change-Id: I7aa5ab5e347603c69dc93188417cc4f4c81ffc75
BUG: 1221490
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Reviewed-on: http://review.gluster.org/10780
Reviewed-by: Prasanna Kumar Kalever
Tested-by: Prasanna Kumar Kalever
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com>
2015-05-16 00:19:09 -07:00
2015-04-06 06:02:08 -07:00
2014-04-16 06:38:06 -07:00
2010-03-12 04:09:34 -08:00
2014-09-02 11:17:03 -07:00
2015-03-24 06:59:33 -07:00
2011-07-18 17:24:14 +05:30
2014-09-16 02:30:36 -07:00

For information about contributing to GlusterFS, please follow the below link : Contributing to GlusterFS community

GlusterFS does not follow the GitHub: Fork & pull workflow but use Gerrit for code review.

The development guidelines are detailed in Development Workflow.

For more info, please visit http://www.gluster.org/.

Description
No description provided
Readme 86 MiB
Languages
C 86.6%
Shell 7.5%
Python 3.6%
Perl 0.7%
Makefile 0.4%
Other 0.9%