From 605986b79825baa6d2251faf169328e707a75755 Mon Sep 17 00:00:00 2001 From: Timo Aaltonen Date: Wed, 25 Jun 2025 12:18:55 +0300 Subject: [PATCH] patches: Fix samba lock directory location. (Closes: #1012593) --- debian/changelog | 1 + ...ba-lock-directory-configurable-and-u.patch | 54 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 56 insertions(+) create mode 100644 debian/patches/Make-path-of-Samba-lock-directory-configurable-and-u.patch diff --git a/debian/changelog b/debian/changelog index a9751e718..bf92c36f4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ freeipa (4.12.2-4) UNRELEASED; urgency=medium * control: Demote libnss-myhostname to Suggests. + * patches: Fix samba lock directory location. (Closes: #1012593) -- Timo Aaltonen Wed, 05 Feb 2025 08:22:41 +0200 diff --git a/debian/patches/Make-path-of-Samba-lock-directory-configurable-and-u.patch b/debian/patches/Make-path-of-Samba-lock-directory-configurable-and-u.patch new file mode 100644 index 000000000..c4dd9801a --- /dev/null +++ b/debian/patches/Make-path-of-Samba-lock-directory-configurable-and-u.patch @@ -0,0 +1,54 @@ +From 1e47185289fbbe29eedca82a4872d1d075b26c26 Mon Sep 17 00:00:00 2001 +From: Frederik Himpe +Date: Thu, 27 Feb 2025 11:28:30 +0100 +Subject: [PATCH] Make path of Samba lock directory configurable and use + /run/samba on Debian + +Signed-off-by: Frederik Himpe +Reviewed-By: Alexander Bokovoy +--- + ipaplatform/base/paths.py | 1 + + ipaplatform/debian/paths.py | 1 + + ipaserver/install/adtrustinstance.py | 2 +- + 3 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py +index 6a62d7bd0..f794aae6d 100644 +--- a/ipaplatform/base/paths.py ++++ b/ipaplatform/base/paths.py +@@ -350,6 +350,7 @@ class BasePathNamespace: + KRA_CS_CFG_PATH = "/var/lib/pki/pki-tomcat/conf/kra/CS.cfg" + KRACERT_P12 = "/root/kracert.p12" + SAMBA_DIR = "/var/lib/samba" ++ SAMBA_LOCKDIR = "/var/lib/samba/lock" + SSSD_DB = "/var/lib/sss/db" + SSSD_MC_GROUP = "/var/lib/sss/mc/group" + SSSD_MC_PASSWD = "/var/lib/sss/mc/passwd" +diff --git a/ipaplatform/debian/paths.py b/ipaplatform/debian/paths.py +index 7a8099680..229f185f0 100644 +--- a/ipaplatform/debian/paths.py ++++ b/ipaplatform/debian/paths.py +@@ -44,6 +44,7 @@ class DebianPathNamespace(BasePathNamespace): + OPENSSL_DIR = "/usr/lib/ssl" + OPENSSL_CERTS_DIR = "/usr/lib/ssl/certs" + OPENSSL_PRIVATE_DIR = "/usr/lib/ssl/private" ++ SAMBA_LOCKDIR = "/run/samba" + ETC_DEBIAN_VERSION = "/etc/debian_version" + # Old versions of freeipa wrote all trusted certificates to a single + # file, which is not supported by ca-certificates. +diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py +index df2586ef1..bc3a282e6 100644 +--- a/ipaserver/install/adtrustinstance.py ++++ b/ipaserver/install/adtrustinstance.py +@@ -962,7 +962,7 @@ class ADTRUSTInstance(service.Service): + # in /var/lib/samba and /var/lib/samba/private + for smbpath in (paths.SAMBA_DIR, + os.path.join(paths.SAMBA_DIR, "private"), +- os.path.join(paths.SAMBA_DIR, "lock")): ++ paths.SAMBA_LOCKDIR): + if os.path.isdir(smbpath): + tdb_files = [ + os.path.join(smbpath, tdb_file) +-- +2.48.1 + diff --git a/debian/patches/series b/debian/patches/series index a9d368b1b..be73fab0f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,4 @@ fix-sssd-socket-activation.diff # send upstream map-ssh-service.diff +Make-path-of-Samba-lock-directory-configurable-and-u.patch