[packages/nss_ldapd] - use proper buffer when converting date from AD format

baggins baggins at pld-linux.org
Thu Dec 12 23:10:42 CET 2013


commit d808c7bb4a21c2c906d01a50ad8bcd9b453b253c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Dec 12 23:09:59 2013 +0100

    - use proper buffer when converting date from AD format

 fix-to_date.patch | 11 +++++++++++
 nss_ldapd.spec    |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/nss_ldapd.spec b/nss_ldapd.spec
index e4947db..7e52d38 100644
--- a/nss_ldapd.spec
+++ b/nss_ldapd.spec
@@ -18,6 +18,7 @@ Source3:	nslcd.tmpfiles
 Patch0:		%{name}-no-root.patch
 Patch1:		optimize-queries.patch
 Patch2:		ntohl-signedness.patch
+Patch3:		fix-to_date.patch
 URL:		http://arthurdejong.org/nss-pam-ldapd/
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
@@ -100,6 +101,7 @@ zmianę haseł i obsługę sesji.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %{__sed} -i -e '1s|#!.*|#!%{__python}|' utils/*.py
 
diff --git a/fix-to_date.patch b/fix-to_date.patch
new file mode 100644
index 0000000..8eae348
--- /dev/null
+++ b/fix-to_date.patch
@@ -0,0 +1,11 @@
+--- nss-pam-ldapd-0.9.2/nslcd/shadow.c~	2013-12-11 18:52:47.177442335 +0100
++++ nss-pam-ldapd-0.9.2/nslcd/shadow.c	2013-12-12 22:40:40.959742532 +0100
+@@ -132,7 +132,7 @@
+     strncpy(buffer, date, l);
+     buffer[l] = '\0';
+     errno = 0;
+-    value = strtol(date, &tmp, 10);
++    value = strtol(buffer, &tmp, 10);
+     if ((*date == '\0') || (*tmp != '\0'))
+     {
+       log_log(LOG_WARNING, "%s: %s: non-numeric", dn, attr);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nss_ldapd.git/commitdiff/cbd95ecb042d4b043de594ed6c1d57bc1e3f90b2



More information about the pld-cvs-commit mailing list