Browse Source

Remove --disable-chroot build option: always compile --chroot-dir if supported

Luke Dashjr 12 years ago
parent
commit
38bf34154a
2 changed files with 3 additions and 14 deletions
  1. 0 11
      configure.ac
  2. 3 3
      miner.c

+ 0 - 11
configure.ac

@@ -327,17 +327,6 @@ if test "x$icarus" = xyes; then
 fi
 fi
 AM_CONDITIONAL([HAS_ICARUS], [test x$icarus = xyes])
 AM_CONDITIONAL([HAS_ICARUS], [test x$icarus = xyes])
 
 
-chroot = "yes"
-
-AC_ARG_ENABLE([chroot],
-	[AC_HELP_STRING([--disable-chroot],[Compile support for running inside a chroot jail (default enabled)])],
-	[chroot=$enableval],
-	[chroot=yes]
-	)
-if test "x$chroot" = xyes; then
-	AC_DEFINE([BFG_CHROOT], [1], [Defined to 1 if chroot jail support is wanted])
-fi
-
 avalon="no"
 avalon="no"
 
 
 AC_ARG_ENABLE([avalon],
 AC_ARG_ENABLE([avalon],

+ 3 - 3
miner.c

@@ -382,7 +382,7 @@ char *cmd_idle, *cmd_sick, *cmd_dead;
 	static int forkpid;
 	static int forkpid;
 #endif // defined(unix)
 #endif // defined(unix)
 
 
-#if defined(BFG_CHROOT) && defined(HAVE_CHROOT)
+#ifdef HAVE_CHROOT
 char *chroot_dir;
 char *chroot_dir;
 #endif
 #endif
 
 
@@ -1486,7 +1486,7 @@ static struct opt_table opt_config_table[] = {
 		     set_int_0_to_9999, opt_show_intval, &opt_bench_algo,
 		     set_int_0_to_9999, opt_show_intval, &opt_bench_algo,
 		     opt_hidden),
 		     opt_hidden),
 #endif
 #endif
-#if defined(BFG_CHROOT) && defined(HAVE_CHOOT)
+#ifdef HAVE_CHOOT
         OPT_WITH_ARG("--chroot-dir",
         OPT_WITH_ARG("--chroot-dir",
                      opt_set_charp, NULL, &chroot_dir,
                      opt_set_charp, NULL, &chroot_dir,
                      "Chroot to a directory right after startup"),
                      "Chroot to a directory right after startup"),
@@ -10078,7 +10078,7 @@ int main(int argc, char *argv[])
 	}
 	}
 #endif
 #endif
 
 
-#if defined(BFG_CHROOT) && defined(HAVE_CHROOT)
+#ifdef HAVE_CHROOT
         if (chroot_dir != NULL) {
         if (chroot_dir != NULL) {
 #ifdef HAVE_PWD_H
 #ifdef HAVE_PWD_H
                 if (user_info == NULL && getuid() == 0) {
                 if (user_info == NULL && getuid() == 0) {