Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Feb 2003 20:04:38 -0600
From:      "pura life CR" <puralifecr@hotmail.com>
To:        freebsd-chat@freebsd.org
Subject:   2 Misc questions
Message-ID:  <F36UzmRf6Ci6nx8dyDd0001948d@hotmail.com>

next in thread | raw e-mail | index | archive | help







Hi, I have a couple of question that dont allow me to sleep properly.
here we go:
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) )
....
}

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....






_________________________________________________________________



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F36UzmRf6Ci6nx8dyDd0001948d>