Skip to content

Commit

Permalink
print secrets only in -Xx
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Oct 10, 2017
1 parent f018f25 commit 3d41e92
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/client.c
Expand Up @@ -749,9 +749,13 @@ bool client_add_dynamic(RADCLIENT_LIST *clients, RADCLIENT *master, RADCLIENT *c
c->created = time(NULL);
c->longname = talloc_typed_strdup(c, c->shortname);

INFO("Adding client %s/%i with shared secret \"%s\"",
ip_ntoh(&c->ipaddr, buffer, sizeof(buffer)), c->ipaddr.prefix, c->secret);

if (rad_debug_lvl <= 2) {
INFO("Adding client %s/%i",
ip_ntoh(&c->ipaddr, buffer, sizeof(buffer)), c->ipaddr.prefix);
} else {
INFO("Adding client %s/%i with shared secret \"%s\"",
ip_ntoh(&c->ipaddr, buffer, sizeof(buffer)), c->ipaddr.prefix, c->secret);
}
return true;

error:
Expand Down

0 comments on commit 3d41e92

Please sign in to comment.