39bc6c35f1
Porting all CentOS patches, and also align the file permission with CentOS. Test Plan: Verify the building, installing and booting test PASS: Verify package build PASS: Verify system install PASS: Verify system boot Story: 2009221 Task: 43415 Signed-off-by: Yue Tao <yue.tao@windriver.com> Change-Id: I7766d4aa26420c6f701a0dffaa7e9bf6b77e0c75
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From bee43b9f75ee7a2cee0391319528264014d775f7 Mon Sep 17 00:00:00 2001
|
|
From: Kam Nasim <kam.nasim@windriver.com>
|
|
Date: Mon, 16 Apr 2018 14:58:03 -0400
|
|
Subject: [PATCH] ldapscripts - allow anonymous bind for ldap search
|
|
|
|
---
|
|
lib/runtime | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/lib/runtime b/lib/runtime
|
|
index 012ac95..18acf3f 100644
|
|
--- a/lib/runtime
|
|
+++ b/lib/runtime
|
|
@@ -197,8 +197,11 @@ _ldapsearch () {
|
|
elif [ -n "$BINDPWDFILE" ]
|
|
then
|
|
$LDAPSEARCHBIN $LDAPBINOPTS $LDAPSEARCHOPTS -y "$BINDPWDFILE" -D "$BINDDN" -b "${1:-$SUFFIX}" -xH "$SERVER" -s sub -LLL "${2:-(objectclass=*)}" "${3:-*}" 2>>"$LOGFILE"
|
|
- else
|
|
+ elif [ -n "$BINDPWD" ]
|
|
+ then
|
|
$LDAPSEARCHBIN $LDAPBINOPTS $LDAPSEARCHOPTS -w "$BINDPWD" -D "$BINDDN" -b "${1:-$SUFFIX}" -xH "$SERVER" -s sub -LLL "${2:-(objectclass=*)}" "${3:-*}" 2>>"$LOGFILE"
|
|
+ else
|
|
+ $LDAPSEARCHBIN $LDAPBINOPTS $LDAPSEARCHOPTS -D "$BINDDN" -b "${1:-$SUFFIX}" -xH "$SERVER" -s sub -LLL "${2:-(objectclass=*)}" "${3:-*}" 2>>"$LOGFILE"
|
|
fi
|
|
}
|
|
|
|
@@ -785,7 +788,7 @@ then
|
|
then
|
|
warn_log "Warning : using command-line passwords, ldapscripts may not be safe"
|
|
else
|
|
- end_die "Unable to read password file $BINDPWDFILE, exiting..."
|
|
+ warn_log "Warning: Unable to read password file $BINDPWDFILE, binding anonymously..."
|
|
fi
|
|
fi
|
|
fi
|
|
--
|
|
1.8.3.1
|
|
|