home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: henry@zoo.toronto.edu (Henry Spencer)
-
- In article <10n3bdINNkee@ftp.UU.NET> djm@eng.umd.edu (David J. MacKenzie) writes:
- >> This system, as indicated in the man pages clearly states that
- >> getcwd simply makes a system("pwd") to get the result.
- >Sun merely picked it up from SVR3, which does the same thing.
- >Actually, I bet it uses popen, but regardless, it does spawn a shell.
- >What an obscene implementation! ...
-
- The alternative is an implementation that fails in certain situations,
- such as a setuid program running in a protected directory. (It may not
- be able to read the directory, even if you can.) The one advantage of
- a system("pwd") implementation is that you can make /bin/pwd setuid-root
- to avoid this problem. Whether it's worth it is debatable.
- --
- There is nothing wrong with making | Henry Spencer @ U of Toronto Zoology
- mistakes, but... make *new* ones. -D.Sim| henry@zoo.toronto.edu utzoo!henry
-
-
- Volume-Number: Volume 28, Number 13
-
-