GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef AUTOCONF_TEST
#include "includes.h"
+#include "system/passwd.h" /* uid_wrapper */
#else
/* we are running this code in autoconf test mode to see which type of setuid
function works */
#define DEBUG(x, y) printf y
#define smb_panic(x) exit(1)
-#define BOOL int
+#define bool int
#endif
/* are we running as non-root? This is used by the regresison test code,
/****************************************************************************
are we running in non-root mode?
****************************************************************************/
-BOOL non_root_mode(void)
+bool non_root_mode(void)
{
return (initial_uid != (uid_t)0);
}
/****************************************************************************
Check if we are setuid root. Used in libsmb and smbpasswd paranoia checks.
****************************************************************************/
-BOOL is_setuid_root(void)
+bool is_setuid_root(void)
{
return (geteuid() == (uid_t)0) && (getuid() != (uid_t)0);
}