mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-12 17:14:46 +02:00
"STATS fdtable" is mostly for debugging. Simplify read/write handler display
and callback data in non-DEBUGMODE. Also because exposing pointers like this can defeat ASLR. These STATS are oper-only though, but hey, defense in depth... and the pointer values don't make sense to non-devs anyway, so why show them in the first place.
This commit is contained in:
@@ -643,9 +643,15 @@ int stats_fdtable(Client *client, const char *para)
|
||||
if (!fde->is_open)
|
||||
continue;
|
||||
|
||||
#ifndef DEBUGMODE
|
||||
sendnumericfmt(client, RPL_STATSDEBUG,
|
||||
"fd %3d, desc '%s', read-hdl %d, write-hdl %d, cbdata %d",
|
||||
fde->fd, fde->desc, fde->read_callback ? 1 : 0, fde->write_callback ? 1 : 0, fde->data ? 1 : 0);
|
||||
#else
|
||||
sendnumericfmt(client, RPL_STATSDEBUG,
|
||||
"fd %3d, desc '%s', read-hdl %p, write-hdl %p, cbdata %p",
|
||||
fde->fd, fde->desc, fde->read_callback, fde->write_callback, fde->data);
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user