Debian build now defaults to direct link with shared libraries.
o Use of runtime linkage emperils correctness of package. So, runtime linking disabled in configuration. o Workaround using environment variables to pass the names of the shared libraries into the daemon is disabled. o Auxiliary source file used to determine the current soname for libssl is removed.
This commit is contained in:
parent
4bac6f8b05
commit
9619327ddb
6 changed files with 16 additions and 35 deletions
7
debian/control
vendored
7
debian/control
vendored
|
@ -12,14 +12,9 @@ Vcs-Browser: https://code.google.com/p/shellinabox/source/browse/
|
||||||
Package: shellinabox
|
Package: shellinabox
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base
|
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base
|
||||||
Recommends: ${shlibs:Recommends}
|
Suggests: openssl
|
||||||
Suggests: libpam0g, openssl
|
|
||||||
Description: publish command line shell through AJAX interface
|
Description: publish command line shell through AJAX interface
|
||||||
Shellinabox can export arbitrary command line programs to any JavaScript
|
Shellinabox can export arbitrary command line programs to any JavaScript
|
||||||
enabled web browser. By default, it prompts for username and password
|
enabled web browser. By default, it prompts for username and password
|
||||||
and then exports a SSL/TLS encrypted login shell. Shellinabox provides
|
and then exports a SSL/TLS encrypted login shell. Shellinabox provides
|
||||||
a VT100 compatible terminal emulator that runs within any modern browser.
|
a VT100 compatible terminal emulator that runs within any modern browser.
|
||||||
.
|
|
||||||
ShellInABox links libssl dynamically, so libssl must be installed
|
|
||||||
either manually or as a dependency of another package for SSL support
|
|
||||||
to be available.
|
|
||||||
|
|
18
debian/rules
vendored
18
debian/rules
vendored
|
@ -12,17 +12,13 @@
|
||||||
%:
|
%:
|
||||||
dh $@ --with autotools-dev
|
dh $@ --with autotools-dev
|
||||||
|
|
||||||
|
# elf-2012.04.10: Since Debian manages package dependencies we can
|
||||||
# elf-2012.04.07: Because the daemon loads libssl.so-X dynamically
|
# force linkage of ssl s.t. the dependency is properly kept
|
||||||
# there is no way for the debhelper script to find the
|
# up-to-date. This is much better than attempting to
|
||||||
# library name to add to the dependencies. So we
|
# force the right version of ssl to be present
|
||||||
# link a small program to provide a target for
|
# s.t. the runtime loader can find them.
|
||||||
# dpkg-shlibdeps to use to recover the dependency.
|
override_dh_auto_configure:
|
||||||
override_dh_shlibdeps:
|
dh_auto_configure -- --disable-runtime-loading
|
||||||
gcc -o debian/shellinabox/ssl-deps debian/ssl-deps.c -lcrypto
|
|
||||||
dpkg-shlibdeps -Tdebian/shellinabox.substvars debian/shellinabox/usr/bin/shellinaboxd \
|
|
||||||
-dRecommends debian/shellinabox/ssl-deps
|
|
||||||
rm debian/shellinabox/ssl-deps
|
|
||||||
|
|
||||||
# elf-2012.03.24: This work should be done in the Makefile install
|
# elf-2012.03.24: This work should be done in the Makefile install
|
||||||
# target instead of debian/rules.
|
# target instead of debian/rules.
|
||||||
|
|
4
debian/shellinabox.default
vendored
4
debian/shellinabox.default
vendored
|
@ -10,10 +10,6 @@ SHELLINABOX_PORT=4200
|
||||||
# SHELLINABOX_USER=shellinabox
|
# SHELLINABOX_USER=shellinabox
|
||||||
# SHELLINABOX_GROUP=shellinabox
|
# SHELLINABOX_GROUP=shellinabox
|
||||||
|
|
||||||
# Names of openssl libraries to load dynamically.
|
|
||||||
SHELLINABOX_LIBSSL_SO=libssl.so.1.0.0
|
|
||||||
SHELLINABOX_LIBCRYPTO_SO=libcrypto.so.1.0.0
|
|
||||||
|
|
||||||
# Any optional arguments (e.g. extra service definitions). Make sure
|
# Any optional arguments (e.g. extra service definitions). Make sure
|
||||||
# that that argument is quoted.
|
# that that argument is quoted.
|
||||||
#
|
#
|
||||||
|
|
4
debian/shellinabox.init
vendored
4
debian/shellinabox.init
vendored
|
@ -40,10 +40,6 @@ SHELLINABOX_PORT="${SHELLINABOX_PORT:-4200}"
|
||||||
SHELLINABOX_USER="${SHELLINABOX_USER:-shellinabox}"
|
SHELLINABOX_USER="${SHELLINABOX_USER:-shellinabox}"
|
||||||
SHELLINABOX_GROUP="${SHELLINABOX_GROUP:-shellinabox}"
|
SHELLINABOX_GROUP="${SHELLINABOX_GROUP:-shellinabox}"
|
||||||
|
|
||||||
# Export SO file names
|
|
||||||
export SHELLINABOX_LIBCRYPTO_SO="${SHELLINABOX_LIBCRYPTO_SO:-libcrypto.so}"
|
|
||||||
export SHELLINABOX_LIBSSL_SO="${SHELLINABOX_LIBSSL_SO:-libssl.so}"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Function that starts the daemon/service.
|
# Function that starts the daemon/service.
|
||||||
#
|
#
|
||||||
|
|
8
debian/ssl-deps.c
vendored
8
debian/ssl-deps.c
vendored
|
@ -1,8 +0,0 @@
|
||||||
/* minimal program to link libcrypto */
|
|
||||||
#include <openssl/sha.h>
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
SHA_CTX ctx;
|
|
||||||
SHA1_Init (&ctx);
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -193,7 +193,10 @@ static int maybeLoadCrypto(void) {
|
||||||
// it, iff we haven't tried loading it before and iff libssl.so does not
|
// it, iff we haven't tried loading it before and iff libssl.so does not
|
||||||
// work by itself.
|
// work by itself.
|
||||||
static int crypto;
|
static int crypto;
|
||||||
const char* path_libcrypto = getenv ("SHELLINABOX_LIBCRYPTO_SO");
|
// SHELLINABOX_LIBCRYPTO_SO can be used to select the specific
|
||||||
|
// soname of libcrypto for systems where it is not libcrypto.so.
|
||||||
|
// The feature is currently disabled.
|
||||||
|
const char* path_libcrypto = NULL; // getenv ("SHELLINABOX_LIBCRYPTO_SO");
|
||||||
if (path_libcrypto == NULL)
|
if (path_libcrypto == NULL)
|
||||||
path_libcrypto = "libcrypto.so";
|
path_libcrypto = "libcrypto.so";
|
||||||
|
|
||||||
|
@ -249,7 +252,10 @@ static void *loadSymbol(const char *lib, const char *fn) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void loadSSL(void) {
|
static void loadSSL(void) {
|
||||||
const char* path_libssl = getenv ("SHELLINABOX_LIBSSL_SO");
|
// SHELLINABOX_LIBSSL_SO can be used to select the specific
|
||||||
|
// soname of libssl for systems where it is not libssl.so.
|
||||||
|
// The feature is currently disabled.
|
||||||
|
const char* path_libssl = NULL; // = getenv ("SHELLINABOX_LIBSSL_SO");
|
||||||
if (path_libssl == NULL)
|
if (path_libssl == NULL)
|
||||||
path_libssl = "libssl.so";
|
path_libssl = "libssl.so";
|
||||||
check(!SSL_library_init);
|
check(!SSL_library_init);
|
||||||
|
|
Loading…
Reference in a new issue