[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[785] trunk/fuse/fuse.c
Brought to you by:
fredm
From: <fr...@us...> - 2014-12-29 12:27:48
|
Revision: 785 http://sourceforge.net/p/fuse-for-macosx/code/785 Author: fredm Date: 2014-12-29 12:27:26 +0000 (Mon, 29 Dec 2014) Log Message: ----------- As we don't believe that fuse is safe to run with root priveleges and therefore attempt to drop them, then failing to drop them should be a hard error rather than a warning. Modified Paths: -------------- trunk/fuse/fuse.c Modified: trunk/fuse/fuse.c =================================================================== --- trunk/fuse/fuse.c 2014-12-29 11:57:53 UTC (rev 784) +++ trunk/fuse/fuse.c 2014-12-29 12:27:26 UTC (rev 785) @@ -251,7 +251,13 @@ #ifdef HAVE_GETEUID /* Drop root privs if we have them */ - if( !geteuid() ) { setuid( getuid() ); } + if( !geteuid() ) { + error = setuid( getuid() ); + if( error ) { + ui_error( UI_ERROR_ERROR, "Could not drop root privileges" ); + return 1; + } + } #endif /* #ifdef HAVE_GETEUID */ mempool_init(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |