Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance documentation about compiling; #460

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ VERSION=$(shell ./genver.sh -r)

# Configuration -- you probably need to `make clean` if you
# change any of these
# landlock is checked by `configure` and set in config.h

# uncomment the following line to disable landlock
# override undefine HAVE_LANDLOCK
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally I'd prefer to include options to configure so we have ./configure --disable-landlock, but after a quick look it seems not as easy as it should be... I'll look into it later.

ENABLE_SANITIZER= # Enable ASAN/LSAN/UBSAN
ENABLE_REGEX=1 # Enable regex probes
USELIBCONFIG=1 # Use libconfig? (necessary to use configuration files)
Expand Down
16 changes: 12 additions & 4 deletions doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Dependencies
* [libcap](http://packages.debian.org/source/unstable/libcap-dev), in package `libcap-dev`.
You can compile with or without it using USELIBCAP in the Makefile

* [libconfig++-dev](https://packages.debian.org/bookworm/libconfig++-dev), in package `lìbconfig++-dev`

* libbsd, to enable to change the process name (as shown in `ps`,
so each forked process shows what protocol and what connection it is serving),
which requires `libbsd` at runtime, and `libbsd-dev` at compile-time.
Expand Down Expand Up @@ -59,13 +61,16 @@ The test scripts are written in Perl, and will require

Compilation
-----------

After this, the Makefile should work:

make install
First you have to run `./configure` in the _**./sslh**_ directory. After this,
the Makefile is created, and you can do your configuration changes in the Makefile.
After each run of ./configure, those changes are gone and the Makefile is recreated.

There are a couple of configuration options at the beginning of the Makefile:

* `# override undefine HAVE_LANDLOCK` if you uncomment this line, sslh will be compiled
without landlock. As an alternative ./configure creates a config.h file,
which gives also the possibility, to comment that out.

* `USELIBWRAP` compiles support for host access control (see `hosts_access(3)`),
you will need `libwrap` headers and library to compile (`libwrap0-dev` in Debian).

Expand All @@ -77,6 +82,9 @@ There are a couple of configuration options at the beginning of the Makefile:

* `USELIBBSD` compiles support for updating the process name (as shown by `ps`).

Now you can do either a plain `make` to create the binaries, or you can do an
`make install` to create the binaries and install them.


Generating the configuration parser
-----------------------------------
Expand Down
8 changes: 4 additions & 4 deletions doc/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ Configuration goes like this on the server side, using `stunnel3`:
Capabilities support
--------------------

On Linux (only?), you can compile sslh with `USELIBCAP=1` to
make use of POSIX capabilities; this will save the required
capabilities needed for transparent proxying for unprivileged
processes.
On Linux (only?), you can compile sslh with `USELIBCAP=1` set
in the Makefile to make use of POSIX capabilities; this will
save the required capabilities needed for transparent proxying
for unprivileged processes.

Alternatively, you may use filesystem capabilities instead
of starting sslh as root and asking it to drop privileges.
Expand Down
Loading