* Copy the current token which is neither a '.' nor a '..'.
*/
path[expanded_path_len++] = '/';
- memcpy(&path[expanded_path_len], curr_char, curr_token_len);
+ memmove(&path[expanded_path_len], curr_char, curr_token_len);
expanded_path_len += curr_token_len;
}
int ret;
struct lttng_directory_handle *handle;
const struct lttng_credentials creds = {
- .uid = (uid_t) uid,
- .gid = (gid_t) gid,
+ .uid = LTTNG_OPTIONAL_INIT_VALUE(uid),
+ .gid = LTTNG_OPTIONAL_INIT_VALUE(gid),
};
handle = lttng_directory_handle_create(NULL);
int ret;
struct lttng_directory_handle *handle;
const struct lttng_credentials creds = {
- .uid = (uid_t) uid,
- .gid = (gid_t) gid,
+ .uid = LTTNG_OPTIONAL_INIT_VALUE(uid),
+ .gid = LTTNG_OPTIONAL_INIT_VALUE(gid),
};
handle = lttng_directory_handle_create(NULL);
}
}
if (ret) {
- PERROR("Failed to get group file entry for group name \"%s\"",
- name);
+ if (ret == ESRCH) {
+ DBG("Could not find group file entry for group name '%s'",
+ name);
+ } else {
+ PERROR("Failed to get group file entry for group name '%s'",
+ name);
+ }
+
ret = -1;
goto error;
}