Commit 20a05ed4 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Suck in latest changes from HEAD

parent f7419e1c
......@@ -1183,3 +1183,25 @@ AC_DEFUN(OL_FUNC_GETHOSTBYADDR_R_NARGS,
fi
])dnl
dnl
dnl --------------------------------------------------------------------
dnl Check for Cyrus SASL version compatility, need 2.1.3 or newer
AC_DEFUN([OL_SASL_COMPAT],
[AC_CACHE_CHECK([Cyrus SASL library version], [ol_cv_sasl_compat],[
AC_EGREP_CPP(__sasl_compat,[
#ifdef HAVE_SASL_SASL_H
#include <sasl/sasl.h>
#else
#include <sasl.h>
#endif
/* require 2.1.3 or later */
#if SASL_VERSION_MAJOR == 1 && SASL_VERSION_MINOR >= 5
char *__sasl_compat = "1.5.x okay";
#elif SASL_VERSION_MAJOR == 2 && SASL_VERSION_MINOR > 1
__sasl_compat "2.2+ or better okay (we guess)";
#elif SASL_VERSION_MAJOR == 2 && SASL_VERSION_MINOR == 1 \
&& SASL_VERSION_STEP >=3
__sasl_compat = "2.1.3+ or better okay";
#endif
], [ol_cv_sasl_compat=yes], [ol_cv_sasl_compat=no])])
])
......@@ -7,9 +7,9 @@
ol_package=OpenLDAP
ol_major=2
ol_minor=1
ol_patch=1beta
ol_api_inc=20101
ol_api_lib=2:101:0
ol_patch=X
ol_api_inc=20102
ol_api_lib=2:102:0
if test $ol_patch != X ; then
ol_version=${ol_major}.${ol_minor}.${ol_patch}
......
This diff is collapsed.
......@@ -526,7 +526,6 @@ BUILD_SQL_DYNAMIC=static
SLAPD_MODULES_LDFLAGS=
SLAPD_MODULES_CPPFLAGS=
SLAPD_MODULES_LIST=
SLAPD_STATIC_BACKENDS=
SLAPD_DYNAMIC_BACKENDS=
......@@ -611,7 +610,13 @@ dnl The default CFLAGS is empty NOT whatever AC_PROG_CC sets.
dnl (for now, let autoconf sort this out)
dnl CFLAGS=${CFLAGS-""}
AC_CHECK_PROGS(AR,ar gar,ar)
if test -z "${AR}"; then
AC_CHECK_PROGS(AR,ar gar,missing)
if test "${AR}" = "missing" ; then
AC_MSG_ERROR([Unable to locate ar(1). Check PATH or set AR.])
fi
fi
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_DLOPEN
......@@ -2129,6 +2134,12 @@ if test $ol_with_cyrus_sasl != no ; then
fi
fi
else
OL_SASL_COMPAT
if test $ol_cv_sasl_compat = no ; then
ol_link_sasl=no
AC_MSG_ERROR([Cyrus SASL library located but incompatible])
fi
AC_DEFINE(HAVE_CYRUS_SASL,1,[define if you have Cyrus SASL])
SASL_LIBS="$ol_link_sasl"
if test $ol_enable_spasswd != no ; then
......@@ -2369,6 +2380,7 @@ AC_CHECK_FUNCS( \
read \
recv \
recvfrom \
recvmsg \
setpwfile \
setgid \
setegid \
......@@ -2478,7 +2490,6 @@ if test "$ol_enable_bdb" != no ; then
[define to support dynamic BDB backend])
BUILD_BDB=mod
BUILD_BDB_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
else
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
......@@ -2494,7 +2505,6 @@ if test "$ol_link_dnssrv" != no ; then
[define to support dynamic DNS SRV backend])
BUILD_DNSSRV=mod
BUILD_DNSSRV_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
else
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
......@@ -2510,7 +2520,6 @@ if test "$ol_enable_ldap" != no ; then
[define to support dynamic LDAP backend])
BUILD_LDAP=mod
BUILD_LDAP_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
else
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
......@@ -2527,7 +2536,6 @@ if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
[define to support dynamic LDBM backend])
BUILD_LDBM=mod
BUILD_LDBM_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
else
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
......@@ -2544,12 +2552,13 @@ if test "$ol_enable_meta" != no ; then
AC_DEFINE(SLAPD_META,1,[define to support LDAP Metadirectory backend])
BUILD_SLAPD=yes
BUILD_META=yes
BUILD_LDAP=yes
BUILD_REWRITE=yes
if test "$ol_with_meta_module" != static ; then
AC_DEFINE(SLAPD_META_DYNAMIC,1,
[define to support dynamic LDAP Metadirectory backend])
BUILD_META=mod
BUILD_META_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
else
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
......@@ -2565,7 +2574,6 @@ if test "$ol_enable_monitor" != no ; then
[define to support dynamic cn=Monitor backend])
BUILD_MONITOR=mod
BUILD_MONITOR_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
else
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
......@@ -2581,7 +2589,6 @@ if test "$ol_enable_null" != no ; then
[define to support dynamic NULL backend])
BUILD_NULL=mod
BUILD_NULL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-null/back_null.la"
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
else
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
......@@ -2597,7 +2604,6 @@ if test "$ol_enable_passwd" != no ; then
[define to support dynamic PASSWD backend])
BUILD_PASSWD=mod
BUILD_PASSWD_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
else
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
......@@ -2613,7 +2619,6 @@ if test "$ol_link_perl" != no ; then
[define to support dynamic PERL backend])
BUILD_PERL=mod
BUILD_PERL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
else
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
......@@ -2629,7 +2634,6 @@ if test "$ol_enable_shell" != no ; then
[define to support dynamic SHELL backend])
BUILD_SHELL=mod
BUILD_SHELL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
else
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
......@@ -2645,7 +2649,6 @@ if test "$ol_link_sql" != no ; then
[define to support dynamic SQL backend])
BUILD_SQL=mod
BUILD_SQL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
else
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
......@@ -2672,7 +2675,6 @@ dnl
if test "$ac_cv_mingw32" = yes ; then
PLAT=NT
SLAPD_MODULES_LDFLAGS=
SLAPD_MODULES_LIST=
else
PLAT=UNIX
fi
......@@ -2719,7 +2721,6 @@ AC_SUBST(WRAP_LIBS)
AC_SUBST(SLAPD_MODULES_CPPFLAGS)
AC_SUBST(SLAPD_MODULES_LDFLAGS)
AC_SUBST(SLAPD_MODULES_LIST)
AC_SUBST(SLAPD_STATIC_BACKENDS)
AC_SUBST(SLAPD_DYNAMIC_BACKENDS)
......
#
# ldaperr.tcl: scan ldap.h for error return codes for initializing
# errorCode table.
#
proc genstrings {path} {
set fp [open $path]
while {[gets $fp line] != -1 &&
![string match "#define LDAP_SUCCESS*" $line]} { }
puts "/* This file automatically generated, hand edit at your own risk! */"
puts -nonewline "char *ldaptclerrorcode\[\] = {
NULL"
while {[gets $fp line] != -1} {
if {[clength $line] == 0 || [ctype space $line]} continue
if {[string match *typedef* $line]} break
if {![string match #define* $line]} continue
if {![string match "#define LDAP_*" $line]} continue
if {[string match "*LDAP_RANGE*" $line]} continue
if {[string match "*LDAP_API_RESULT*" $line]} continue
if {[string match {*\\} $line]} {
append line [gets $fp]
}
lassign $line define macro value
set ldap_errcode($macro) $value
}
#parray ldap_errcode
foreach i [array names ldap_errcode] {
set value $ldap_errcode($i)
#puts stderr "checking $value"
if [regexp {^[A-Z_]} $value] {
if [info exists ldap_errcode($value)] {
set value $ldap_errcode($value)
set ldap_errcode($i) $value
}
}
set ldap_errname($value) $i
}
set lasterr 0
foreach value [lsort -integer [array names ldap_errname]] {
incr lasterr
while {$lasterr < $value} {
puts -nonewline ",\n\tNULL"
incr lasterr
}
puts -nonewline ",\n\t\"$ldap_errname($value)\""
}
puts "\n};"
puts "#define LDAPTCL_MAXERR\t$value"
}
#cmdtrace on
if !$tcl_interactive {
genstrings [lindex $argv 0]
}
.TH LDAPPASSWD 1 "20 August 2001" "OpenLDAP LDVERSION"
.\" $OpenLDAP$
.\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME
ldappasswd \- change the password of an LDAP entry
.SH SYNOPSIS
.B ldappasswd
[\c
.BR \-A ]
[\c
.BI \-a \ oldPasswd\fR]
[\c
.BR \-C ]
[\c
.BI \-D \ binddn\fR]
[\c
.BI \-d \ debuglevel\fR]
[\c
.BI \-H \ ldapuri\fR]
[\c
.BI \-h \ ldaphost\fR]
[\c
.BR \-n ]
[\c
.BI \-p \ ldapport\fR]
[\c
.BR \-S ]
[\c
.BI \-s \ newPasswd\fR]
[\c
.BR \-v ]
[\c
.BR \-W ]
[\c
.BI \-w \ passwd\fR]
[\c
.BR \-O \ security-properties ]
[\c
.BR \-I ]
[\c
.BR \-Q ]
[\c
.BI \-U \ authcid\fR]
[\c
.BR \-x ]
[\c
.BI \-X \ authzid\fR]
[\c
.BI \-Y \ mech\fR]
[\c
.BR \-Z[Z] ]
[\c
.IR user ]
.SH DESCRIPTION
.B ldappasswd
is a tool to set the password of an LDAP user.
.B ldappasswd
uses the LDAPv3 Password Modify (RFC 3062) extended operation.
.LP
.B ldappasswd
sets the password of associated with the user [or an optionally
specified
.IR user ].
If the new
password is not specified on the command line and the user
doesn't enable prompting, the server will be asked to generate
a password for the user.
.LP
.B ldappasswd
is neither designed nor intended to be a replacement for
.BR passwd (1)
and should not be installed as such.
.SH OPTIONS
.TP
.BI \-A
Prompt for old password.
This is used instead of specifying the password on the command line.
.TP
.BI \-a \ oldPasswd
Set the old password to \fIoldPasswd\fP.
.TP
.B \-C
Automatically chase referrals.
.TP
.B \-x
Use simple authentication instead of SASL.
.TP
.BI \-D \ binddn
Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
.TP
.BI \-d \ debuglevel
Set the LDAP debugging level to \fIdebuglevel\fP.
.B ldappasswd
must be compiled with LDAP_DEBUG defined for this option to have any effect.
.TP
.BI \-H \ ldapuri
Specify URI(s) referring to the ldap server(s).
.TP
.BI \-h \ ldaphost
Specify an alternate host on which the ldap server is running.
Deprecated in favor of -H.
.TP
.BI \-p \ ldapport
Specify an alternate TCP port where the ldap server is listening.
Deprecated in favor of -H.
.TP
.B \-n
Do not set password. (Can be useful when used in conjunction with
.BR \-v \ or
.BR \-d )
.TP
.BI \-S
Prompt for new password.
This is used instead of specifying the password on the command line.
.TP
.BI \-s \ newPasswd
Set the new password to \fInewPasswd\fP.
.TP
.B \-v
Increase the verbosity of output. Can be specified multiple times.
.TP
.BI \-W
Prompt for bind password.
This is used instead of specifying the password on the command line.
.TP
.BI \-w \ passwd
Use \fIpasswd\fP as the password to bind with.
.TP
.BI \-O \ security-properties
Specify SASL security properties.
.TP
.B \-I
Enable SASL Interactive mode. Always prompt. Default is to prompt
only as needed.
.TP
.B \-Q
Enable SASL Quiet mode. Never prompt.
.TP
.BI \-U \ authcid
Specify the authentication ID for SASL bind. The form of the ID
depends on the actual SASL mechanism used.
.TP
.BI \-X \ authzid
Specify the requested authorization ID for SASL bind.
.I authzid
must be one of the following formats:
.BI dn: <distinguished name>
or
.BI u: <username>\fP.
.TP
.BI \-Y \ mech
Specify the SASL mechanism to be used for authentication. If it's not
specified, the program will choose the best mechanism the server knows.
.TP
.B \-Z[Z]
Issue StartTLS (Transport Layer Security) extended operation. If you use
.BR \-ZZ ,
the command will require the operation to be successful
.SH SEE ALSO
.BR ldap_sasl_bind (3),
.BR ldap_extended_operation (3),
.BR ldap_start_tls_s (3)
.SH AUTHOR
The OpenLDAP Project <http://www.openldap.org/>
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.
.TH UD 1 "18 March 1993" "U-M LDAP LDVERSION"
.TH UD 1 "20 August 2000" "OpenLDAP LDVERSION"
.\" $OpenLDAP$
.\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.UC 6
.SH NAME
ud \- interactive X.500 Directory Server query program
ud \- interactive LDAP Directory Server query program
.SH SYNOPSIS
.B ud
[-Dv] [-s
[\c
.BR -Dv ]
.RB [ -s
.IR server ]
[-d
.RB [ -d
.IR debug-mask ]
[-l
.RB [ -l
.IR ldap-debug-mask ]
[-f
.RB [ -f
.IR file ]
.SH DESCRIPTION
.IR ud
......@@ -18,7 +23,7 @@ is used to interogate a directory server via the Lightweight Directory
Access Protocol (LDAP).
.SH OPTIONS
.TP 1i
.B \-s
.BI \-s \ server
Used to specify the name of an LDAP server to which
.B ud
should connect. If this
......@@ -34,7 +39,7 @@ the name
can be resolved (presumably through the use of a CNAME or A record in the DNS
and the appropriate search path specified in the resolver config file).
.TP 1i
.B \-d
.BI \-d \ debug-mask
Sets the
.B ud
debug mask to the value specified.
......@@ -42,10 +47,10 @@ Values for the mask can be dumped by using the
.IR \-D
flag.
.TP 1i
.B \-f
.BI \-f \ file
Sets the configuration file to the name specified.
.TP 1i
.B \-l
.BI \-l \ ldap-debug-mask
Sets the LDAP debug mask to the value specified.
.TP 1i
.B \-v
......@@ -56,9 +61,15 @@ command.
.B \-D
Prints out a list of valid ud debug masks.
.SH FILES
ETCDIR/ud.conf The ud configuration file.
.TP
.I ETCDIR/ud.conf
system-wide ud configuration file
.TP
.I $HOME/.udrc
personal ud configuration file, overriding system file
.SH "SEE ALSO"
.BR ud.conf (5),
.BR ldap.conf (5),
.BR ldap (3)
.SH DIAGNOSTICS
.B ud
......@@ -71,3 +82,8 @@ uses the ldap_perror() routine to print an informative diagnostic.
Too numerous to mention.
.SH AUTHOR
Bryan Beecher, University of Michigan
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.
.TH LBER-DECODE 3 "18 November 1994"
.TH LBER_DECODE 3 "25 January 2002" "OpenLDAP LDVERSION"
.\" $OpenLDAP$
.\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME
ber_get_next, ber_skiptag, ber_peek_tag, ber_scanf, ber_get_int, ber_get_stringb, ber_get_stringa, ber_get_null, ber_get_boolean, ber_get_bitstring, ber_first_element, ber_next_element \- LBER simplified Basic Encoding Rules library routines for decoding
ber_get_next, ber_skip_tag, ber_peek_tag, ber_scanf, ber_get_int,
ber_get_enum, ber_get_stringb, ber_get_stringa, ber_get_stringal,
ber_get_stringbv, ber_get_null, ber_get_boolean, ber_get_bitstring,
ber_first_element, ber_next_element
\- LBER simplified Basic Encoding Rules library routines for decoding
.SH SYNOPSIS
.nf
.ft B
#include <lber.h>
.ft
.fi
.B #include <lber.h>
.LP
.nf
.ft B
typedef struct berelement {
char *ber_buf;
char *ber_ptr;
char *ber_end;
struct seqorset *ber_sos;
int ber_tag;
int ber_usertag;
} BerElement;
.ft
.fi
.BI "ber_tag_t ber_get_next(Sockbuf *" sb ", ber_len_t *" len ", BerElement *" ber ");"
.LP
.nf
.ft B
typedef struct sockbuf {
int sb_sd;
BerElement sb_ber;
} Sockbuf;
.ft
.fi
.BI "ber_tag_t ber_skip_tag(BerElement *" ber ", ber_len_t *" len ");"
.LP
.nf
.ft B
typedef struct berval {
unsigned long bv_len;
char *bv_val;
};
.ft
.fi
.BI "ber_tag_t ber_peek_tag(BerElement *" ber ", ber_len_t *" len ");"
.LP
.nf
.ft B
ber_get_next(sb, len, ber)
Sockbuf *sb;
unsigned long \(**len;
BerElement \(**ber;
.ft
.fi
.BI "ber_tag_t ber_scanf(BerElement *" ber ", const char *" fmt ", ...);"
.LP
.nf
.ft B
ber_skip_tag(ber, len)
BerElement \(**ber;
unsigned long \(**len;
.ft
.fi
.BI "ber_tag_t ber_get_int(BerElement *" ber ", ber_int_t *" num ");"
.LP
.nf
.ft B
ber_peek_tag(ber, len)
BerElement \(**ber;
unsigned long \(**len;
.ft
.fi
.BI "ber_tag_t ber_get_enum(BerElement *" ber ", ber_int_t *" num ");"
.LP
.nf
.ft B
ber_get_int(ber, num)
BerElement \(**ber;
long \(**num;
.ft
.fi
.BI "ber_tag_t ber_get_stringb(BerElement *" ber ", char *" buf ", ber_len_t *" len ");"
.LP
.nf
.ft B
ber_get_stringb(ber, buf, len)
BerElement \(**ber;
char \(**buf;
unsigned long \(**len;
.ft
.fi
.BI "ber_tag_t ber_get_stringa(BerElement *" ber ", char **" buf ");"
.LP
.nf
.ft B
ber_get_stringa(ber, buf)
BerElement \(**ber;
char \(***buf;
.ft
.fi
.BI "ber_tag_t ber_get_stringal(BerElement *" ber ", struct berval **" bv ");"
.LP
.nf
.ft B
ber_get_stringal(ber, bv)
BerElement \(**ber;
struct berval \(***bv;
.ft
.fi
.BI "ber_tag_t ber_get_stringbv(BerElement *" ber ", struct berval *" bv ", int " alloc ");"
.LP
.nf
.ft B
ber_get_null(ber)
BerElement \(**ber;
.ft
.fi
.BI "ber_tag_t ber_get_null(BerElement *" ber ");"
.LP
.nf
.ft B
ber_get_boolean(ber, bool)
BerElement \(**ber;
int \(**bool;
.ft
.fi
.BI "ber_tag_t ber_get_boolean(BerElement *" ber ", ber_int_t *" bool ");"
.LP
.nf
.ft B
ber_get_bitstringa(ber, buf, blen)
BerElement \(**ber;
char \(***buf;
unsigned long \(**blen;
.ft
.fi
.BI "ber_tag_t ber_get_bitstringa(BerElement *" ber ", char **" buf ", ber_len_t *" blen ");"
.LP
.nf
.ft B
ber_first_element(ber, len, cookie)
BerElement \(**ber;
unsigned long \(**len;
char \(***cookie;
.ft
.fi
.BI "ber_tag_t ber_first_element(BerElement *" ber ", ber_len_t *" len ", char **" cookie ");"
.LP
.nf
.ft B
ber_next_element(ber, len, cookie)