On Sunday, November 4, 2012 5:19:40 PM UTC-5, Ben Noordhuis wrote: > > On Sun, Nov 4, 2012 at 10:24 PM, dhruvbird <[email protected]<javascript:>> > wrote: > > Hello, > > > > Has anyone linked the node.js executable against libwrap so that node.js > > based servers can make use of the hosts.allow and hosts.deny files? As I > > understand, libwrap transparently allows/denies TCP connections based on > > these parameters. Please let me know if my understanding is correct and > if > > anyone has been able to get the two to work correctly together. > > > > Regards, > > -Dhruv. > > Not transparently. libwrap is a collection of functions that, among > other things, lets you parse hosts.* entries. You still need to call > those functions though, it doesn't do any LD_PRELOAD magic or anything >
Ah! I was under the impression that LD_PRELOAD (or some such thing would be needed and it world work magically). Thanks for clarifying! > (which probably wouldn't work anyway - node.js often makes system > calls directly instead of going through the libc wrappers.) > Based on this, I took a look at the tcp-wrappers code and it seems that they use sync-file-i/o routines to read the hosts.* files. Do you think it's a good idea to use this on a running server or maybe emulate the matching based on a pure js implementation (assuming that the format of hosts.* is simple enough to parse out). Regards, -Dhruv. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
