lkml.org 
[lkml]   [1998]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: execve
From
Date
Koblinger Egmont <egmont@fazekas.hu> writes:

|> Hi there!
|>
|> 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.

--
Andreas Schwab "And now for something
schwab@issan.informatik.uni-dortmund.de completely different"
schwab@gnu.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.071 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site