mirror of
https://github.com/troglobit/finit.git
synced 2026-10-31 13:00:32 +00:00
Add support for a deny filter syntax to inetd services
This patch changes the syntax for custom inetd services and adds support
for deny filters. The new syntax is:
inetd service/proto[@iface,!iface,...] </path/to/cmd | internal[.service]>
This means the second column now defines what@from and the third to/what
process. For internal services on a custom port the internal.service
syntax must be specified, so Finit can properly bind the inetd service
to the correct plugin. Here follows a few examples:
inetd time/udp wait [2345] internal -- UNIX rdate service
inetd time/tcp nowait [2345] internal -- UNIX rdate service
inetd 3737/tcp nowait [2345] internal.time -- UNIX rdate service
inetd telnet/tcp@*,!eth1,!eth0, nowait [2345] /sbin/telnetd -i -F -- Telnet service
inetd 2323/tcp@eth1,eth2,eth0 nowait [2345] /sbin/telnetd -i -F -- Telnet service
inetd 222/tcp@eth0 nowait [2345] /sbin/dropbear -i -R -F -- SSH service
inetd ssh/tcp@*,!eth0 nowait [2345] /sbin/dropbear -i -R -F -- SSH service
Access to telnet on port `2323` is only possible from interfaces `eth0`,
`eth1` and `eth2`. The standard telnet port (`23`) is available from
all other interfaces, but also `eth2`. The `*` notation used in the ssh
stanza means *any* interface, however, here `eth0` is not allowed.
NOTE: This patch breaks syntax compatibility with Finit v1.12!
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
b0c759e518
commit
03573b41ca
7 files changed
+177
-195
No files matched your search
@@ -60,11 +60,10 @@ void inetd_stop (inetd_t *inetd);
|
||||
|
||||
int inetd_respawn (pid_t pid);
|
||||
|
||||
int inetd_new (inetd_t *inetd, char *service, char *proto, int forking);
|
||||
int inetd_new (inetd_t *inetd, char *service, char *proto, int forking, void *arg);
|
||||
int inetd_del (inetd_t *inetd);
|
||||
|
||||
int inetd_init (inetd_t *inetd, void *arg, char *ifname, char *port);
|
||||
int inetd_match (inetd_t *inetd, char *service, char *proto, char *port);
|
||||
int inetd_match (inetd_t *inetd, char *service, char *proto);
|
||||
int inetd_filter_str (inetd_t *inetd, char *str, size_t len);
|
||||
|
||||
int inetd_allow (inetd_t *inetd, char *ifname);
|
||||
|
||||
Reference in new issue
Block a user