From owner-freebsd-current Sat Jun 30 15:14:53 2001 Delivered-To: freebsd-current@freebsd.org Received: from squid.tznet.com (squid.tznet.com [206.31.5.7]) by hub.freebsd.org (Postfix) with ESMTP id 9AB4837B403 for ; Sat, 30 Jun 2001 15:14:50 -0700 (PDT) (envelope-from murban@tznet.com) Received: from kiara.simbalink.org (0e1d25f32921682ee9b5318c4a18114f@murban.tznet.com [205.216.111.20]) by squid.tznet.com (8.11.2/8.11.2) with ESMTP id f5UMG6W20373 for ; Sat, 30 Jun 2001 17:16:07 -0500 (CDT) Received: by kiara.simbalink.org (Postfix, from userid 1000) id 79CAF786E; Sat, 30 Jun 2001 17:22:02 -0500 (CDT) Date: Sat, 30 Jun 2001 17:22:02 -0500 From: "Michael C. Urban" To: freebsd-current@freebsd.org Subject: Bug in CURRENT's ioctl function? Message-ID: <20010630172202.A7799@kiara.simbalink.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I was trying to run AOL Server 3.4 on FreeBSD 5.0-CURRENT. The server will run on a non-privilaged port, but will segfault on port 80 or any other privilaged port. This behavior does not occur on FreeBSD 4.3. The idea is that the server starts as root, binds to port 80, and then suid's to a normal user. I have already gone through the AOL Server source and also run this problem past users on the AOL Server mailing list. I have attempted to run AOL Server 3.4 on two different CURRENT boxes. One was last updated in March, and the other was updated just 3 days ago. Both had the same problem. Here is the gdb output when attempting to run on port 80: [25/Jun/2001:16:30:13][15486.135540736][-main-] Notice: binder: listen(205.216.111.20,80) = 15 [25/Jun/2001:16:30:13][15486.135540736][-main-] Notice: nssock: listening on 205.216.111.20 Program received signal SIGSEGV, Segmentation fault. 0x281820ff in ioctl () from /usr/lib/libc_r.so.5 (gdb) bt #0 0x281820ff in ioctl () from /usr/lib/libc_r.so.5 #1 0x80805df in Ns_SockSetNonBlocking (sock=15) at sock.c:385 #2 0x2824551a in SockStart (server=0x8145560 "server1", label=0x8145b10 "nssock", drvDataPtr=0x8171208) at sock.cpp:474 #3 0x806e326 in NsStartDrivers (server=0x8145560 "server1") at drv.c:225 #4 0x8077491 in Ns_Main (argc=8, argv=0xbfbffadc, initProc=0x807445c ) at nsmain.c:697 #5 0x8074448 in main (argc=8, argv=0xbfbffadc) at main.c:64 #6 0x805ae7f in _start () (gdb) It seems it binds to port 80 but than segfaults as soon as it switched to a non-root user. This problem does not occur on non-privilaged ports above 1024, nor does it occur on FreeBSD 4.3 on any ports. Anyone have any ideas on what might be causing this? Thanks, Mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message