diff options
Diffstat (limited to 'usr.bin/ldap')
-rw-r--r-- | usr.bin/ldap/ldap.1 | 40 | ||||
-rw-r--r-- | usr.bin/ldap/ldapclient.c | 8 |
2 files changed, 28 insertions, 20 deletions
diff --git a/usr.bin/ldap/ldap.1 b/usr.bin/ldap/ldap.1 index ae9d169b569..48e795389da 100644 --- a/usr.bin/ldap/ldap.1 +++ b/usr.bin/ldap/ldap.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ldap.1,v 1.6 2018/06/26 09:47:20 reyk Exp $ +.\" $OpenBSD: ldap.1,v 1.7 2018/07/03 10:10:09 jmc Exp $ .\" .\" Copyright (c) 2018 Reyk Floeter <reyk@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 26 2018 $ +.Dd $Mdocdate: July 3 2018 $ .Dt LDAP 1 .Os .Sh NAME @@ -22,7 +22,7 @@ .Nd simple LDAP client .Sh SYNOPSIS .Nm ldap -.Ar command +.Cm search .Op Fl LvWxZ .Op Fl b Ar basedn .Op Fl c Ar CAfile @@ -33,17 +33,16 @@ .Op Fl w Ar secret .Op Fl y Ar secretfile .Op Fl z Ar sizelimit -.Op Ar arguments ... +.Op Ar filter +.Op Ar attributes ... .Sh DESCRIPTION The .Nm program is a simple LDAP client program. It queries an LDAP server to perform a command and outputs the results in the LDAP Data Interchange Format (LDIF). -.Pp -The command is as follows: .Bl -tag -width Ds -.It Cm search Ar options Oo Ar filter Oc Op Ar attribute ... +.It Cm search Ar options Oo Ar filter Oc Op Ar attributes ... Perform a directory search request. The optional .Ar filter @@ -82,15 +81,27 @@ The LDAP URL is described in RFC 4516 with the following format: .Sm off .Op Ar protocol No :// .Ar host Op : Ar port -.Oo / basedn -.Oo ? Op Ar attribute , ... -.Oo ? Op Ar scope -.Op ? Op Ar filter -.Oc -.Oc +.Oo +.Li / Ar basedn +.Li ?\& Ar attribute , ... +.Li ?\& Ar scope +.Li ?\& Ar filter .Oc .Sm on .Pp +The default is +.Ar ldap://localhost:389/ . +Each of +.Ar basedn , attribute , scope +and +.Ar filter +may be omitted, +but the preceding +.Sq / +or +.Sq ?\& +is required if a subsequent field is non-empty. +.Pp The following protocols are supported: .Pp .Bl -tag -width "ldap+tls" -compact @@ -112,9 +123,6 @@ The host argument is required to be a URL-encoded path, for example for .Pa /var/run/ldapi . .El -.Pp -The default is -.Ar ldap://localhost:389/ . .It Fl L Output the directory search result in a standards-compliant version of the LDAP Data Interchange Format (LDIF). diff --git a/usr.bin/ldap/ldapclient.c b/usr.bin/ldap/ldapclient.c index c203461bc82..b536eb7bde8 100644 --- a/usr.bin/ldap/ldapclient.c +++ b/usr.bin/ldap/ldapclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldapclient.c,v 1.2 2018/06/26 09:47:20 reyk Exp $ */ +/* $OpenBSD: ldapclient.c,v 1.3 2018/07/03 10:10:09 jmc Exp $ */ /* * Copyright (c) 2018 Reyk Floeter <reyk@openbsd.org> @@ -96,9 +96,9 @@ usage(void) extern char *__progname; fprintf(stderr, -"usage: %s search [-LvxZ] [-b basedn] [-c capath] [-D binddn] [-H host]\n" -" [-l timelimit] [-s scope] [-w secret|-W] [-y secretfile]\n" -" [-z sizelimit] [filter] [attributes ...]\n", +"usage: %s search [-LvWxZ] [-b basedn] [-c CAfile] [-D binddn] [-H host]\n" +" [-l timelimit] [-s scope] [-w secret] [-y secretfile] [-z sizelimit]\n" +" [filter] [attributes ...]\n", __progname); exit(1); |