1
0
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:
Bram Matthys
2026-02-21 19:38:45 +01:00
parent b467e4e147
commit 059abc4b56
+6
View File
@@ -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;