From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: IPX without suidroot Date: Thu, 01 Aug 2002 18:02:58 +0400 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <3D493F92.8000801@yahoo.com> Reply-To: stas.orel@mailcity.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060104090105080109060006" Return-path: List-Id: To: linux-msdos@vger.kernel.org This is a multi-part message in MIME format. --------------060104090105080109060006 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Hello. Reinhard Karcher wrote: >> Only question I have: "Can I use IPX while being simple user >> without any sudo or suidroot?" > As far as I know, it is not possible. Dosemu has to create sockets > of the IPX-type, and thagt can't be done without rootpriviledges. I *think* (without too much knowledge of an IPX networking) that this is possible. I have traced the IPXOpenSocket() and the only place which fails without root is setting SO_DEBUG opt to socket which is used only for debugging and must not fail, so it's a bug. For everything else root doesn't seem to be required. I started doom's ipxsetup and it doesn't complain, log indicates that packets are floating OK. So I think IPX must work without root. And if not, Grigory or Reinhard, please apply the attached patch and produce a -D9+n log and also cat /proc/net/ipx_interface --------------060104090105080109060006 Content-Type: text/plain; name="ipx_root.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ipx_root.diff" --- src/dosext/net/net/ipx.c Fri Jul 19 02:04:37 2002 +++ src/dosext/net/net/ipx.c Thu Aug 1 17:30:44 2002 @@ -443,17 +443,14 @@ } opt = 1; - /* turn on socket debugging */ - if (debug_level('n')) { + /* turn on socket debugging - requires root! */ + if (debug_level('n') && can_do_root_stuff) { enter_priv_on(); - if (setsockopt(sock, SOL_SOCKET, SO_DEBUG, &opt, sizeof(opt)) == -1) { - leave_priv_setting(); + if (setsockopt(sock, SOL_SOCKET, SO_DEBUG, &opt, sizeof(opt)) == -1) n_printf("IPX: could not set socket option for debugging: %s.\n", strerror(errno)); - /* I can't think of anything else to return */ - return (RCODE_SOCKET_TABLE_FULL); - } leave_priv_setting(); } + opt = 1; /* Permit broadcast output */ enter_priv_on(); --------------060104090105080109060006--