Skip to content

Instantly share code, notes, and snippets.

@jbergstroem
Created March 14, 2015 06:58
Show Gist options
  • Save jbergstroem/ae0a0a123304980cc704 to your computer and use it in GitHub Desktop.
Save jbergstroem/ae0a0a123304980cc704 to your computer and use it in GitHub Desktop.
diff --git test/common.js test/common.js
index 901425b..10d2a21 100644
--- test/common.js
+++ test/common.js
@@ -47,6 +47,13 @@ Object.defineProperty(exports, 'hasCrypto', {get: function() {
return process.versions.openssl ? true : false;
}});
+Object.defineProperty(exports, 'inAFbsdJail', {get: function() {
+ if(process.platform === 'freebsd') {
+ return child_process.execSync('sysctl -n security.jail.jailed');
+ }
+ return 0;
+}});
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment