diff options
author | Tom Whitten <tom.whitten@oracle.com> | 2010-06-28 08:02:28 -0700 |
---|---|---|
committer | Tom Whitten <tom.whitten@oracle.com> | 2010-06-28 08:02:28 -0700 |
commit | 0673ac10697e2637ba66951f5005ae24e0c40f5c (patch) | |
tree | f8f2c71aa6f415fa884fafc31912e6a0658df9af /usr/src/cmd/svc/svccfg | |
parent | 779f1d699f8274891123d8f5b4ab4fffd61fab08 (diff) | |
download | illumos-joyent-0673ac10697e2637ba66951f5005ae24e0c40f5c.tar.gz |
6694511 svccfg export truncating opaque value type when byte length > 2048
Diffstat (limited to 'usr/src/cmd/svc/svccfg')
-rw-r--r-- | usr/src/cmd/svc/svccfg/svccfg_libscf.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/cmd/svc/svccfg/svccfg_libscf.c b/usr/src/cmd/svc/svccfg/svccfg_libscf.c index 95f2fcd8e2..c166aba2ba 100644 --- a/usr/src/cmd/svc/svccfg/svccfg_libscf.c +++ b/usr/src/cmd/svc/svccfg/svccfg_libscf.c @@ -915,8 +915,14 @@ lscf_init() max_scf_len = max_scf_name_len; if (max_scf_pg_type_len > max_scf_len) max_scf_len = max_scf_pg_type_len; - if (max_scf_value_len > max_scf_len) - max_scf_len = max_scf_value_len; + /* + * When a value of type opaque is represented as a string, the + * string contains 2 characters for every byte of data. That is + * because the string contains the hex representation of the opaque + * value. + */ + if (2 * max_scf_value_len > max_scf_len) + max_scf_len = 2 * max_scf_value_len; if (atexit(remove_tempfile) != 0) uu_die(gettext("Could not register atexit() function")); |