diff options
author | ton <none@none> | 2007-08-20 15:48:19 -0700 |
---|---|---|
committer | ton <none@none> | 2007-08-20 15:48:19 -0700 |
commit | 4b484e007f44a62fb92d63bf345660cb76111d26 (patch) | |
tree | 4177277407dc06511c9367bd8ed246f88187da1e /usr/src | |
parent | 45849b8db2d44a820b951961295790913d5fe685 (diff) | |
download | illumos-joyent-4b484e007f44a62fb92d63bf345660cb76111d26.tar.gz |
6430185 tnchkdb prints inconsistent error messages when the paths of the 3 database files cannot be parsed
6546024 tnchkdb displays "No error" when an invalid template name is specified in the tnrhtp datatbase
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/tsol/tnchkdb/tnchkdb.c | 2 | ||||
-rw-r--r-- | usr/src/lib/libtsnet/common/tsol_sgettpent.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/usr/src/cmd/tsol/tnchkdb/tnchkdb.c b/usr/src/cmd/tsol/tnchkdb/tnchkdb.c index 29de0789a7..11ff21f99a 100644 --- a/usr/src/cmd/tsol/tnchkdb/tnchkdb.c +++ b/usr/src/cmd/tsol/tnchkdb/tnchkdb.c @@ -287,7 +287,7 @@ check_tnrhtp(const char *file) if ((fp = fopen(file, "r")) == NULL) { err = errno; (void) fprintf(stderr, - gettext("tnchkdb: cannot open %1$s: %2$s\n"), file, + gettext("tnchkdb: failed to open %1$s: %2$s\n"), file, strerror(err)); exitval = 2; tnrhtp_bad = B_TRUE; diff --git a/usr/src/lib/libtsnet/common/tsol_sgettpent.c b/usr/src/lib/libtsnet/common/tsol_sgettpent.c index 295fdba190..e2dbea6986 100644 --- a/usr/src/lib/libtsnet/common/tsol_sgettpent.c +++ b/usr/src/lib/libtsnet/common/tsol_sgettpent.c @@ -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. * * From "tsol_tndb_parser.c 7.24 01/09/05 SMI; TSOL 2.x" @@ -268,8 +268,10 @@ tpstr_to_ent(tsol_tpstr_t *tpstrp, int *errp, char **errstrp) return (NULL); } if (strlcpy(tpentp->name, template, sizeof (tpentp->name)) >= - sizeof (tpentp->name)) + sizeof (tpentp->name)) { + *errp = LTSNET_ILL_NAME; goto err_ret; + } kv = _str2kva(attrs, KV_ASSIGN, KV_DELIMITER); *errp = parse_remainder(tpentp, kv); _kva_free(kv); |