Include uid_wrapper correctly.
[mat/samba.git] / source3 / lib / util_sec.c
index 0d928aad3d9a1b6f8ab57eb53c51042b9676d8c3..60ea214d262ea30a10a0cf718ececba1e1d986b0 100644 (file)
    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 */
@@ -40,7 +40,7 @@
 
 #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,
@@ -83,7 +83,7 @@ gid_t sec_initial_gid(void)
 /****************************************************************************
 are we running in non-root mode?
 ****************************************************************************/
-BOOL non_root_mode(void)
+bool non_root_mode(void)
 {
        return (initial_uid != (uid_t)0);
 }
@@ -477,7 +477,7 @@ main()
 /****************************************************************************
 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);
 }