sssd/0012-sbus-dectect-python-binary-for-sbus_generate.sh.patch

88 lines
2.8 KiB
Diff
Raw Normal View History

Backport a bunch of upstream fixes - Resolves: upstream#3821 - crash related to sbus_router_destructor() - Resolves: upstream#3810 - sbus2: fix memory leak in sbus_message_bound_ref - Resolves: upstream#3819 - sssd only sets the SELinux login context if it differs from the default - Resolves: upstream#3807 - The sbus codegen script relies on "python" which might not be available on all distributions - Resolves: upstream#3820 - sudo: search with lower cased name for case insensitive domains - Resolves: upstream#3701 - [RFE] Allow changing default behavior of SSSD from an allow-any default to a deny-any default when it can't find any GPOs to apply to a user login. - Resolves: upstream#3828 - Invalid domain provider causes SSSD to abort startup - Resolves: upstream#3500 - Make sure sssd is a replacement for pam_pkcs11 also for local account authentication - Resolves: upstream#3812 - sssd 2.0.0 segfaults on startup - Resolves: upstream#3826 - Remove references of sss_user/group/add/del commands in man pages since local provider is deprecated - Resolves: upstream#3827 - SSSD should log to syslog if a domain is not started due to a misconfiguration - Resolves: upstream#3830 - Printing incorrect information about domain with sssctl utility - Resolves: upstream#3489 - p11_child should work wit openssl1.0+ - Resolves: upstream#3750 - [RFE] man 5 sssd-files should mention necessary changes in nsswitch.conf - Resovles: upstream#3650 - RFE: Require smartcard authentication - Resolves: upstream#3334 - sssctl config-check does not check any special characters in domain name of domain section - Resolves: upstream#3849 - Files: The files provider always enumerates which causes duplicate when running getent passwd - Related: upstream#3855 - session not recording for local user when groups defined - Resolves: upstream#3802 - Reuse sysdb_error_to_errno() outside sysdb - Related: upstream#3493 - Remove the pysss.local interface
2018-10-24 08:34:15 +00:00
From b03179ead11db7dbfd6a00d3eeef3dac0990f826 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose@redhat.com>
Date: Mon, 10 Sep 2018 15:40:14 +0200
Subject: [PATCH 17/83] sbus: dectect python binary for sbus_generate.sh
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We already detect python2 and python3 binaries during configure. With
this patch PYTHON_EXEC is set to the python3 binary if python3 bindings
are generated and to the python2 binary otherwise. With the help of an
environment variable sbus_generate.sh is made aware of it.
Related to https://pagure.io/SSSD/sssd/issue/3807
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
---
Makefile.am | 4 ++--
configure.ac | 8 ++++++++
sbus_generate.sh => sbus_generate.sh.in | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
rename sbus_generate.sh => sbus_generate.sh.in (93%)
diff --git a/Makefile.am b/Makefile.am
index 11d0405..deb9ce3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1020,14 +1020,14 @@ libsss_cert_la_LDFLAGS = \
$(NULL)
generate-sbus-code:
- $(srcdir)/sbus_generate.sh $(abs_srcdir)
+ $(builddir)/sbus_generate.sh $(abs_srcdir)
.PHONY: generate-sbus-code
BUILT_SOURCES += generate-sbus-code
EXTRA_DIST += \
- sbus_generate.sh \
+ sbus_generate.sh.in \
src/sbus/codegen/dbus.xml \
src/sbus/codegen/sbus_CodeGen.py \
src/sbus/codegen/sbus_DataType.py \
diff --git a/configure.ac b/configure.ac
index 1aac65f..bb18ad4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -373,6 +373,13 @@ them please use argument --without-python3-bindings when running configure.])])
SSS_CLEAN_PYTHON_VARIABLES
fi
+if test x$HAVE_PYTHON3_BINDINGS = x1; then
+ PYTHON_EXEC=$PYTHON3
+else
+ PYTHON_EXEC=$PYTHON2
+fi
+AC_SUBST(PYTHON_EXEC)
+
AM_CONDITIONAL([BUILD_PYTHON_BINDINGS],
[test x"$with_python2_bindings" = xyes \
-o x"$with_python3_bindings" = xyes])
@@ -524,4 +531,5 @@ AC_CONFIG_FILES([Makefile contrib/sssd.spec src/examples/rwtab src/doxy.config
src/config/setup.py
src/systemtap/sssd.stp
src/config/SSSDConfig/__init__.py])
+AC_CONFIG_FILES([sbus_generate.sh], [chmod +x sbus_generate.sh])
AC_OUTPUT
diff --git a/sbus_generate.sh b/sbus_generate.sh.in
similarity index 93%
rename from sbus_generate.sh
rename to sbus_generate.sh.in
index 338fd9d..b2c695e 100755
--- a/sbus_generate.sh
+++ b/sbus_generate.sh.in
@@ -13,7 +13,7 @@ generate() {
echo "Generating sbus code for: $XML"
- python $CODEGEN --sbus sbus --util util \
+ @PYTHON_EXEC@ $CODEGEN --sbus sbus --util util \
--headers "$HEADERS" \
--dest "$SRCDIR/src/$DEST" \
--fileprefix "sbus_${PREFIX}_" \
--
2.9.5