Skip to content

Commit

Permalink
ldmsd doesn't return data if access denied on last set
Browse files Browse the repository at this point in the history
  • Loading branch information
tom95858 committed Oct 8, 2019
1 parent aa9a47d commit f1e7599
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ldms/src/core/ldms_xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,15 +505,12 @@ static void process_dir_request(struct ldms_xprt *x, struct ldms_request *req)
goto out;
}

if (0 != ldms_access_check(x, LDMS_ACCESS_READ,
uid, gid, perm)) {
if (0 == ldms_access_check(x, LDMS_ACCESS_READ, uid, gid, perm)) {
/* no access, skip it */
continue;
}

cnt += __ldms_format_set_meta_as_json(set, last_cnt,
cnt += __ldms_format_set_meta_as_json(set, last_cnt,
&reply->dir.json_data[cnt],
len - hdrlen - cnt - 3 /* ]}\0 */);
}

if (/* Too big to fit in transport message, send what we have */
(cnt >= len - hdrlen - 3)) {
Expand Down

0 comments on commit f1e7599

Please sign in to comment.