diff options
author | aurelien <aurelien@cwb.io> | 2013-09-23 10:33:22 +0200 |
---|---|---|
committer | aurelien <aurelien@cwb.io> | 2013-09-23 10:33:22 +0200 |
commit | 2735c9d273c54b555681f30f5c685998fed7b484 (patch) | |
tree | f8172dbea44d1c4751a99a62fb236a14c9d2dc20 /pcr/zoneminder/zoneminder-1.25.0-gcrypt.patch | |
parent | d78a32a6ccb8663a62a093b54e947e2efc840fe0 (diff) | |
parent | 97f65e06566f3bb15bc7395624017b8e6ca0d043 (diff) | |
download | abslibre-2735c9d273c54b555681f30f5c685998fed7b484.tar.gz abslibre-2735c9d273c54b555681f30f5c685998fed7b484.tar.bz2 abslibre-2735c9d273c54b555681f30f5c685998fed7b484.zip |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'pcr/zoneminder/zoneminder-1.25.0-gcrypt.patch')
-rw-r--r-- | pcr/zoneminder/zoneminder-1.25.0-gcrypt.patch | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/pcr/zoneminder/zoneminder-1.25.0-gcrypt.patch b/pcr/zoneminder/zoneminder-1.25.0-gcrypt.patch new file mode 100644 index 000000000..21f197ec6 --- /dev/null +++ b/pcr/zoneminder/zoneminder-1.25.0-gcrypt.patch @@ -0,0 +1,86 @@ +diff -up ./configure.ac.gcrypt ./configure.ac +--- ./configure.ac.gcrypt 2012-01-19 12:58:20.647123209 -0600 ++++ ./configure.ac 2012-01-19 13:12:34.186669577 -0600 +@@ -13,7 +13,7 @@ AC_ARG_VAR(ZM_DB_HOST,[Hostname where Zo + AC_ARG_VAR(ZM_DB_NAME,[Name of ZoneMinder database, default zm]) + AC_ARG_VAR(ZM_DB_USER,[Name of ZoneMinder database user, default zmuser]) + AC_ARG_VAR(ZM_DB_PASS,[Password of ZoneMinder database user, default zmpass]) +-AC_ARG_VAR(ZM_SSL_LIB,[Library to use for ssl functions, default gnutls]) ++AC_ARG_VAR(ZM_SSL_LIB,[Library to use for MD5 function, default libgcrypt]) + AC_ARG_VAR(ZM_MYSQL_ENGINE,[MySQL engine to use with database, default MyISAM]) + AC_ARG_VAR(ZM_RUNDIR,[Location of transient process files, default /var/run/zm]) + AC_ARG_VAR(ZM_TMPDIR,[Location of temporary files, default /tmp/zm]) +@@ -32,7 +32,7 @@ if test "$ZM_DB_PASS" == ""; then + AC_SUBST(ZM_DB_PASS,[zmpass]) + fi + if test "$ZM_SSL_LIB" == ""; then +- AC_SUBST(ZM_SSL_LIB,gnutls) ++ AC_SUBST(ZM_SSL_LIB,libgcrypt) + fi + if test "$ZM_MYSQL_ENGINE" == ""; then + AC_SUBST(ZM_MYSQL_ENGINE,MyISAM) +@@ -264,11 +264,10 @@ AC_CHECK_LIB(jpeg,jpeg_start_compress,,A + AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a)) + AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a)) + if test "$ZM_SSL_LIB" == "openssl"; then +-AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead])) ++AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select libgcrypt instead])) + else +-AC_CHECK_HEADERS(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed for gnutls),) ++AC_CHECK_HEADERS(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed),) + AC_CHECK_LIB(gcrypt,gcry_check_version,,AC_MSG_WARN([libgcrypt.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead])) +-AC_CHECK_LIB(gnutls-openssl,MD5,,AC_MSG_WARN([gnutls-openssl.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead])) + fi + AC_CHECK_LIB(pcre,pcre_compile,,AC_MSG_WARN(libpcre.a may be required for remote/network camera support)) + AC_CHECK_LIB(z,zlibVersion) +@@ -320,9 +319,6 @@ AC_CHECK_DECLS(round,,,[#include <math.h + if test "$ZM_SSL_LIB" == "openssl"; then + AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires openssl/md5.h - use ZM_SSL_LIB option to select gnutls instead]),[#include <stdlib.h> + #include <openssl/md5.h>]) +-else +-AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires gnutls/openssl.h - use ZM_SSL_LIB option to select openssl instead]),[#include <stdlib.h> +-#include <gnutls/openssl.h>]) + fi + AC_CHECK_DECLS(backtrace,,,[#include <execinfo.h>]) + +diff -up ./src/zm_user.cpp.gcrypt ./src/zm_user.cpp +--- ./src/zm_user.cpp.gcrypt 2011-08-03 06:31:06.000000000 -0500 ++++ ./src/zm_user.cpp 2012-01-19 12:58:20.654122992 -0600 +@@ -140,6 +140,18 @@ User *zmLoadUser( const char *username, + return( user ); + } + ++#ifdef HAVE_GCRYPT_H ++#define HAVE_DECL_MD5 1 ++#define MD5_DIGEST_LENGTH 16 ++static unsigned char *MD5(const unsigned char *data, unsigned long len, ++ unsigned char *md) ++{ ++ gcry_md_hash_buffer(GCRY_MD_MD5, md, data, len); ++ ++ return md; ++} ++#endif ++ + // Function to validate an authentication string + User *zmLoadAuthUser( const char *auth, bool use_remote_addr ) + { +diff -up ./src/zm_user.h.gcrypt ./src/zm_user.h +--- ./src/zm_user.h.gcrypt 2010-11-11 06:11:07.000000000 -0600 ++++ ./src/zm_user.h 2012-01-19 13:14:11.200654694 -0600 +@@ -23,14 +23,11 @@ + #ifndef ZM_USER_H
+ #define ZM_USER_H
+
+-#if HAVE_LIBGNUTLS_OPENSSL
+-#include <gnutls/openssl.h>
+ #if HAVE_GCRYPT_H
+ #include <gcrypt.h>
+-#endif // HAVE_GCRYPT_H
+ #elif HAVE_LIBCRYPTO
+ #include <openssl/md5.h>
+-#endif // HAVE_LIBGNUTLS_OPENSSL || HAVE_LIBCRYPTO
++#endif // HAVE_GCRYPT_H || HAVE_LIBCRYPTO
+
+ class User
+ {
|