|
0 |
-- a/ucs-3.2/ucs-3.2-0/base/univention-config-registry/scripts/univention-ldapsearch |
0 |
++ b/ucs-3.2/ucs-3.2-0/base/univention-config-registry/scripts/univention-ldapsearch |
|
1 |
#!/bin/bash |
1 |
#!/bin/sh |
2 |
# |
2 |
# |
3 |
# Univention Configuration Registry |
3 |
# Univention Configuration Registry |
4 |
# Wrap ldapsearch to pass on credentials |
4 |
# Wrap ldapsearch to pass on credentials |
|
30 |
# /usr/share/common-licenses/AGPL-3; if not, see |
30 |
# /usr/share/common-licenses/AGPL-3; if not, see |
31 |
# <http://www.gnu.org/licenses/>. |
31 |
# <http://www.gnu.org/licenses/>. |
32 |
|
32 |
|
33 |
eval "$(/usr/sbin/univention-config-registry shell)" |
|
|
34 |
|
35 |
## check for option -D to avoid "ldapsearch: -D previously specified" |
33 |
## check for option -D to avoid "ldapsearch: -D previously specified" |
36 |
## check for option -w to avoid "ldapsearch: -y incompatible with -w" |
34 |
## check for option -w to avoid "ldapsearch: -y incompatible with -w" |
37 |
for arg in "$@"; do |
35 |
for arg in "$@"; do |
|
43 |
done |
41 |
done |
44 |
|
42 |
|
45 |
if [ -z "$option_D_given" ]; then |
43 |
if [ -z "$option_D_given" ]; then |
46 |
binddn="$ldap_binddn" |
44 |
binddn="$(/usr/sbin/univention-config-registry get ldap/binddn)" |
47 |
if [ -z "$binddn" ]; then |
45 |
if [ -z "$binddn" ]; then |
48 |
binddn="$ldap_hostdn" |
46 |
binddn="$(/usr/sbin/univention-config-registry get ldap/hostdn)" |
49 |
fi |
47 |
fi |
50 |
if [ -z "$option_w_given" ]; then |
48 |
if [ -z "$option_w_given" ]; then |
51 |
bindpw_file="/etc/machine.secret" |
49 |
bindpw_file="/etc/machine.secret" |