Skip to content

Commit dc009e8

Browse files
committed
documentation update
1 parent b175c79 commit dc009e8

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

ACKNOWLEDGEMENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ http://bradsknutson.com/blog/css-quick-tip-center-div-horizontally-vertically/
302302
## Markdown
303303
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
304304
https://github.com/sindresorhus/awesome
305+
http://stackoverflow.com/questions/6695439/how-to-link-to-a-named-anchor-in-multimarkdown
305306

306307
## Linux
307308
http://askubuntu.com/questions/501812/how-do-i-provide-arguments-to-a-command-run-from-gksudo

README.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Perl Executing Browser (PEB) is an HTML GUI for [Perl 5](https://www.perl.org/)
99
* [Target Audience](#target-audience)
1010
* [Features](#features)
1111
* [Compile-time Requirements](#compile-time-requirements)
12+
* [Compile-time Variables](#compile-time-variables)
1213
* [Runtime Requirements](#runtime-requirements)
1314
* [Calling User Perl Scripts](#calling-user-perl-scripts)
1415
* [Calling Linux Superuser Perl Scripts](#calling-linux-superuser-perl-scripts)
@@ -97,6 +98,39 @@ Compiled and tested successfully using:
9798
* [Qt Creator 3.5.1 and Qt 5.5.1](http://download.qt.io/official_releases/qt/5.5/5.5.1/) on 64-bit Lubuntu 15.04 Linux
9899
(main development and testing platform - Dimitar D. Mitov).
99100

101+
102+
## Compile-time Variables
103+
Changing the compile-time variables of PEB requires editing its project file - ```peb.pro```.
104+
* **Macintosh binary type:** ```BUNDLE```
105+
To make a bundle-less binary, which is the default setting:
106+
107+
```
108+
BUNDLE = 0
109+
CONFIG -= app_bundle
110+
```
111+
112+
To make a bundled binary (peb.app):
113+
114+
```
115+
BUNDLE = 1
116+
CONFIG += app_bundle
117+
```
118+
119+
<a name="security-compile-time-variables"></a>
120+
The following two compile-time variables can tighten further the security of PEB.
121+
122+
* **Administrative privileges check:** ```ADMIN_PRIVILEGES_CHECK```
123+
To disable administrative privileges check: ```ADMIN_PRIVILEGES_CHECK = 0```
124+
By default administrative privileges check is disabled.
125+
To enable administrative privileges check: ```ADMIN_PRIVILEGES_CHECK = 1```
126+
If administrative privileges check is enabled and PEB is started with administrative privileges, a warning page is displayed and no scripts can be executed. Starting Linux superuser scripts is not possible in this scenario.
127+
128+
* **Perl debugger interaction:** ```PERL_DEBUGGER_INTERACTION```
129+
To enable Perl debugger interaction: ```PERL_DEBUGGER_INTERACTION = 1```
130+
By default Perl debugger interaction is enabled.
131+
To disable Perl debugger interaction: ```PERL_DEBUGGER_INTERACTION = 0```
132+
If PEB is going to be compiled for end users and interaction with the Perl debugger is not needed or not wanted for security reasons, it can be turned off.
133+
100134
## Runtime Requirements
101135
* Qt 5 libraries - their full Linux list can be found inside the ```start-peb.sh``` script,
102136
* Perl 5 distribution - any Linux, Mac or Windows Perl distribution.
@@ -186,7 +220,7 @@ PEB is designed to run from any directory without setting anything beforehand an
186220
If PEB is able to read ```{PEB_binary_directory}/resources/app/trusted-domains.json```, all domains listed in this file are considered trusted. Only the local pseudo-domain ```http://local-pseudodomain/``` is trusted if ```trusted-domains.json``` is missing. This setting should be used with care - see section [Security](#security).
187221
* **Log files:**
188222
<a name="log-files"></a>
189-
If log files are needed for debugging of PEB or a PEB-based application, they can easily be turned on by manually creating ```{PEB_binary_directory}/logs```. If this directory is found during application startup, the browser assumes that logging is required and a separate log file is created for every browser session following the naming convention: ```{application_name}-started-at-{four_digit_year}-{month}-{day}--{hour}-{minute}-{second}.log```. PEB will not create ```{PEB_binary_directory}/logs``` on its own and if this directory is missing, no logs will be written, which is the default behavior. Please note, that every requested link is logged and log files can grow rapidly. If disc space is an issue, writing log files can be turned off by simply removing or renaming ```{PEB_binary_directory}/logs```.
223+
If log files are needed for debugging of PEB or a PEB-based application, they can easily be turned on by manually creating ```{PEB_binary_directory}/logs```. If this directory is found during application startup, the browser assumes that logging is required and a separate log file is created for every browser session following the naming convention: ```{application_name}-started-at-{four_digit_year}-{month}-{day}--{hour}-{minute}-{second}.log```. PEB will not create ```{PEB_binary_directory}/logs``` on its own and if this directory is missing, no logs will be written, which is the default behavior. Please note that every requested link is logged and log files can grow rapidly. If disc space is an issue, writing log files can be turned off by simply removing or renaming ```{PEB_binary_directory}/logs```.
190224

191225
**Settings based on JavaScript code:**
192226
They have two functions:
@@ -290,9 +324,7 @@ They have two functions:
290324
* Cross-site scripting is disabled for all web and local pages.
291325
* Plugin support is disabled.
292326

293-
**Optional security features based on C++ code and compile-time variables:**
294-
* Starting PEB with administrative privileges may be disabled by setting the compile-time variable ```ADMIN_PRIVILEGES_CHECK = 1``` in the ```peb.pro``` project file before compiling the binary. A warning page is displayed in this scenario and no scripts can be executed.
295-
* If Perl debugger interaction is not needed or considered a security risk, it can be turned off by setting the compile-time variable ```PERL_DEBUGGER_INTERACTION = 0```.
327+
**[Optional security features based on compile-time variables and C++ code:](#security-compile-time-variables)**
296328

297329
**Perl security setting:**
298330
PEB executes all Perl scripts with the ```fork``` core function banned using the command line switch ```-M-ops=fork```. ```fork``` is banned to avoid orphan processes, which may be created if this function is carelessly used.

0 commit comments

Comments
 (0)