X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Futils.c;h=2a20e5a8c4ab4cca1557ca917cfa2de02defd905;hp=a068e410b4bf26800d38e5807a0fb06c884f70d6;hb=9120e619240c698c899a9baea203a52c4bdfd565;hpb=d6d89e4c97ca12219003f576d145ea667c87badb diff --git a/src/common/utils.c b/src/common/utils.c index a068e410b..2a20e5a8c 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -294,7 +294,7 @@ int expand_double_slashes_dot_and_dotdot(char *path) * 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; } @@ -1274,8 +1274,14 @@ int utils_get_group_id(const char *name, bool warn, gid_t *gid) } } 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; }