lkml.org 
[lkml]   [1999]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Problem with sockets under 2.0.36
On Fri, Jan 29, 1999 at 01:19:59PM -0800, Shane Wegner wrote:

> I've encountered this problem with a patch under the 2.0.36 kernel.
> I have used this patch under 2.0.33-2.0.35 without any problem but
> recently it has been flakey.

> + /* The low and high bytes of the port must be swaped inorder to work */
> + if ( (current->uid >= 1000) && (current->sgid != 103)
> + && ((ntohl(sin->sin_addr.s_addr) & 0xFFFFFF00) != (127 << 24))
> + && (sin->sin_port != htons(43)) /* whois */
> + && (sin->sin_port != htons(53)) /* dns */
> + && (sin->sin_port != htons(70)) /* gofer */
> + && (sin->sin_port != htons(79)) /* finger */
> + && (sin->sin_port != htons(80)) /* http */
> + && (sin->sin_port != htons(113)) /* ident */
> + && (sin->sin_port != htons(443)) /* https */
> + && (sin->sin_port != htons(517)) /* talk */
> + && (sin->sin_port != htons(518)) ) /* ntalk */
> + for (i = 0;i < NGROUPS;i++)
> + {
> + if (current->groups[i] == 103)
> + allow_connect = 1;

[...]

Oo... yuck. No offense intended, in 2.0.x you don't have many
options. You might want to look at 2.2.x -- it have `capabilites'
that you can give to processes. This would allow you to hack login
(or whatever) to give certain processes the ability to bind to ports
< 1024....



-cw


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.063 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site