From owner-freebsd-chat Fri Feb 14 18:42:48 2003 Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35CD337B401 for ; Fri, 14 Feb 2003 18:42:47 -0800 (PST) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E68043F85 for ; Fri, 14 Feb 2003 18:42:46 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0018.cvx21-bradley.dialup.earthlink.net ([209.179.192.18] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 18jsHt-0003YP-00; Fri, 14 Feb 2003 18:42:46 -0800 Message-ID: <3E4DA8CD.48E77D9F@mindspring.com> Date: Fri, 14 Feb 2003 18:41:17 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: pura life CR Cc: freebsd-chat@freebsd.org Subject: Re: 2 Misc questions References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4e8c826bda829e33cbf9cbc5f063886462601a10902912494350badd9bab72f9c350badd9bab72f9c Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org pura life CR wrote: > 1. is this suid root code exploitable with a buffer overflow technique: > /* foo.c */ > main(int argc, char *argv[]){ > ... > setuid(0) > ... > if ( ((strcmp(argv[i],"foo")) == 0) > || ((strcmp(argv[i],"bar")) == 0) ) > .... > } I depends on what's in the second "..." or "....". 8-) 8-). The strcmp's along are not explotable, since both compares stop at the 4th byte in. > 2. how can I redirect stderr to /dev/null? for example when I am 'finding' a > file in the whole dir tree I dont want to look at the "permised denied" > warning. > ej: find / -name "foo" -print > /dev/null & <--- how to redict stderr > > that's all for now.... Depends on the shell. For /bin/sh, for example, it's: find / -name "foo" -print > /dev/null 2>&1 & See the man page for the shell you are using for information specific to that shell. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message