Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/libsaslc/dist/man Sort sections.
details: https://anonhg.NetBSD.org/src/rev/6e106ac9ea8b
branches: trunk
changeset: 763503:6e106ac9ea8b
user: wiz <wiz%NetBSD.org@localhost>
date: Tue Mar 22 09:42:00 2011 +0000
description:
Sort sections.
diffstat:
crypto/external/bsd/libsaslc/dist/man/libsaslc.3 | 158 +++++++++++-----------
1 files changed, 79 insertions(+), 79 deletions(-)
diffs (179 lines):
diff -r 46f64f01e9d0 -r 6e106ac9ea8b crypto/external/bsd/libsaslc/dist/man/libsaslc.3
--- a/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Tue Mar 22 07:40:10 2011 +0000
+++ b/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Tue Mar 22 09:42:00 2011 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index