[SCM] pam wrapper repository - branch master updated
Andreas Schneider
asn at samba.org
Tue Aug 28 09:28:52 UTC 2018
The branch, master has been updated
via 2bc5135 cmake: Don't keep CMAKE_REQUIRED_LIBRARIES around
via 6ab4060 ctest: Move to new dashboard
via f46fff9 cmake: Fix python2 and python3 detection
via 83445b6 pwrap: Improve error message
via cf805f9 pwrap: Don't clean the stale dir twice
via 21979a3 tests: Fix length calulation
via e2760e0 Rename COPYING to LICENSE
via cd067d9 cpack: Do not package build dirs in source tarball
from c46af91 Bump version to 1.0.6
https://git.samba.org/?p=pam_wrapper.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 2bc513562c0fc0dc7c61a93bc1cf0e434227459b
Author: Andreas Schneider <asn at samba.org>
Date: Tue Aug 28 11:18:36 2018 +0200
cmake: Don't keep CMAKE_REQUIRED_LIBRARIES around
This can cause issues with detecting features.
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 6ab4060d52c72d3e5bfae4768afd4babf22f3f26
Author: Andreas Schneider <asn at samba.org>
Date: Thu Jul 5 10:16:27 2018 +0200
ctest: Move to new dashboard
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit f46fff9d70dad90ec619a9ebf832ffc9cd64e35a
Author: Andreas Schneider <asn at samba.org>
Date: Tue Jul 3 11:33:04 2018 +0200
cmake: Fix python2 and python3 detection
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 83445b6f5a2e79b44c336af0592f14a1534cbdbd
Author: Andreas Schneider <asn at samba.org>
Date: Fri Jun 29 15:23:34 2018 +0200
pwrap: Improve error message
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit cf805f9631847aa8be78e78112f2c1c23b3adbaa
Author: Andreas Schneider <asn at samba.org>
Date: Fri Jun 29 15:23:12 2018 +0200
pwrap: Don't clean the stale dir twice
This is already done above.
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 21979a32620269c4e31c5c645087b8bb632b343d
Author: Andreas Schneider <asn at samba.org>
Date: Mon Jun 25 11:02:22 2018 +0200
tests: Fix length calulation
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e2760e0460fbf8074ce1a51b5e8c90869b9a8848
Author: Andreas Schneider <asn at samba.org>
Date: Fri Jun 22 09:14:29 2018 +0200
Rename COPYING to LICENSE
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit cd067d985ab4c29de496fa3952950db0c357606a
Author: Andreas Schneider <asn at samba.org>
Date: Fri Jun 22 09:13:52 2018 +0200
cpack: Do not package build dirs in source tarball
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
CPackConfig.cmake | 4 ++--
CTestConfig.cmake | 6 +++---
ConfigureChecks.cmake | 6 +++---
COPYING => LICENSE | 0
src/pam_wrapper.c | 4 +---
src/python/python2/CMakeLists.txt | 40 ++++++++++++++++++++++++---------------
src/python/python3/CMakeLists.txt | 40 ++++++++++++++++++++++++---------------
tests/test_pam_wrapper.c | 2 +-
8 files changed, 60 insertions(+), 42 deletions(-)
rename COPYING => LICENSE (100%)
Changeset truncated at 500 lines:
diff --git a/CPackConfig.cmake b/CPackConfig.cmake
index 3158a44..88caa30 100644
--- a/CPackConfig.cmake
+++ b/CPackConfig.cmake
@@ -7,7 +7,7 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The pam_wrapper")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README")
set(CPACK_PACKAGE_VENDOR "Samba Team")
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
### versions
@@ -19,7 +19,7 @@ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSIO
### source generator
set(CPACK_SOURCE_GENERATOR "TGZ")
-set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/build/;/obj*/;tags;cscope.*")
+set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/build*;/obj*;tags;cscope.*")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "pam_wrapper")
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index 94b3d74..57963ee 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -1,9 +1,9 @@
set(UPDATE_TYPE "true")
set(CTEST_PROJECT_NAME "pam_wrapper")
-set(CTEST_NIGHTLY_START_TIME "01:00:00 CET")
+set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
set(CTEST_DROP_METHOD "https")
-set(CTEST_DROP_SITE "mock.cryptomilk.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=pamwrapper")
+set(CTEST_DROP_SITE "test.cmocka.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=${CTEST_PROJECT_NAME}")
set(CTEST_DROP_SITE_CDASH TRUE)
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 2fdd296..3148c23 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -75,9 +75,10 @@ endif()
check_library_exists(${PAM_LIBRARY} openpam_set_option "" HAVE_OPENPAM)
# PAM FUNCTIONS
-set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${PAM_LIBRARY})
+set(CMAKE_REQUIRED_LIBRARIES ${PAM_LIBRARY})
check_function_exists(pam_syslog HAVE_PAM_SYSLOG)
check_function_exists(pam_vsyslog HAVE_PAM_VSYSLOG)
+unset(CMAKE_REQUIRED_LIBRARIES)
# OPTIONS
@@ -149,7 +150,6 @@ int main(void) {
check_library_exists(dl dlopen "" HAVE_LIBDL)
if (HAVE_LIBDL)
find_library(DLFCN_LIBRARY dl)
- set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${DLFCN_LIBRARY})
endif (HAVE_LIBDL)
if (OSX)
@@ -161,4 +161,4 @@ if (NOT WIN32)
test_big_endian(WORDS_BIGENDIAN)
endif (NOT WIN32)
-set(UIDWRAP_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "uidwrap required system libraries")
+set(UIDWRAP_REQUIRED_LIBRARIES ${DLFCN_LIBRARY} CACHE INTERNAL "uidwrap required system libraries")
diff --git a/COPYING b/LICENSE
similarity index 100%
rename from COPYING
rename to LICENSE
diff --git a/src/pam_wrapper.c b/src/pam_wrapper.c
index 8064954..230a45d 100644
--- a/src/pam_wrapper.c
+++ b/src/pam_wrapper.c
@@ -896,8 +896,6 @@ static void pwrap_init(void)
PWRAP_LOG(PWRAP_LOG_DEBUG, "Initialize pam_wrapper");
- pwrap_clean_stale_dirs(tmp_config_dir);
-
pwrap.config_dir = strdup(tmp_config_dir);
if (pwrap.config_dir == NULL) {
PWRAP_LOG(PWRAP_LOG_ERROR,
@@ -945,7 +943,7 @@ static void pwrap_init(void)
rc = mkdir(libpam_path, 0755);
if (rc != 0) {
PWRAP_LOG(PWRAP_LOG_ERROR,
- "Failed to create pam_wrapper config dir: %s - %s",
+ "Failed to create path for libpam: %s - %s",
tmp_config_dir, strerror(errno));
p_rmdirs(pwrap.config_dir);
exit(1);
diff --git a/src/python/python2/CMakeLists.txt b/src/python/python2/CMakeLists.txt
index faceec3..02b4063 100644
--- a/src/python/python2/CMakeLists.txt
+++ b/src/python/python2/CMakeLists.txt
@@ -1,23 +1,33 @@
project(python2-pamtest C)
-unset(PYTHON_EXECUTABLE CACHE)
-unset(PYTHON_INCLUDE_DIR CACHE)
-unset(PYTHON_LIBRARY CACHE)
-unset(PYTHON_SITELIB CACHE)
-unset(PYTHONLIBS_FOUND CACHE)
-unset(PYTHONLIBS_VERSION_STRING CACHE)
+if (NOT PYTHON2_LIBRARY)
+ unset(PYTHON_EXECUTABLE CACHE)
+ unset(PYTHON_INCLUDE_DIR CACHE)
+ unset(PYTHON_LIBRARY CACHE)
+ unset(PYTHON_SITELIB CACHE)
+ unset(PYTHONLIBS_FOUND CACHE)
+ unset(PYTHONLIBS_VERSION_STRING CACHE)
-set(Python_ADDITIONAL_VERSIONS 2.7 2.6)
-find_package(PythonLibs)
-find_package(PythonInterp)
-find_package(PythonSiteLibs)
+ find_package(PythonLibs 2)
+ find_package(PythonInterp 2)
+ find_package(PythonSiteLibs 2)
-if (PYTHONLIBS_FOUND)
- set(PYTHON2_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "PYTHON2_EXECUTABLE")
- set(PYTHON2_INCLUDE_DIR ${PYTHON_INCLUDE_DIR})
- set(PYTHON2_LIBRARY ${PYTHON_LIBRARY})
- set(PYTHON2_SITELIB ${PYTHON_SITELIB})
+ if (PYTHONLIBS_FOUND)
+ set(PYTHON2_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "PYTHON2_EXECUTABLE")
+ set(PYTHON2_INCLUDE_DIR ${PYTHON_INCLUDE_DIR})
+ set(PYTHON2_LIBRARY ${PYTHON_LIBRARY})
+ set(PYTHON2_SITELIB ${PYTHON_SITELIB})
+ endif()
+ unset(PYTHON_EXECUTABLE CACHE)
+ unset(PYTHON_INCLUDE_DIR CACHE)
+ unset(PYTHON_LIBRARY CACHE)
+ unset(PYTHON_SITELIB CACHE)
+ unset(PYTHONLIBS_FOUND CACHE)
+ unset(PYTHONLIBS_VERSION_STRING CACHE)
+endif()
+
+if (PYTHON2_INCLUDE_DIR AND PYTHON2_LIBRARY AND PYTHON2_SITELIB)
include_directories(${CMAKE_BINARY_DIR})
include_directories(${pam_wrapper-headers_DIR})
include_directories(${PYTHON2_INCLUDE_DIR})
diff --git a/src/python/python3/CMakeLists.txt b/src/python/python3/CMakeLists.txt
index 1e1599b..1a61303 100644
--- a/src/python/python3/CMakeLists.txt
+++ b/src/python/python3/CMakeLists.txt
@@ -1,23 +1,33 @@
project(python3-pamtest C)
-unset(PYTHON_EXECUTABLE CACHE)
-unset(PYTHON_INCLUDE_DIR CACHE)
-unset(PYTHON_LIBRARY CACHE)
-unset(PYTHON_SITELIB CACHE)
-unset(PYTHONLIBS_FOUND CACHE)
-unset(PYTHONLIBS_VERSION_STRING CACHE)
+if (NOT PYTHON3_LIBRARY)
+ unset(PYTHON_EXECUTABLE CACHE)
+ unset(PYTHON_INCLUDE_DIR CACHE)
+ unset(PYTHON_LIBRARY CACHE)
+ unset(PYTHON_SITELIB CACHE)
+ unset(PYTHONLIBS_FOUND CACHE)
+ unset(PYTHONLIBS_VERSION_STRING CACHE)
-set(Python_ADDITIONAL_VERSIONS 3.8 3.7 3.6)
-find_package(PythonLibs)
-find_package(PythonInterp)
-find_package(PythonSiteLibs)
+ find_package(PythonLibs 3)
+ find_package(PythonInterp 3)
+ find_package(PythonSiteLibs 3)
-if (PYTHONLIBS_FOUND)
- set(PYTHON3_LIBRARY ${PYTHON_LIBRARY})
- set(PYTHON3_INCLUDE_DIR ${PYTHON_INCLUDE_DIR})
- set(PYTHON3_SITELIB ${PYTHON_SITELIB})
- set(PYTHON3_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "PYTHON3_EXECUTABLE")
+ if (PYTHONLIBS_FOUND)
+ set(PYTHON3_LIBRARY ${PYTHON_LIBRARY})
+ set(PYTHON3_INCLUDE_DIR ${PYTHON_INCLUDE_DIR})
+ set(PYTHON3_SITELIB ${PYTHON_SITELIB})
+ set(PYTHON3_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "PYTHON3_EXECUTABLE")
+ endif()
+ unset(PYTHON_EXECUTABLE CACHE)
+ unset(PYTHON_INCLUDE_DIR CACHE)
+ unset(PYTHON_LIBRARY CACHE)
+ unset(PYTHON_SITELIB CACHE)
+ unset(PYTHONLIBS_FOUND CACHE)
+ unset(PYTHONLIBS_VERSION_STRING CACHE)
+endif()
+
+if (PYTHON3_INCLUDE_DIR AND PYTHON3_LIBRARY AND PYTHON3_SITELIB)
include_directories(${CMAKE_BINARY_DIR})
include_directories(${pam_wrapper-headers_DIR})
include_directories(${PYTHON3_INCLUDE_DIR})
diff --git a/tests/test_pam_wrapper.c b/tests/test_pam_wrapper.c
index c4093d7..d326e6f 100644
--- a/tests/test_pam_wrapper.c
+++ b/tests/test_pam_wrapper.c
@@ -127,7 +127,7 @@ static int setup_passdb(void **state)
db = getcwd(passdb_path, PATH_MAX);
assert_non_null(db);
assert_true(strlen(passdb_path) + sizeof("/passdb") < PATH_MAX);
- db = strncat(passdb_path, "/passdb", sizeof("/passdb"));
+ db = strncat(passdb_path, "/passdb", strlen("/passdb") + 1);
rv = setenv("PAM_MATRIX_PASSWD", passdb_path, 1);
assert_int_equal(rv, 0);
--
pam wrapper repository
More information about the samba-cvs
mailing list