summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2011-11-14 09:54:47 -0500
committerSteve Dickson <steved@redhat.com>2011-11-14 16:08:31 -0500
commitd22ef3f525d71b565fcc688557273a6cabeeb71a (patch)
tree2c8b203c393d8584b8a5dd8fc3db3b1159e31688 /support
parent6c9eb965c49d6aa3370fcdf736277ab31ccb45fd (diff)
downloadnfs-utils-d22ef3f525d71b565fcc688557273a6cabeeb71a.tar.gz
nfs-utils-d22ef3f525d71b565fcc688557273a6cabeeb71a.tar.xz
nfs-utils-d22ef3f525d71b565fcc688557273a6cabeeb71a.zip
rpc.idmapd: Sections in idmapd.conf are ignored.
In the parsing routine, conf_parse_line(), a string is not being null terminated which is causing section of the config file to be ignored. https://bugzilla.linux-nfs.org/show_bug.cgi?id=205 Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support')
-rw-r--r--support/nfs/conffile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
index fa0dc6b..3990578 100644
--- a/support/nfs/conffile.c
+++ b/support/nfs/conffile.c
@@ -256,13 +256,14 @@ conf_parse_line(int trans, char *line, size_t sz)
val++, j++;
if (*val)
i = j;
- section = malloc(i);
+ section = malloc(i+1);
if (!section) {
xlog_warn("conf_parse_line: %d: malloc (%lu) failed", ln,
(unsigned long)i);
return;
}
strncpy(section, line, i);
+ section[i] = '\0';
if (arg)
free(arg);