diff options
Diffstat (limited to 'usr/src/lib/libtsnet')
-rw-r--r-- | usr/src/lib/libtsnet/common/libtsnet.h | 3 | ||||
-rw-r--r-- | usr/src/lib/libtsnet/common/tsol_sgettpent.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/usr/src/lib/libtsnet/common/libtsnet.h b/usr/src/lib/libtsnet/common/libtsnet.h index 2aa6d5fc56..c1f9b695bd 100644 --- a/usr/src/lib/libtsnet/common/libtsnet.h +++ b/usr/src/lib/libtsnet/common/libtsnet.h @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * All symbols and functions in this header file and library are private to Sun @@ -44,6 +44,7 @@ extern "C" { #define TNZONECFG_PATH "/etc/security/tsol/tnzonecfg" #define TNDB_COMMA ", \t" +#define TN_RESERVED ",#;" /* * String parsing routines diff --git a/usr/src/lib/libtsnet/common/tsol_sgettpent.c b/usr/src/lib/libtsnet/common/tsol_sgettpent.c index e2dbea6986..5ceb002648 100644 --- a/usr/src/lib/libtsnet/common/tsol_sgettpent.c +++ b/usr/src/lib/libtsnet/common/tsol_sgettpent.c @@ -267,8 +267,9 @@ tpstr_to_ent(tsol_tpstr_t *tpstrp, int *errp, char **errstrp) *errp = LTSNET_SYSERR; return (NULL); } - if (strlcpy(tpentp->name, template, sizeof (tpentp->name)) >= - sizeof (tpentp->name)) { + if ((strlcpy(tpentp->name, template, sizeof (tpentp->name)) >= + sizeof (tpentp->name)) || + strpbrk(tpentp->name, TN_RESERVED) != NULL) { *errp = LTSNET_ILL_NAME; goto err_ret; } |