From owner-freebsd-hackers Wed Nov 15 19:26:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ebola.biohz.net (ebola.biohz.net [206.80.1.35]) by hub.freebsd.org (Postfix) with ESMTP id B9D5437B4C5 for ; Wed, 15 Nov 2000 19:26:26 -0800 (PST) Received: from flu (localhost [127.0.0.1]) by ebola.biohz.net (Postfix) with SMTP id 2805A3A3CB; Wed, 15 Nov 2000 19:26:26 -0800 (PST) Message-ID: <002a01c04f7d$00699680$0402010a@biohz.net> From: "Renaud Waldura" To: "Brian Somers" Cc: References: <200011160032.eAG0Ws526758@hak.lan.Awfulhak.org> Subject: Re: PPPoE w/ nat auto fragmentation hack? (use tcpmssd port) Date: Wed, 15 Nov 2000 19:26:25 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > ppp will run programs as the user id that invoked ppp rather than > using the effective user id (ie, it runs things as *you*, not *root*). Mmm-mmh. In my case, since ppp is started at boot time, the only user that ever invokes it is root, hence the tcpmssd thingy is run as root. As confirmed by the multiple "ps" I ran: euid == ruid == svguid == 0. > A good ``first step'' is to run > ! sh -c "/usr/local/bin/tcpmssd -p 12345 -i INTERFACE >/tmp/log 2>&1" > so that you can get to see any error messages - ppp redirects I/O to Yup, tried that, here's what I get: ******************** start *************** Wed Nov 15 13:30:12 PST 2000 id says: uid=0(root) gid=0(wheel) groups=0(wheel) HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin 01001 divert 1234 tcp from any to any out xmit tun0 setup The rule gets inserted, tcpmssd runs as root, and I feel like a dummy. Any other ideas? Thanks for the help Brian, --Renaud ----- Original Message ----- From: Brian Somers To: Renaud Waldura Cc: Brian Somers ; ; Sent: Wednesday, November 15, 2000 4:32 PM Subject: Re: PPPoE w/ nat auto fragmentation hack? (use tcpmssd port) > > Maybe I'm just being boneheaded, but... > > > > > ! sudo ipfw add 40000 divert 12345 all from any to any via INTERFACE > > > ! sudo /usr/local/bin/tcpmssd -p 12345 -i INTERFACE > > > > I was under the (tested & confirmed) impression that programs executed by > > ppp are run under uid 0. Eg. I don't use "sudo" but the ipfw rule is added > > anyway, and tcpmssd is run as root. > > > > But maybe a sudo environment brings something else? That could explain a lot > > right there. > > > > --Renaud > > ppp will run programs as the user id that invoked ppp rather than > using the effective user id (ie, it runs things as *you*, not *root*). > > AFAIK, sudo will not muck about with your environment.... > > A good ``first step'' is to run > > ! sh -c "/usr/local/bin/tcpmssd -p 12345 -i INTERFACE >/tmp/log 2>&1" > > so that you can get to see any error messages - ppp redirects I/O to > /dev/null by default. > > -- > Brian > > Don't _EVER_ lose your sense of humour ! > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message