Skip to content

Commit

Permalink
./configure --fhs support
Browse files Browse the repository at this point in the history
  • Loading branch information
vanhauser-thc committed Feb 5, 2016
1 parent e693c2f commit 533fb17
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Release 8.2-pre
* Fixed an out of memory bug in http-form
* Fixed imap PLAIN method
* Added warning if HYDRA_PROXY_CONNECT environment is detected, that is an outdated setting
* Added --fhs switch to configure (for Linux distribution usage)
* ... your patch?


Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Makefile for Hydra - (c) 2001-2014 by van Hauser / THC <[email protected]>
# Makefile for Hydra - (c) 2001-2016 by van Hauser / THC <[email protected]>
#
OPTS=-I. -O3
# -Wall -g -pedantic
Expand Down
25 changes: 22 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
if [ "$1" = "-h" -o "$1" = "--help" ]; then
echo Options:
echo " --prefix=path path to install hydra and its datafiles to"
echo " --fhs install according to the File System Hierarchy Standard"
echo " --with-oracle=prefix prefix for oracle include dir"
echo " --with-oracle-lib=prefix prefix for oracle lib dir"
echo " --with-ssl=prefix prefix for SSL headers"
Expand All @@ -17,6 +18,7 @@ if [ "$1" = "-h" -o "$1" = "--help" ]; then
exit 0
fi

FHS=""
SIXFOUR=""
DEBUG=""
PREFIX=""
Expand Down Expand Up @@ -72,6 +74,12 @@ if [ '!' "X" = "X$*" ]; then
NOSTRIP="yes"
fi
fi
if [ "X" = "X$FHS" ]; then
FHS_TMP=`echo "$1"|sed 's/.*--fhs//'`
if [ -z "$FHS_TMP" ]; then
FHS="yes"
fi
fi
if [ "X" = "X$DEBUG" ]; then
DEBUG_TMP=`echo "$1"|sed 's/.*--debug//'`
if [ -z "$DEBUG_TMP" ]; then
Expand Down Expand Up @@ -1191,9 +1199,16 @@ else
XHYDRA_SUPPORT="xhydra"
fi

echo "Hydra will be installed into .../bin of: $PREFIX"
echo " (change this by running ./configure --prefix=path)"
echo
if [ "X" != "X$FHS" ]; then
PREFIX=/usr
echo "Hydra will be installed into .../bin of: $PREFIX"
echo " (according to the File System Hierarchy Standard)"
echo
else
echo "Hydra will be installed into .../bin of: $PREFIX"
echo " (change this by running ./configure --prefix=path)"
echo
fi

if [ "X" != "X$DEBUG" ]; then
echo DEBUG: XDEFINES=$XDEFINES $MATH
Expand All @@ -1206,6 +1221,10 @@ if [ "X" != "X$DEBUG" ]; then
fi

echo "Writing Makefile.in ..."
if [ "X" != "X$FHS" ]; then
echo "MANDIR = /share/man/man1" >> Makefile.in
echo "DATADIR = /share/hydra" >> Makefile.in
fi
echo "XDEFINES=$XDEFINES $MATH" >> Makefile.in
echo "XLIBS=$XLIBS" >> Makefile.in
echo "XLIBPATHS=$XLIBPATHS" >> Makefile.in
Expand Down
4 changes: 2 additions & 2 deletions hydra.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* hydra (c) 2001-2014 by van Hauser / THC <[email protected]>
* hydra (c) 2001-2016 by van Hauser / THC <[email protected]>
* http://www.thc.org
*
* Parallized network login hacker.
Expand Down Expand Up @@ -2173,7 +2173,7 @@ int main(int argc, char *argv[]) {
struct sockaddr_in6 *ipv6 = NULL;
struct sockaddr_in *ipv4 = NULL;

printf("%s %s (c) 2014 by %s - Please do not use in military or secret service organizations, or for illegal purposes.\n\n", PROGRAM, VERSION, AUTHOR);
printf("%s %s (c) 2016 by %s - Please do not use in military or secret service organizations, or for illegal purposes.\n\n", PROGRAM, VERSION, AUTHOR);
#ifndef LIBPOSTGRES
SERVICES = hydra_string_replace(SERVICES, "postgres ", "");
strcat(unsupported, "postgres ");
Expand Down

0 comments on commit 533fb17

Please sign in to comment.