projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: getgrnam is not MT-Safe, use getgrnam_r
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
main.c
diff --git
a/src/bin/lttng-sessiond/main.c
b/src/bin/lttng-sessiond/main.c
index 24855b9767632bc1584316b0b0c80362d870c2e5..57324820bd6aa2c3e09da7f3d0106c8f80c5b89d 100644
(file)
--- a/
src/bin/lttng-sessiond/main.c
+++ b/
src/bin/lttng-sessiond/main.c
@@
-1023,7
+1023,11
@@
static int set_permissions(char *rundir)
int ret;
gid_t gid;
int ret;
gid_t gid;
- gid = utils_get_group_id(config.tracing_group_name.value);
+ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid);
+ if (ret) {
+ /* Default to root group. */
+ gid = 0;
+ }
/* Set lttng run dir */
ret = chown(rundir, 0, gid);
/* Set lttng run dir */
ret = chown(rundir, 0, gid);
@@
-1134,7
+1138,16
@@
static int set_consumer_sockets(struct consumer_data *consumer_data)
goto error;
}
if (is_root) {
goto error;
}
if (is_root) {
- ret = chown(path, 0, utils_get_group_id(config.tracing_group_name.value));
+ gid_t gid;
+
+ ret = utils_get_group_id(config.tracing_group_name.value, true,
+ &gid);
+ if (ret) {
+ /* Default to root group. */
+ gid = 0;
+ }
+
+ ret = chown(path, 0, gid);
if (ret < 0) {
ERR("Unable to set group on %s", path);
PERROR("chown");
if (ret < 0) {
ERR("Unable to set group on %s", path);
PERROR("chown");
This page took
0.024789 seconds
and
4
git commands to generate.