[PATCH] Fix a CID in pdb_nds
Volker Lendecke
Volker.Lendecke at SerNet.DE
Fri Apr 6 13:59:37 UTC 2018
Hi, Jim!
Question: Is this still in active use, or can we remove that at some
point? Do many eDirectory installs with Samba still exist today?
Review appreciated!
Thanks, Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 08fa2a7b4143d9895a300c9fd07a0d315d6014ca Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 6 Apr 2018 15:57:36 +0200
Subject: [PATCH] pdb_nds: Fix CID 1273401 Unused value
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/passdb/pdb_nds.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/source3/passdb/pdb_nds.c b/source3/passdb/pdb_nds.c
index 6245ecbae2d..349ea0b6c38 100644
--- a/source3/passdb/pdb_nds.c
+++ b/source3/passdb/pdb_nds.c
@@ -183,15 +183,19 @@ static int berEncodeLoginData(
err = (ber_printf(requestBer, "}}", 0) < 0) ? LDAP_ENCODING_ERROR : 0;
}
- if(putData)
- {
+ if (!err) {
+ if (putData) {
/* BER Encode the the tag and data */
- err = (ber_printf(requestBer, "oio}", utf8TagPtr, utf8TagSize, putDataLen, putData, putDataLen) < 0) ? LDAP_ENCODING_ERROR : 0;
- }
- else
- {
+ err = (ber_printf(requestBer, "oio}", utf8TagPtr,
+ utf8TagSize, putDataLen, putData,
+ putDataLen) < 0)
+ ? LDAP_ENCODING_ERROR : 0;
+ } else {
/* BER Encode the the tag */
- err = (ber_printf(requestBer, "o}", utf8TagPtr, utf8TagSize) < 0) ? LDAP_ENCODING_ERROR : 0;
+ err = (ber_printf(requestBer, "o}", utf8TagPtr,
+ utf8TagSize) < 0)
+ ? LDAP_ENCODING_ERROR : 0;
+ }
}
if (err)
--
2.17.0
More information about the samba-technical
mailing list