From owner-freebsd-questions Tue Mar 18 12:23:43 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B07A837B401 for ; Tue, 18 Mar 2003 12:23:41 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6370243F85 for ; Tue, 18 Mar 2003 12:23:40 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a151.otenet.gr [212.205.215.151]) by mailsrv.otenet.gr (8.12.8/8.12.8) with ESMTP id h2IKNF5u001692; Tue, 18 Mar 2003 22:23:31 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.8/8.12.8) with ESMTP id h2IKNCam003436; Tue, 18 Mar 2003 22:23:12 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.8/8.12.8/Submit) id h2IKNCew003435; Tue, 18 Mar 2003 22:23:12 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 18 Mar 2003 22:23:12 +0200 From: Giorgos Keramidas To: Fabio Miranda Hamburger Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Offtopic Message-ID: <20030318202312.GE1825@gothmog.gr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-RAVMilter-Version: 8.4.2(snapshot 20021217) (terpsi) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Redirected to -questions; -chat is not the list for general questions. On 2003-03-18 13:20, Fabio Miranda Hamburger wrote: > Hi, I have a couple of question: > > 1. A technique for an intruder to keep a root account was creating a > stuid root shell, that is not possible on FreeBSD nowadays, Why is > not possible? How a program like sudo can do that? Foe example, If > i am a sudo 'full admin' I can do this without passwd: > %sudo su > # sudo is already a setuid program. You can't create a setuid root program unless you are already root. > 2. I coded a program that read a wordlist and prints them: > char str1[64]; > ... > while(!(feof(FooPtr)){ > fscanf(FooPtr,"%s\n",str1); > .. > printf("%c",str1[x]); > ... > > If the "character" I going to printf is alpha or numeric, there is > NO problem, but if i am going to print an space, it core dumps... > Why this happens? How can I solve this? We'd have to see the full source to the program. There are a few points about the fragments that I can read so far that are probably worth mentioning, like "don't use fscanf with %s without a limit for %s"... but you should really post the full text of the smallest program that exhibits the problem before anyone could make meaningful comments about why the particular program breaks. - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message