Re: execve

Tom Vier (
Mon, 27 Jul 1998 17:11:36 -0400 (EDT)

On 27 Jul 1998, Andreas Schwab wrote:

> Koblinger Egmont <> writes:
> |> The execve() call allows to execute a process with no arguments at all,
> |> so argc==0, argv[0]==NULL. Most of the programs, even setuid ones such as
> |> sendmail, suidperl etc. behave very strange way if they are called with no
> |> arguments since their programmer except that argc>=1. Usually they exit
> |> with segmentation fault.
> |>
> |> Does anyone need this feature (or bug) ? I think disabling this would
> |> increase security.
> This was usefull once upon the time (in the a.out days, argc==0 told the
> dynamic linker to do the ldd things). Apart from that neither ANSI C nor
> POSIX forbid argc == 0, thus it's a bug in the applications (they
> shouldn't be dereferencing argv[0] if it's NULL). So it's not a kernel
> problem.

many programs depend on argv[0] to see what they were called as.

Tom Vier - 0x82B007A8    | Hate Micro$hit, AOLame, and Untel?       | Then goto the Zero Page at:
Tortured Souls Software  |

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at