Browse Source

Only log user and workers that are authorised.

master
Con Kolivas 8 years ago
parent
commit
33b26291b0
  1. 5
      src/stratifier.c

5
src/stratifier.c

@ -8184,9 +8184,12 @@ static void *statsupdate(void *arg)
"shares", worker->shares,
"bestshare", worker->best_diff);
/* Only log workers of authorised users */
if (user->authorised) {
ASPRINTF(&fname, "%s/workers/%s", ckp->logdir, worker->workername);
s = json_dumps(val, JSON_NO_UTF8 | JSON_PRESERVE_ORDER | JSON_EOL);
add_log_entry(&log_entries, &fname, &s);
}
json_decref(val);
}
@ -8234,6 +8237,7 @@ static void *statsupdate(void *arg)
remote_users++;
}
if (user->authorised) {
ASPRINTF(&fname, "%s/users/%s", ckp->logdir, user->username);
s = json_dumps(val, JSON_NO_UTF8 | JSON_PRESERVE_ORDER | JSON_EOL);
add_log_entry(&log_entries, &fname, &s);
@ -8243,6 +8247,7 @@ static void *statsupdate(void *arg)
dealloc(s);
add_msg_entry(&char_list, &sp);
}
}
json_decref(val);
if (ckp->remote)
upstream_workers(ckp, user);

Loading…
Cancel
Save