mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
authproc: pad leading 0 for localhost IP's
This avoids misparsing by rb's helper stuff..
This commit is contained in:
parent
839f2fa23e
commit
d9364d2913
1 changed files with 9 additions and 1 deletions
|
@ -582,7 +582,15 @@ ident_check_enable(bool enabled)
|
||||||
void
|
void
|
||||||
create_opm_listener(const char *ip, uint16_t port)
|
create_opm_listener(const char *ip, uint16_t port)
|
||||||
{
|
{
|
||||||
rb_helper_write(authd_helper, "O opm_listener %s %hu", ip, port);
|
char ipbuf[HOSTIPLEN];
|
||||||
|
rb_strlcpy(ipbuf, ip, sizeof(ipbuf));
|
||||||
|
if(ipbuf[0] == ':')
|
||||||
|
{
|
||||||
|
memmove(ipbuf + 1, ipbuf, sizeof(ipbuf) - 1);
|
||||||
|
ipbuf[0] = '0';
|
||||||
|
}
|
||||||
|
|
||||||
|
rb_helper_write(authd_helper, "O opm_listener %s %hu", ipbuf, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable all OPM scans */
|
/* Disable all OPM scans */
|
||||||
|
|
Loading…
Reference in a new issue