> > Surely anonymous sockets shouldn't get bound to port numbers less
> > than 1024 (i.e. PROT_SOCK)? The kernel patch I made was a bit wrong
> > though. Instead of
> Why not make "1024" configurable ? >:-) But in addition, to defining
> anonymous range, I'm suggesting also defining the "root-only" range
> with a similar variable.
Why not? You could make a file that contains ports that shouldn't be used
for anonymous sockets. At compile time the file is read and parsed into a
#define or two and a struct containing the ports. The extra code that
enables the feature is put between those #defines and there ya go :).