Re: How to find a certain socket?
- From: "Taras Danko" <gortaur@xxxxxxxxx>
- Date: Thu, 21 Sep 2006 21:29:41 +0300
2006/9/21, Robert Watson <rwatson@xxxxxxxxxxx>:
What are you trying to do, exactly?
The idea is the following: I have a module which replaces the "socket"
system call with my own "extended" socket syscall which adds some
restrictions for "socket" callers. After my module is kldloaded - some
processes/users/domains become restricted in creation of some type of
TCP/UDP sockets. This part is quite obvious. But I also want to handle
the situation when a restricted process has created a sockets _before_
my module was loaded. So I want to close its sockets so the process
will have to recreate them passing through my restriction policy this
time.
> And the second question: whats the correct way to close the socket which was
> found?
I'm not sure there's really a "correct" way to go about ripping a socket out
from under an application. tcpkill does the next closest thing, which is to
simulate a RST on the TCP connection and force it to close, which is
propagated up the stack in a way the application will understand.
As I understand, RST will take effect only for the client side
sockets but the server side "listening" socket still will be alive
awaiting for another connections. And I want to be able to close
sockets of both server and client types (sure if they were created by
my restricted process mentioned above).
Taras Danko
--
contact me:
email: gortaur@xxxxxxxxx
icq: 166956956
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- References:
- How to find a certain socket?
- From: Taras Danko
- Re: How to find a certain socket?
- From: Robert Watson
- How to find a certain socket?
- Prev by Date: A Bug in linker_reference_module() ?
- Next by Date: Re: numbers don't lie ...
- Previous by thread: Re: How to find a certain socket?
- Next by thread: A Bug in linker_reference_module() ?
- Index(es):
Relevant Pages
|
|