This seems a bit cleaner than passing dummy values (e.g. 0) that
aren't ever used. Additionally, it means that PRIVSEP_CHROOT no
longer needs to be defined to a dummy value if building with
--disable-privsep.
#ifdef ENABLE_PRIVSEP
priv_init(PRIVSEP_CHROOT, ctl, uid, gid);
#else
- priv_init(PRIVSEP_CHROOT, ctl, 0, 0);
+ priv_init();
#endif
/* Initialization of global configuration */
int*);
/* priv.c */
+#ifdef ENABLE_PRIVSEP
void priv_init(const char*, int, uid_t, gid_t);
+#else
+void priv_init(void);
+#endif
void priv_wait(void);
void priv_ctl_cleanup(const char *ctlname);
char *priv_gethostname(void);
}
void
+#ifdef ENABLE_PRIVSEP
priv_init(const char *chrootdir, int ctl, uid_t uid, gid_t gid)
+#else
+priv_init(void)
+#endif
{
int pair[2];