[Pkg-samba-maint] [Git][samba-team/samba][master] 2 commits: use explicit_bzero() instead of bzero() for the substitute of memset_s()
Michael Tokarev (@mjt)
gitlab at salsa.debian.org
Wed Oct 19 20:25:09 BST 2022
Michael Tokarev pushed to branch master at Debian Samba Team / samba
Commits:
866a00d2 by Michael Tokarev at 2022-10-16T19:57:50+03:00
use explicit_bzero() instead of bzero() for the substitute of memset_s()
- - - - -
ccd64bc3 by Michael Tokarev at 2022-10-16T20:21:48+03:00
stop using dh_installpam for installing a single pam.d file
- - - - -
3 changed files:
- debian/patches/use-bzero-instead-of-memset_s.diff
- debian/rules
- debian/samba-common.samba.pam → debian/samba.pam
Changes:
=====================================
debian/patches/use-bzero-instead-of-memset_s.diff
=====================================
@@ -11,10 +11,14 @@ this endless linkage is eliminated, so we can package,
for example, libldb (which uses ZERO_STRUCT) without it
linking to libreplace-samba4.
+Note: actually using explicit_bzero() so it is not optimized
+out by the compiler - this is the original goal of using
+memset_s().
+
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index 8609d84322c..28db8d425a3 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -822 +822 @@
-#define ZERO_STRUCT(x) memset_s((char *)&(x), sizeof(x), 0, sizeof(x))
-+#define ZERO_STRUCT(x) bzero((char *)&(x), sizeof(x))
++#define ZERO_STRUCT(x) explicit_bzero((char *)&(x), sizeof(x))
=====================================
debian/rules
=====================================
@@ -239,9 +239,8 @@ override_dh_auto_install-indep:
install -Dp -m755 debian/panic-action -t debian/samba-common/usr/share/samba/
install -Dp -m0644 debian/gdbcommands -t debian/samba-common/etc/samba/
install -Dp -m0755 debian/samba-common.dhcp debian/samba-common/etc/dhcp/dhclient-enter-hooks.d/samba
- # don't actually need installpam here, it just installs one file
- # we wrongly have pam file in samba-common instead of samba, should move it one day
- dh_installpam -psamba-common --name=samba
+ # we wrongly have pam file in samba-common instead of samba
+ install -Dp -m0755 debian/samba.pam debian/samba-common/pam.d/samba
# include a command only if the given package is being built
ifpkg = $(if $(filter ${1},${build_packages}),${2})
=====================================
debian/samba-common.samba.pam → debian/samba.pam
=====================================
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/ab3fcaef0132f64983002f378b065e2e4b388230...ccd64bc30788a169a55c64ffc63be987aacaeed9
--
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/ab3fcaef0132f64983002f378b065e2e4b388230...ccd64bc30788a169a55c64ffc63be987aacaeed9
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-samba-maint/attachments/20221019/817c67ff/attachment-0001.htm>
More information about the Pkg-samba-maint
mailing list