summaryrefslogtreecommitdiff
path: root/nix/nix-daemon/guix-daemon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nix/nix-daemon/guix-daemon.cc')
-rw-r--r--nix/nix-daemon/guix-daemon.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc
index 58a6f3eba45..edbec81c43c 100644
--- a/nix/nix-daemon/guix-daemon.cc
+++ b/nix/nix-daemon/guix-daemon.cc
@@ -85,6 +85,7 @@ builds derivations on behalf of its clients.");
85#define GUIX_OPT_LOG_COMPRESSION 20 85#define GUIX_OPT_LOG_COMPRESSION 20
86#define GUIX_OPT_DISCOVER 21 86#define GUIX_OPT_DISCOVER 21
87#define GUIX_OPT_ISOLATE_HOST_LOOPBACK 22 87#define GUIX_OPT_ISOLATE_HOST_LOOPBACK 22
88#define GUIX_OPT_ALLOW_ASLR 23
88 89
89static const struct argp_option options[] = 90static const struct argp_option options[] =
90 { 91 {
@@ -157,6 +158,14 @@ to live outputs") },
157 n_("produce debugging output") }, 158 n_("produce debugging output") },
158 { "isolate-host-loopback", GUIX_OPT_ISOLATE_HOST_LOOPBACK, 0, 0, 159 { "isolate-host-loopback", GUIX_OPT_ISOLATE_HOST_LOOPBACK, 0, 0,
159 n_("do not allow fixed-output chroot builds to access the host loopback") }, 160 n_("do not allow fixed-output chroot builds to access the host loopback") },
161 { "allow-aslr", GUIX_OPT_ALLOW_ASLR, 0,
162#ifdef HAVE_SYS_PERSONALITY_H
163 0,
164#else
165 OPTION_HIDDEN,
166#endif
167 n_("allow builds to start even if address space layout \
168randomization (ASLR) cannot be disabled")},
160 { 0, 0, 0, 0, 0 } 169 { 0, 0, 0, 0, 0 }
161 }; 170 };
162 171
@@ -292,6 +301,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
292 case GUIX_OPT_ISOLATE_HOST_LOOPBACK: 301 case GUIX_OPT_ISOLATE_HOST_LOOPBACK:
293 settings.useHostLoopback = false; 302 settings.useHostLoopback = false;
294 break; 303 break;
304 case GUIX_OPT_ALLOW_ASLR:
305 settings.allowASLR = true;
306 break;
295 default: 307 default:
296 return (error_t) ARGP_ERR_UNKNOWN; 308 return (error_t) ARGP_ERR_UNKNOWN;
297 } 309 }