[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: '.' in path, summary
BGanesh forced the electrons to say:
> Hi,
>
> This time BGanesh gently blackmailed the electrons into saying :
>
> > See above. If you are sure none of your users will be using
> > gzexe, you may do that. But, such a program is discouraged.
>
> Any particular reasons why such a program be A Bad Thing ?
The same reasons - I don't know which programs legitimately use
/tmp to create temporary executables. I myself have had the need
for doing so (when I am trying to update a file, I find it easy
to create executable sed script files in /tmp with dynamic infor-
mation in them. Not the best of all methods, but it works). Also,
what about the subdirectories of /tmp? Configure scripts generat-
ed via GNU Autoconf checks for various features of your compiler
implementation by generating test C code, compiling and at times,
executing them.
The point is, there is no reason for one to keep a check on /tmp
for executables. When I was in IITB, there was a time when I had
only 1MB of disk space on our Digital server. I couldn't manage
all my number crunching code in that limited space. So I had
makefiles that created a.outs in /tmp/binand. I wouldn't have
liked it if a paranoic sysadm removed my files from /tmp the mo-
ment they were created.
So, I suggest it is better to remove '.' from your PATH rather
than going through all the work of writing a daemon to keep an
eye on /tmp. You will have to keep that program running at other
places as well, like /var/tmp or /home/anyuser; why bother? And
you will not lose many friends too!
Binand
- --
main(int c,char **v){while(!fork()){strcpy(v[0],tmpnam(0));sleep(1);}}
A program that changes its name and pid every second.
Try this program at your own risk! ---> Binand <---
- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
------------------------------