projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Attempt to fix collectd/collectd#229 by doing user / group lookups before we fork.
[collectd.git]
/
src
/
rrdcached.c
diff --git
a/src/rrdcached.c
b/src/rrdcached.c
index
a8305e6
..
33f05e7
100644
(file)
--- a/
src/rrdcached.c
+++ b/
src/rrdcached.c
@@
-121,12
+121,15
@@
static int value_list_to_filename (char *buffer, size_t buffer_size,
if (datadir != NULL)
{
if (datadir != NULL)
{
- size_t datadir_len = strlen (datadir);
+ size_t datadir_len = strlen (datadir)
+ 1
;
if (datadir_len >= buffer_size)
return (ENOMEM);
sstrncpy (buffer, datadir, buffer_size);
if (datadir_len >= buffer_size)
return (ENOMEM);
sstrncpy (buffer, datadir, buffer_size);
+ buffer[datadir_len - 1] = '/';
+ buffer[datadir_len] = 0;
+
buffer += datadir_len;
buffer_size -= datadir_len;
}
buffer += datadir_len;
buffer_size -= datadir_len;
}