Skip to contentSkip to conversation

IPX without suidroot

DISCUSSION Stas Sergeev 2 participants 2 messages Aug 1, 2002 – Aug 2, 2002

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 4 lines · Reinhard Karcher
Quoted 2 lines

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

dosext/net/net/ipx.c +4 -7
@@ -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();
#1 lore raw
Quoted 6 lines · On Thu, 01 Aug 2002 18:02:58 +0400 Stas Sergeev <[email protected]> wrote:

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

Ok, I've applied patch and can get some debug now.

While doing as root:
http://lrn.ru/~bga/dosemu/good-boot.log.bz2 8213
(Server was found and attached.)

While being simple user:
http://lrn.ru/~bga/dosemu/notfound-boot.log.bz2 27386
(I see some network traffic on Gkrellm, bigger than usual, but server wasn't found. In log it looks like I can't get RIP packets if I haven't root privilegies.)

$ cat /proc/net/ipx_interface
Network    Node_Address   Primary  Device     Frame_Type
00000002   0004761CBCA8   Yes      eth0       802.2
Signature · 1 line
 Grigory Batalov.