![]() | |||||||||||||
Messages in this thread |
On Wed, 5 Jan 2000, Brian Gerst wrote: > "Richard B. Johnson" wrote: > > > > Many programs have counted on being able to overwrite command-line > > > > arguments so that other information shows in `ps`. Linux Version 2.3.35 > > > > now prevents that from working. Is this a new <security feature> or > > > > is it related to the kernel command-line bug already reported? > > > > > > Looks like a race condition to me... the child could be scheduled before > > > the parent and run before argv[0] is changed. Move the strcpy to before > > > the fork and that should fix it. > > > > Well even if it fixed it, it could not work in most applications. > > Here is a typical application (like inetd). > > My bad, I didn't investigate it very far before I responded. It seems > that in proc_pid_cmdline(), it only returns the number of characters > that were in the _original_ command line (including nulls between > args). Also keep in mind that the shell eats unquoted spaces. This may > have been a result of when /proc was revamped a while back. > > -- Well it seems that I guess there will have to be dummy command-lines for all tasks that create children (er, maybe even init) to get the previous behavior. Not impossible, but not_good(tm). Cheers, Dick Johnson Penguin : Linux version 2.3.35 on an i686 machine (400.59 BogoMips). - 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.tux.org/lkml/ | ||||||||||||
| Last update: 2005-03-22 13:55 [from the cache] ©2003-2008 | |||||||||||||