Redirected to -questions; -chat is not the list for general questions.

On 2003-03-18 13:20, Fabio Miranda Hamburger <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to