Overview
| Artifact ID: | 2781718882706ca30c8e35fb302eed46087393e4 |
|---|---|
| Ticket: | 1224888fffffffffffffffffffffffffffffffff
possible to have an empty info nameofexecutable |
| User & Date: | dkf on 2015-01-07 23:30:29 |
Changes
- closer changed to: "nobody"
- comment changed to:
How to reproduce: 1) Make a local copy of tclsh called something *besides* tclsh or anything else that is in your path. Make sure that '.' is not in your path. 2) Compile this, using the right paths and name of the executable for your environment: #include <unistd.h> int main(int argc, char *argv[], char *envp[]) { char *myargv[] = {"mytclsh", NULL}; execve("/home/davidw/workshop/protect/mytclsh", myargv, envp); } 3) Run it, try 'info name' - it's empty. Here's why: 5454 execve("/home/davidw/workshop/protect/mytclsh", ["mytclsh"], [/* 29 vars * /]) = 0 argv0 has no / in it, and mytclsh is not in PATH, so we hit tclUnixFile.c line 123, and thus have no info nameofexecutable. I found this bug while trying to get starpacks working as CGI's under Apache. The execve program above is a recreation of how Apache launches CGI's. Thanks, Dave - login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Remind"
- severity changed to: "Minor"