[packages/nss_ldapd] - signed values are written over the wire, but ntohl is working on unsigned types
baggins
baggins at pld-linux.org
Thu Dec 12 23:10:37 CET 2013
commit 0ffd2c095ef01c43835417df00d19273f3341fc9
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Dec 12 23:07:21 2013 +0100
- signed values are written over the wire, but ntohl is working on unsigned types
nss_ldapd.spec | 2 ++
ntohl-signedness.patch | 11 +++++++++++
2 files changed, 13 insertions(+)
---
diff --git a/nss_ldapd.spec b/nss_ldapd.spec
index f5a5ac3..e4947db 100644
--- a/nss_ldapd.spec
+++ b/nss_ldapd.spec
@@ -17,6 +17,7 @@ Source2: nslcd.service
Source3: nslcd.tmpfiles
Patch0: %{name}-no-root.patch
Patch1: optimize-queries.patch
+Patch2: ntohl-signedness.patch
URL: http://arthurdejong.org/nss-pam-ldapd/
BuildRequires: autoconf >= 2.61
BuildRequires: automake
@@ -98,6 +99,7 @@ zmianę haseł i obsługę sesji.
%setup -q -n nss-pam-ldapd-%{version}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%{__sed} -i -e '1s|#!.*|#!%{__python}|' utils/*.py
diff --git a/ntohl-signedness.patch b/ntohl-signedness.patch
new file mode 100644
index 0000000..8072e0a
--- /dev/null
+++ b/ntohl-signedness.patch
@@ -0,0 +1,11 @@
+--- nss-pam-ldapd-0.9.2/common/nslcd-prot.h~ 2013-05-15 22:55:33.000000000 +0200
++++ nss-pam-ldapd-0.9.2/common/nslcd-prot.h 2013-12-12 22:01:31.912463111 +0100
+@@ -170,7 +170,7 @@
+
+ #define READ_INT32(fp, i) \
+ READ(fp, &tmpint32, sizeof(int32_t)); \
+- (i) = ntohl(tmpint32); \
++ (i) = (int32_t)ntohl(tmpint32); \
+ DEBUG_PRINT("READ_INT32 : var="__STRING(i)" int32==%08x", (int)(i));
+
+ /* read a string in a fixed-size "normal" buffer */
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nss_ldapd.git/commitdiff/cbd95ecb042d4b043de594ed6c1d57bc1e3f90b2
More information about the pld-cvs-commit
mailing list