projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add non-root support for UST tracing
[lttng-tools.git]
/
lttng-sessiond
/
ust-app.c
diff --git
a/lttng-sessiond/ust-app.c
b/lttng-sessiond/ust-app.c
index 4f65553c8385d770c6f9c9a1e517a21e8ba0c06c..377600f3d2f2347ce52765b43c5fbec19ceddff7 100644
(file)
--- a/
lttng-sessiond/ust-app.c
+++ b/
lttng-sessiond/ust-app.c
@@
-1160,6
+1160,7
@@
static int create_ust_app_metadata(struct ust_app_session *ua_sess,
char *pathname, struct ust_app *app)
{
int ret = 0;
char *pathname, struct ust_app *app)
{
int ret = 0;
+ mode_t old_umask;
if (ua_sess->metadata == NULL) {
/* Allocate UST metadata */
if (ua_sess->metadata == NULL) {
/* Allocate UST metadata */
@@
-1185,11
+1186,13
@@
static int create_ust_app_metadata(struct ust_app_session *ua_sess,
goto error;
}
goto error;
}
+ old_umask = umask(0);
ret = mkdir(ua_sess->path, S_IRWXU | S_IRWXG);
if (ret < 0) {
PERROR("mkdir UST metadata");
goto error;
}
ret = mkdir(ua_sess->path, S_IRWXU | S_IRWXG);
if (ret < 0) {
PERROR("mkdir UST metadata");
goto error;
}
+ umask(old_umask);
ret = snprintf(ua_sess->metadata->pathname, PATH_MAX,
"%s/metadata", ua_sess->path);
ret = snprintf(ua_sess->metadata->pathname, PATH_MAX,
"%s/metadata", ua_sess->path);
@@
-2195,9
+2198,6
@@
int ust_app_add_ctx_channel_glb(struct ltt_ust_session *usess,
}
}
}
}
- /* Add ltt UST context node to ltt UST channel */
- hashtable_add_unique(uchan->ctx, &uctx->node);
-
rcu_read_unlock();
return ret;
}
rcu_read_unlock();
return ret;
}
@@
-2248,9
+2248,6
@@
int ust_app_add_ctx_event_glb(struct ltt_ust_session *usess,
}
}
}
}
- /* Add ltt UST context node to ltt UST event */
- hashtable_add_unique(uevent->ctx, &uctx->node);
-
rcu_read_unlock();
return ret;
}
rcu_read_unlock();
return ret;
}
This page took
0.024466 seconds
and
4
git commands to generate.