CVS commit: src/crypto/external/bsd/libsaslc/dist/man
Module Name:src Committed By: shm Date: Mon Jul 13 13:57:45 UTC 2015 Modified Files: src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3 Log Message: PR#49876 - fix typos, from Dieter Roelants. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 \ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.15 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.16 --- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.15 Tue May 14 15:33:21 2013 +++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Mon Jul 13 13:57:44 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: libsaslc.3,v 1.15 2013/05/14 15:33:21 elric Exp $ +.\" $NetBSD: libsaslc.3,v 1.16 2015/07/13 13:57:44 shm Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -34,7 +34,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 23, 2011 +.Dd May 3, 2015 .Dt LIBSASLC 3 .Os .Sh NAME @@ -240,7 +240,7 @@ and functions are used to provide the integrity .Pq Qq auth-int and confidentiality -.Pq Qq auth-int +.Pq Qq auth-conf layers for mechanisms that provide them. They encode and, respectively, decode .Ar inlen @@ -322,7 +322,7 @@ files, while the session dictionary is l .Pp The configuration file .Pa //saslc.conf -is used for the configuration context. +is used for the context configuration. The .Pa //mech/.conf file is used for the mechanism configuration.
CVS commit: src/crypto/external/bsd/libsaslc/dist/man
Module Name:src Committed By: elric Date: Tue May 14 15:33:21 UTC 2013 Modified Files: src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3 Log Message: principals have principles. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 \ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.14 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.15 --- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.14 Fri Sep 23 16:22:00 2011 +++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Tue May 14 15:33:21 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: libsaslc.3,v 1.14 2011/09/23 16:22:00 wiz Exp $ +.\" $NetBSD: libsaslc.3,v 1.15 2013/05/14 15:33:21 elric Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -682,7 +682,7 @@ to the file .Pa /etc/saslc.d/postfix/mech/GSSAPI.conf so that the .Em postfix -principle will be used for authentication. +principal will be used for authentication. Enable .Em SASL in the smtp client.
CVS commit: src/crypto/external/bsd/libsaslc/dist/man
Module Name:src Committed By: wiz Date: Fri Sep 23 16:22:00 UTC 2011 Modified Files: src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3 Log Message: Sort sections. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.13 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.14 --- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.13 Fri Sep 23 15:24:36 2011 +++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Fri Sep 23 16:22:00 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: libsaslc.3,v 1.13 2011/09/23 15:24:36 jruoho Exp $ +.\" $NetBSD: libsaslc.3,v 1.14 2011/09/23 16:22:00 wiz Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -713,11 +713,6 @@ .Bl -tag -width /etc/saslc.d .It Pa /etc/saslc.d .El -.Sh HISTORY -The -.Nm -library appeared in -.Nx 6.0 . .Sh EXAMPLES The following code fragments illustrate the possible use of the functions described above. @@ -803,6 +798,11 @@ .Sh STANDARDS RFC 2195, RFC , RFC 2245, RFC 2595, RFC 2831, RFC 4422, RFC 4505, RFC 4616, RFC 4752. +.Sh HISTORY +The +.Nm +library appeared in +.Nx 6.0 . .Sh CAVEATS The API was heavily influenced by its use with .Xr postfix 1 .
CVS commit: src/crypto/external/bsd/libsaslc/dist/man
Module Name:src Committed By: wiz Date: Tue Mar 22 09:42:00 UTC 2011 Modified Files: src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3 Log Message: Sort sections. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.11 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.12 --- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.11 Tue Mar 22 07:06:02 2011 +++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Tue Mar 22 09:42:00 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: libsaslc.3,v 1.11 2011/03/22 07:06:02 jruoho Exp $ +.\" $NetBSD: libsaslc.3,v 1.12 2011/03/22 09:42:00 wiz Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -309,84 +309,6 @@ Neither function will ever return .Dv NULL . .El -.Sh EXAMPLES -The following code fragments illustrate the possible use of the -functions described above. -.Bd -literal -int -decode_stream(saslc_sess_t *sess, int fdin, int fdout) -{ - uint8_t buf[BUFSIZE]; - uint8_t *in; - void *out; - size_t inlen, outlen; - ssize_t n, rval; -.Pp - for (;;) { - if ((rval = read(fdin, buf, sizeof(buf))) == \-1) - return \-1; - if (rval == 0) - break; - in = buf; - inlen = rval; - while (inlen > 0) { - rval = saslc_sess_decode(sess, in, inlen, &out, - &outlen); - if (rval == \-1) -return \-1; - if (outlen > 0) { -n = write(fdout, out, outlen); -free(out); -if (n == \-1) - return \-1; - } - in += rval; - inlen -= rval; - } - } - return 0; -} -.Pp -int -encode_stream(saslc_sess_t *sess, int fdin, int fdout) -{ - uint8_t buf[BUFSIZE]; - uint8_t *in; - void *out; - size_t inlen, outlen; - ssize_t n, rval; -.Pp - for (;;) { - if ((rval = read(fdin, buf, sizeof(buf))) == \-1) - return \-1; - if (rval == 0) - break; - in = buf; - inlen = rval; - while (inlen > 0) { - rval = saslc_sess_encode(sess, in, inlen, &out, - &outlen); - if (rval == \-1) -return \-1; - if (outlen > 0) { -n = write(fdout, out, outlen); -free(out); -if (n == \-1) - return \-1; - } - in += rval; - inlen -= rval; - } - } - /* flush internal encoder buffer */ - if (saslc_sess_encode(sess, NULL, 0, &out, &outlen) == \-1) - return \-1; - if (outlen > 0) - if (write(fdout, out, outlen) == \-1) - return \-1; - return 0; -} -.Ed .Sh CONFIGURATION The library uses three types of dictionaries: context (or global), session, and mechanism, and they are searched in that order by @@ -785,6 +707,84 @@ .Pp to obtain a ticket for the postfix user with the postfix credential and you should be good to go! +.Sh EXAMPLES +The following code fragments illustrate the possible use of the +functions described above. +.Bd -literal +int +decode_stream(saslc_sess_t *sess, int fdin, int fdout) +{ + uint8_t buf[BUFSIZE]; + uint8_t *in; + void *out; + size_t inlen, outlen; + ssize_t n, rval; +.Pp + for (;;) { + if ((rval = read(fdin, buf, sizeof(buf))) == \-1) + return \-1; + if (rval == 0) + break; + in = buf; + inlen = rval; + while (inlen > 0) { + rval = saslc_sess_decode(sess, in, inlen, &out, + &outlen); + if (rval == \-1) +return \-1; + if (outlen > 0) { +n = write(fdout, out, outlen); +free(out); +if (n == \-1) + return \-1; + } + in += rval; + inlen -= rval; + } + } + return 0; +} +.Pp +int +encode_stream(saslc_sess_t *sess, int fdin, int fdout) +{ + uint8_t buf[BUFSIZE]; + uint8_t *in; + void *out; + size_t inlen, outlen; + ssize_t n, rval; +.Pp + for (;;) { + if ((rval = read(fdin, buf, sizeof(buf))) == \-1) + return \-1; + if (rval == 0) + break; + in = buf; + inlen = rval; + while (inlen > 0) { + rval = saslc_sess_encode(sess, in, inlen, &out, + &outlen); + if (rval == \-1) +return \-1; + if (outlen > 0) { +n = write(fdout, out, outlen); +free(out); +if (n == \-1) + return \-1; + } + in += rval; + inlen -= rval; + } + } + /* flush internal encoder buffer */ + if (saslc_sess_encode(sess, NULL, 0, &out, &outlen) == \-1) + return \-1; + if (outlen > 0) + if (write(fdout, out, outlen) == \-1) + return \-1; + return 0; +} +.Ed .Sh COMPATIBILITY There exist other SASL client library implementations including Cyrus SASL (http://asg.web.cmu.edu/sasl/sasl-library.html) and GNU SASL
CVS commit: src/crypto/external/bsd/libsaslc/dist/man
Module Name:src Committed By: jruoho Date: Tue Mar 22 07:06:02 UTC 2011 Modified Files: src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3 Log Message: * Remove saslc_strmech(), which does not appear in the sources. Instead, document saslc_sess_getmech(). * Add FUNCTIONS and describe the functions in a list for readability. * Sort SYNOPSIS in the order of appearance in FUNCTIONS. * Split couple of long paragraphs for readability. * Split the code example into EXAMPLES. * Add missing prototypes to SYNOPSIS. * Small markup improvements. No contextual change. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.10 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.11 --- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.10 Sun Feb 20 01:59:46 2011 +++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Tue Mar 22 07:06:02 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: libsaslc.3,v 1.10 2011/02/20 01:59:46 christos Exp $ +.\" $NetBSD: libsaslc.3,v 1.11 2011/03/22 07:06:02 jruoho Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -34,21 +34,21 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 18, 2011 +.Dd March 22, 2011 .Dt LIBSASLC 3 .Os .Sh NAME .Nm saslc_alloc , .Nm saslc_end , .Nm saslc_init , +.Nm saslc_sess_init , +.Nm saslc_sess_end , +.Nm saslc_sess_getprop , +.Nm saslc_sess_setprop , .Nm saslc_sess_cont , .Nm saslc_sess_decode , .Nm saslc_sess_encode , -.Nm saslc_sess_end , .Nm saslc_sess_getmech , -.Nm saslc_sess_getprop , -.Nm saslc_sess_init , -.Nm saslc_sess_setprop , .Nm saslc_sess_strerror , .Nm saslc_strerror .Nd Simple Authentication and Security Layer client library @@ -62,6 +62,15 @@ .Fn saslc_end "saslc_t *ctx" .Ft int .Fn saslc_init "saslc_t *ctx" "const char *appname" "const char *cfgpath" +.Ft saslc_sess_t * +.Fn saslc_sess_init "saslc_t *ctx" "const char *mechs" "const char *secopts" +.Ft void +.Fn saslc_sess_end "saslc_sess_t *sess" +.Ft const char * +.Fn saslc_sess_getprop "saslc_sess_t *sess" "const char *key" +.Ft int +.Fn saslc_sess_setprop "saslc_sess_t *sess" "const char *key" \ +"const char *value" .Ft int .Fn saslc_sess_cont "saslc_sess_t *sess" "const void *in" "size_t inlen" \ "void* *out" "size_t *outlen" @@ -71,23 +80,25 @@ .Ft ssize_t .Fn saslc_sess_encode "saslc_sess_t *sess" "const void *in" "size_t inlen" \ "void* *out" "size_t *outlen" -.Ft void -.Fn saslc_sess_end "saslc_sess_t *sess" .Ft const char * .Fn saslc_sess_getmech "saslc_sess_t *sess" .Ft const char * -.Fn saslc_sess_getprop "saslc_sess_t *sess" "const char *key" -.Ft saslc_sess_t * -.Fn saslc_sess_init "saslc_t *ctx" "const char *mechs" "const char *secopts" -.Ft int -.Fn saslc_sess_setprop "saslc_sess_t *sess" "const char *key" \ -"const char *value" -.Ft const char * .Fn saslc_sess_strerror "saslc_sess_t *sess" .Ft const char * .Fn saslc_strerror "saslc_t *ctx" .Sh DESCRIPTION The +.Nm libsaslc +library offers a client interface for the +Simple Authentication and Security Layer +.Pq Tn SASL . +The library is heavily influenced by its use with +.Xr postfix 1 . +.Sh FUNCTIONS +The following functions are available in the library. +.Bl -tag -width compact +.It Fn saslc_alloc "" +The .Fn saslc_alloc function allocates and returns a new saslc context. The context is uninitialized: see @@ -95,7 +106,7 @@ Returns .Dv NULL on error. -.Pp +.It Fn saslc_end "ctx" The .Fn saslc_end function destroys and deallocate resources used by the context @@ -103,7 +114,7 @@ The context shouldn't have any sessions assigned to it. Returns 0 on success and \-1 if the context has active sessions and cannot be deallocated. -.Pp +.It Fn saslc_init "ctx" "appname" "cfgpath" The .Fn saslc_init function initializes the saslc context @@ -123,7 +134,7 @@ for a location and if that is not found it uses the default path .Pa /etc/saslc.d . Returns 0 on success and \-1 on failure. -.Pp +.It Fn saslc_sess_init "ctx" "mechs" "secopts" The .Fn saslc_sess_init function creates new session assigned to the @@ -160,14 +171,14 @@ Returns a session handle or .Dv NULL on error or no match. -.Pp +.It Fn saslc_sess_end "sess" The .Fn saslc_sess_end function ends the sasl session .Ar sess . It destroys and deallocates all internal resources. This does not fail. -.Pp +.It Fn saslc_sess_getprop "sess" "key" The .Fn saslc_sess_getprop function gets the property indicated by the @@ -180,7 +191,7 @@ Returns the property value or .Dv NULL if the property is not found. -.Pp +.It Fn saslc_sess_setprop "sess" "key" "value"
CVS commit: src/crypto/external/bsd/libsaslc/dist/man
Module Name:src Committed By: wiz Date: Sat Feb 12 16:08:19 UTC 2011 Modified Files: src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3 Log Message: Various formatting fixes and a typo or two. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.5 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.6 --- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.5 Sat Feb 12 15:58:03 2011 +++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Sat Feb 12 16:08:18 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: libsaslc.3,v 1.5 2011/02/12 15:58:03 wiz Exp $ +.\" $NetBSD: libsaslc.3,v 1.6 2011/02/12 16:08:18 wiz Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -74,7 +74,7 @@ .Ft void .Fn saslc_sess_end "saslc_sess_t *sess" .Ft const char * -.Fn saslc_sess_getmech "saslc_sess_t *" +.Fn saslc_sess_getmech "saslc_sess_t *sess" .Ft const char * .Fn saslc_sess_getprop "saslc_sess_t *sess" "const char *key" .Ft saslc_sess_t * @@ -92,14 +92,16 @@ function allocates and returns a new saslc context. The context is uninitialized: see .Fn saslc_init . -Returns NULL on error. +Returns +.Dv NULL +on error. .Pp The .Fn saslc_end function destroys and deallocate resources used by the context .Ar ctx . The context shouldn't have any sessions assigned to it. -Returns 0 on success and -1 if the context has active sessions and +Returns 0 on success and \-1 if the context has active sessions and cannot be deallocated. .Pp The @@ -114,11 +116,13 @@ list for the context. If .Ar cfgpath -is NULL, it checks the environment variable +is +.Dv NULL , +it checks the environment variable .Ev SASLC_CONFIG for a location and if that is not found it uses the default path .Pa /etc/saslc.d . -Returns 0 on success and -1 on failure. +Returns 0 on success and \-1 on failure. .Pp The .Fn saslc_sess_init @@ -134,7 +138,9 @@ The first matching mechanism from the .Ar mechs list is used. -See CONFIGURATION below for the supported mechanisms. +See +.Sx CONFIGURATION +below for the supported mechanisms. The valid security options are .Bl -tag -width "nodictionaryxxx" -offset indent -compact .It Qo noanonymous Qc @@ -149,7 +155,9 @@ require mutual authentication mechanisms .El Unknown security options are ignored. -Returns a session handle or NULL on error or no match. +Returns a session handle or +.Dv NULL +on error or no match. .Pp The .Fn saslc_sess_end @@ -167,7 +175,9 @@ .Ar sess dictionary, context dictionary (global configuration), and mechanism dictionary. -Returns the property value or NULL if the property is not found. +Returns the property value or +.Dv NULL +if the property is not found. .Pp The .Fn saslc_sess_setprop @@ -182,8 +192,10 @@ previous value is replaced by the new value. If .Ar value -is NULL, then any previous value in the session dictionary is removed. -Returns 0 on success or -1 on failure. +is +.Dv NULL , +then any previous value in the session dictionary is removed. +Returns 0 on success or \-1 on failure. .Pp .Fn saslc_strerror and @@ -194,7 +206,8 @@ or session .Ar sess , respectively. -It never returns NULL. +It never returns +.Dv NULL . .Pp The .Fn saslc_strmech @@ -219,7 +232,7 @@ The user is responsible for freeing memory allocated for .Ar out . It returns 0 if the authentication process is completed, 1 if another -step is required, and -1 on error. +step is required, and \-1 on error. Note that the completion of authentication process does not mean the client is authenticated; that is determined by the server. .Pp @@ -236,7 +249,7 @@ bytes of data from the .Ar in buffer using the method negotiated during authentication. -On error they return -1. +On error they return \-1. Otherwise, they return the number of bytes consumed from .Ar in and output @@ -285,8 +298,8 @@ ssize_t n, rval; .Pp for (;;) { - if ((rval = read(fdin, buf, sizeof(buf))) == -1) - return -1; + if ((rval = read(fdin, buf, sizeof(buf))) == \-1) + return \-1; if (rval == 0) break; in = buf; @@ -294,13 +307,13 @@ while (inlen > 0) { rval = saslc_sess_decode(sess, in, inlen, &out, &outlen); - if (rval == -1) -return -1; + if (rval == \-1) +return \-1; if (outlen > 0) { n = write(fdout, out, outlen); free(out); -if (n == -1) - return -1; +if (n == \-1) + return \-1; } in += rval; inlen -= rval; @@ -319,8 +332,8 @@ ssize_t n, rval; .Pp for (;;) { - if ((rval = read(fdin, buf, sizeof(buf))) == -1) - return -1; + if ((rval = read(fdin, buf, sizeof(buf))) == \-1) + return \-1; if (rval == 0) break; in = buf; @@ -32
CVS commit: src/crypto/external/bsd/libsaslc/dist/man
Module Name:src Committed By: wiz Date: Sat Feb 12 15:58:03 UTC 2011 Modified Files: src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3 Log Message: Remove trailing whitespace and superfluous Pp before new sections. Use Nm instead of Xr'ing itself. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.4 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.5 --- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.4 Fri Feb 11 23:44:42 2011 +++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Sat Feb 12 15:58:03 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: libsaslc.3,v 1.4 2011/02/11 23:44:42 christos Exp $ +.\" $NetBSD: libsaslc.3,v 1.5 2011/02/12 15:58:03 wiz Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -57,35 +57,35 @@ .Sh SYNOPSIS .In saslc.h .Ft saslc_t * -.Fn saslc_alloc "void" +.Fn saslc_alloc "void" .Ft int .Fn saslc_end "saslc_t *ctx" .Ft int .Fn saslc_init "saslc_t *ctx" "const char *appname" "const char *cfgpath" .Ft int .Fn saslc_sess_cont "saslc_sess_t *sess" "const void *in" "size_t inlen" \ -"void* *out" "size_t *outlen" +"void* *out" "size_t *outlen" .Ft ssize_t .Fn saslc_sess_decode "saslc_sess_t *sess" "const void *in" "size_t inlen" \ -"void* *out" "size_t *outlen" +"void* *out" "size_t *outlen" .Ft ssize_t .Fn saslc_sess_encode "saslc_sess_t *sess" "const void *in" "size_t inlen" \ -"void* *out" "size_t *outlen" +"void* *out" "size_t *outlen" .Ft void -.Fn saslc_sess_end "saslc_sess_t *sess" +.Fn saslc_sess_end "saslc_sess_t *sess" .Ft const char * .Fn saslc_sess_getmech "saslc_sess_t *" .Ft const char * -.Fn saslc_sess_getprop "saslc_sess_t *sess" "const char *key" +.Fn saslc_sess_getprop "saslc_sess_t *sess" "const char *key" .Ft saslc_sess_t * .Fn saslc_sess_init "saslc_t *ctx" "const char *mechs" "const char *secopts" .Ft int .Fn saslc_sess_setprop "saslc_sess_t *sess" "const char *key" \ "const char *value" .Ft const char * -.Fn saslc_sess_strerror "saslc_sess_t *sess" +.Fn saslc_sess_strerror "saslc_sess_t *sess" .Ft const char * -.Fn saslc_strerror "saslc_t *ctx" +.Fn saslc_strerror "saslc_t *ctx" .Sh DESCRIPTION The .Fn saslc_alloc @@ -174,7 +174,7 @@ function sets the property indexed by .Ar key to the value -.Ar value +.Ar value in the session .Ar sess dictionary. @@ -214,7 +214,7 @@ buffer and stores .Ar outlen bytes of output data in -.Ar out +.Ar out .Pq for the server . The user is responsible for freeing memory allocated for .Ar out . @@ -257,7 +257,7 @@ with .Ar inlen = 0. -In this case, +In this case, .Fn saslc_sess_encode returns the number of bytes that were flushed from the internal buffer. .Pp @@ -349,9 +349,8 @@ return 0; } .Ed -.Pp .Sh CONFIGURATION -.Xr libsaslc 3 +.Nm uses three types of dictionaries: context (or global), session, and mechanism, and they are searched in that order by .Fn saslc_getprop @@ -440,10 +439,9 @@ Any base supported by .Xr strtoll 3 is allowed. -.Pp .Sh PROPERTIES Most of the control of the -.Xr libsaslc 3 +.Nm behavior is done via setting various properties in the context or mechanism dictionaries via the configuration files or in the session dictionary with @@ -567,12 +565,11 @@ .Pa saslc.h should be used in code, but their values need to be used in the config files. -.Pp .Sh ENVIRONMENT The following environment variables .Pq defined in Pa saslc.h affect the behavior of -.Xr libsaslc 3 : +.Nm : .Bl -tag -width indent .It Ev SASLC_ENV_CONFIG Po Qo SASLC_CONFIG Qc Pc If the environment variable @@ -674,7 +671,7 @@ .Pa /etc/krb5.keytab . Setup the .Pa /etc/saslc.d -configuration directory +configuration directory .Pq see CONFIGURATION above . Add the line .Bd -literal -offset indent @@ -694,7 +691,7 @@ .Pa /etc/postfix/main.cf file to do this: .Bd -literal -offset indent -smtp_sasl_auth_enable = yes +smtp_sasl_auth_enable = yes smtp_sasl_type = saslc smtp_sasl_mechanism_filter = GSSAPI relayhost = [server.my.domain]:submission @@ -712,7 +709,6 @@ .Pp to obtain a ticket for the postfix user with the postfix credential and you should be good to go! -.Pp .Sh STANDARDS RFC 2195, RFC , RFC 2245, RFC 2595, RFC 2831, RFC 4422, RFC 4505, RFC 4616, RFC 4752.
CVS commit: src/crypto/external/bsd/libsaslc/dist/man
Module Name:src Committed By: wiz Date: Sat Jan 29 23:38:35 UTC 2011 Modified Files: src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3 Log Message: Remove trailing whitespace; new sentence, new line; mark up NULL with Dv; fix Dd argument. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.2 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.3 --- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.2 Sat Jan 29 23:35:31 2011 +++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Sat Jan 29 23:38:34 2011 @@ -1,5 +1,6 @@ +.\" $NetBSD: libsaslc.3,v 1.3 2011/01/29 23:38:34 wiz Exp $ .\" Draft of the SASL Client library API. -.Dd 10 August, 2010 +.Dd August 10, 2010 .Dt LIBSASLC 3 .Os .Sh NAME @@ -11,7 +12,7 @@ .In saslc.h .Ft saslc_t * .Fo saslc_alloc -.Fa "void" +.Fa "void" .Fc .Ft int .Fo saslc_end @@ -19,31 +20,31 @@ .Fc .Ft int .Fo saslc_init -.Fa "saslc_t *ctx" "const char *appname" +.Fa "saslc_t *ctx" "const char *appname" .Fc .Ft int .Fo saslc_sess_cont -.Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen" +.Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen" .Fc .Ft int .Fo saslc_sess_decode -.Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen" +.Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen" .Fc .Ft int .Fo saslc_sess_encode -.Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen" +.Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen" .Fc .Ft void .Fo saslc_sess_end -.Fa "saslc_sess_t *sess" +.Fa "saslc_sess_t *sess" .Fc .Ft const char * .Fo saslc_sess_getprop -.Fa "saslc_sess_t *sess" "const char *name" +.Fa "saslc_sess_t *sess" "const char *name" .Fc .Ft saslc_sess_t * .Fo saslc_sess_init -.Fa "saslc_t *ctx" "const char *mechs" +.Fa "saslc_t *ctx" "const char *mechs" .Fc .Ft int .Fo saslc_sess_setprop @@ -51,15 +52,15 @@ .Fc .Ft const char * .Fo saslc_sess_strerror -.Fa "saslc_sess_t *sess" +.Fa "saslc_sess_t *sess" .Fc .Ft const char * .Fo saslc_sess_strmech -.Fa "saslc_sess_t *sess" +.Fa "saslc_sess_t *sess" .Fc .Ft const char * .Fo saslc_strerror -.Fa "saslc_t *ctx" +.Fa "saslc_t *ctx" .Fc .Sh DESCRIPTION The @@ -74,14 +75,15 @@ .Pp The .Fn saslc_end -function destroys and deallocate resources used by the context. Context -shouldn't have got any sessions assigned to it. +function destroys and deallocate resources used by the context. +Context shouldn't have got any sessions assigned to it. .Pp The .Fn saslc_sess_init function creates new session assigned to the .Ar ctx -context. Function chooses best mechanism which can be used for an authentication +context. +Function chooses best mechanism which can be used for an authentication from the .Ar mechs list. @@ -96,7 +98,8 @@ .Pp The .Fn saslc_sess_setprop -function sets property for the session. If property already exists in the +function sets property for the session. +If property already exists in the session, then previous value is replaced by the new value. .Pp .Fn saslc_strerror @@ -111,16 +114,18 @@ .Pp The .Fn saslc_sess_cont -performs one step of the sasl authentication. Input data of length +performs one step of the sasl authentication. +Input data of length .Ar inlen is passed in the .Ar in -argument. Function stores output of length +argument. +Function stores output of length .Ar outlen in the -.Ar out. +.Ar out . Note that user is responsible for freeing resources allocated for the -.Ar out. +.Ar out . .Pp .Fn saslc_sess_encode and @@ -129,8 +134,7 @@ Functions store output of length .Ar outlen in the -.Ar out. -.Pp +.Ar out . .Sh RETURN VALUES Functions .Fn saslc_init @@ -143,18 +147,25 @@ .Fn saslc_sess_decode return 0 on success and -1 on failure, additionally .Fn saslc_cont -returns 1 if more SASL authentication steps are needed. The +returns 1 if more SASL authentication steps are needed. +The .Fn saslc_sess_getprop -function returns the property on success, or NULL on failure. The +function returns the property on success, or +.Dv NULL +on failure. +The .Fn saslc_alloc -function returns new context on success, or NULL on failure. Function +function returns new context on success, or +.Dv NULL +on failure. +Function .Fn saslc_strmech returns mechanism name. Finally, .Fn saslc_strerror and .Fn saslc_sess_strerror -return pointer to the error description string on success and pointer +return pointer to the error description string on success and pointer to the "unknown error" str