Property name change:

SASLC_PROP_SERVICENAME ("SERVICENAME")
to
  SASLC_PROP_SERVNAME ("SERVNAME")

Hopefully this will avoid confusion with SASLC_PROP_SERVICE ("SERVICE").
SERVNAME is also closer to the name used in the RFC2831 ("serv-name").
(Discussed with christos@.)

Change the hash parameters to keep that collision-less after the above
name change.

While here, go back to using .Sh in the manpage for unknown section
headers as the PostScript output from .Ss is slightly different.
(Discussed with wiz@.)
This commit is contained in:
christos 2011-02-16 02:14:22 +00:00
parent 0a1172667a
commit acb231545c
5 changed files with 22 additions and 22 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: saslc.h,v 1.4 2011/02/12 19:03:39 christos Exp $ */
/* $NetBSD: saslc.h,v 1.5 2011/02/16 02:14:22 christos Exp $ */
/* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@ -53,7 +53,7 @@
#define SASLC_PROP_REALM "REALM"
#define SASLC_PROP_SECURITY "SECURITY"
#define SASLC_PROP_SERVICE "SERVICE"
#define SASLC_PROP_SERVICENAME "SERVICENAME"
#define SASLC_PROP_SERVNAME "SERVNAME"
/* environment variables */
#define SASLC_ENV_CONFIG "SASLC_CONFIG"

View File

@ -1,4 +1,4 @@
.\" $NetBSD: libsaslc.3,v 1.8 2011/02/15 18:36:08 christos Exp $
.\" $NetBSD: libsaslc.3,v 1.9 2011/02/16 02:14:22 christos Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -364,7 +364,7 @@ encode_stream(saslc_sess_t *sess, int fdin, int fdout)
return 0;
}
.Ed
.Ss CONFIGURATION
.Sh CONFIGURATION
.Nm
uses three types of dictionaries: context (or global), session, and
mechanism, and they are searched in that order by
@ -456,7 +456,7 @@ inclusive.
Any base supported by
.Xr strtoll 3
is allowed.
.Ss PROPERTIES
.Sh PROPERTIES
Most of the control of the
.Nm
behavior is done via setting various properties in the context or
@ -591,7 +591,7 @@ function.
.It SASLC_PROP_SERVICE Po Qo SERVICE Qc Pc
The service being used, e.g., smtp, imap, etc.
Used by the DIGEST-MD5 and GSSAPI mechanisms.
.It SASLC_PROP_SERVICENAME Po Qo SERVICENAME Qc Pc
.It SASLC_PROP_SERVNAME Po Qo SERVNAME Qc Pc
A comma delimited list of possible service names with elements of the
form
.Qq Oo Ao hostname Ac : Oc Ns Ao serv-name Ac
@ -633,7 +633,7 @@ This may be overridden by
If set, turn on debugging messages.
This turns on debugging as early as possible and is a global setting.
.El
.Ss GSSAPI and Kerberos
.Sh GSSAPI AND KERBEROS
The following is a minimal
.Pq Heimdal
Kerberos 5 setup for use with an smtp server that has been configured

View File

@ -1,4 +1,4 @@
/* $NetBSD: dict.c,v 1.5 2011/02/12 23:21:32 christos Exp $ */
/* $NetBSD: dict.c,v 1.6 2011/02/16 02:14:22 christos Exp $ */
/* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@ -35,7 +35,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: dict.c,v 1.5 2011/02/12 23:21:32 christos Exp $");
__RCSID("$NetBSD: dict.c,v 1.6 2011/02/16 02:14:22 christos Exp $");
#include <sys/queue.h>
@ -60,14 +60,14 @@ typedef struct saslc__dict_node_t {
} saslc__dict_node_t;
/*
* XXX: If you add property keys, please readjust these values so that
* saslc__dict_hashval() remains collisionless.
* XXX: If you add or change property keys, please readjust these
* values so that saslc__dict_hashval() remains collisionless.
* dist/test_hash/test_hash.c can help with this.
*/
/* no collisions: hsize=15 hinit=3 shift=7 */
#define HASH_SIZE 15
#define HASH_INIT 3
#define HASH_SHIFT 7
/* no collisions: hsize=18 hinit=0 shift=2 */
#define HASH_SIZE 18
#define HASH_INIT 0
#define HASH_SHIFT 2
/**
* @brief compute the hash value for a given string.

View File

@ -1,4 +1,4 @@
/* $NetBSD: mech_digestmd5.c,v 1.8 2011/02/15 18:36:08 christos Exp $ */
/* $NetBSD: mech_digestmd5.c,v 1.9 2011/02/16 02:14:22 christos Exp $ */
/* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@ -35,7 +35,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: mech_digestmd5.c,v 1.8 2011/02/15 18:36:08 christos Exp $");
__RCSID("$NetBSD: mech_digestmd5.c,v 1.9 2011/02/16 02:14:22 christos Exp $");
#include <sys/param.h>
@ -75,7 +75,7 @@ __RCSID("$NetBSD: mech_digestmd5.c,v 1.8 2011/02/15 18:36:08 christos Exp $");
#define SASLC_DIGESTMD5_QOPMASK SASLC_PROP_QOPMASK
#define SASLC_DIGESTMD5_REALM SASLC_PROP_REALM
#define SASLC_DIGESTMD5_SERVICE SASLC_PROP_SERVICE
#define SASLC_DIGESTMD5_SERVICENAME SASLC_PROP_SERVICENAME
#define SASLC_DIGESTMD5_SERVNAME SASLC_PROP_SERVNAME
/*
* XXX: define this if you want to be able to set a fixed cnonce for
* debugging purposes.
@ -729,7 +729,7 @@ saslc__mech_digestmd5_digesturi(saslc_sess_t *sess, const char *serv_host)
"service is required for an authentication");
return NULL;
}
serv_list = saslc_sess_getprop(sess, SASLC_DIGESTMD5_SERVICENAME);
serv_list = saslc_sess_getprop(sess, SASLC_DIGESTMD5_SERVNAME);
serv_name = serv_list != NULL
? choose_from_hqlist(serv_list, serv_host) : NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: test_hash.c,v 1.1 2011/02/11 23:44:44 christos Exp $ */
/* $NetBSD: test_hash.c,v 1.2 2011/02/16 02:14:23 christos Exp $ */
/* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@ -43,7 +43,7 @@
#include <saslc.h>
__RCSID("$NetBSD: test_hash.c,v 1.1 2011/02/11 23:44:44 christos Exp $");
__RCSID("$NetBSD: test_hash.c,v 1.2 2011/02/16 02:14:23 christos Exp $");
#define MAX_HASH_SIZE 256
@ -65,7 +65,7 @@ static const char *keys[] = {
SASLC_PROP_REALM,
SASLC_PROP_SECURITY,
SASLC_PROP_SERVICE,
SASLC_PROP_SERVICENAME
SASLC_PROP_SERVNAME
};
/*