From d028410bf7fc84f0be3a122f9e0241e669cd42cc Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 13 Apr 2021 10:00:57 -0600 Subject: [PATCH] If libssl_dep was not passed in, use ldd to determine its value. Normally, mkpkg will figure this out, but if the user does "make package" outside of the mkpkg script, libssl_dep will not be set. --- etc/sudo-logsrvd.pp | 4 ++++ etc/sudo.pp | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/etc/sudo-logsrvd.pp b/etc/sudo-logsrvd.pp index 5b7bf7f66..4de9f8cb4 100644 --- a/etc/sudo-logsrvd.pp +++ b/etc/sudo-logsrvd.pp @@ -117,6 +117,10 @@ This makes it possible to have all sudo I/O logs on a central server." $name: unstripped-binary-or-object EOF chmod 644 ${pp_wrkdir}/${name}/usr/share/lintian/overrides/${name} + # If libssl_dep not passed in, try to figure it out + if test -z "$libssl_dep"; then + libssl_dep="`ldd $libexecdir/sudo/sudoers.so 2>&1 | sed -n 's/^[ ]*libssl\.so\([0-9.]*\).*/libssl\1/p'`" + fi %endif %if [rpm] diff --git a/etc/sudo.pp b/etc/sudo.pp index 489c1abea..1697f4e79 100644 --- a/etc/sudo.pp +++ b/etc/sudo.pp @@ -90,9 +90,6 @@ still allow people to get their work done." if test -n "$linux_audit"; then pp_rpm_requires="audit-libs >= $linux_audit" fi - if test -z "$libssl_dep"; then - libssl_dep="libssl1.1" - fi # The package manager will handle an existing sudoers file rm -f ${pp_destdir}$sudoersdir/sudoers.dist %else @@ -155,6 +152,10 @@ still allow people to get their work done." $name: unstripped-binary-or-object EOF chmod 644 ${pp_wrkdir}/${name}/usr/share/lintian/overrides/${name} + # If libssl_dep not passed in, try to figure it out + if test -z "$libssl_dep"; then + libssl_dep="`ldd $libexecdir/sudo/sudoers.so 2>&1 | sed -n 's/^[ ]*libssl\.so\([0-9.]*\).*/libssl\1/p'`" + fi %endif %if [rpm]