aboutsummaryrefslogtreecommitdiff
path: root/lib/libtacplus
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2009-11-25 14:59:28 +0000
committerAttilio Rao <attilio@FreeBSD.org>2009-11-25 14:59:28 +0000
commit5e3d7b099aa646a38a56153833ac396e3620b1ee (patch)
tree16cde05f5e220954d2fbd3c61e5b0d4d88b4a4ee /lib/libtacplus
parentf413289ee0669d4c484a983c2827909cd3b6dc5f (diff)
downloadsrc-5e3d7b099aa646a38a56153833ac396e3620b1ee.tar.gz
src-5e3d7b099aa646a38a56153833ac396e3620b1ee.zip
Notes
Diffstat (limited to 'lib/libtacplus')
-rw-r--r--lib/libtacplus/taclib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libtacplus/taclib.c b/lib/libtacplus/taclib.c
index 6ac3c72501c6..a44e83476e88 100644
--- a/lib/libtacplus/taclib.c
+++ b/lib/libtacplus/taclib.c
@@ -1263,8 +1263,13 @@ tac_get_av_value(struct tac_handle *h, const char *attribute)
* h->srvr_avs[0] = "foobie=var1"
* h->srvr_avs[1] = "foo=var2"
* is handled.
+ *
+ * Note that for empty string attribute values a
+ * 0-length string is returned in order to distinguish
+ * against unset values.
+ * dump_str() will handle srvr.len == 0 correctly.
*/
- if (found_seperator == 1 && ch != end) {
+ if (found_seperator == 1) {
srvr.len = end - ch;
srvr.data = ch;
return dup_str(h, &srvr, NULL);