|
|
Use an 'rmdir' function that's smart about .DS_Store files
Your script is not handling the tempfile securely. You need to do better checking to insure that the rm -f $TMPFILE is effective and/or use mktemp to generate a filename that is guaranteed to be unique. As written it's trivial to exploit the script to overwrite any file owned by the user running it.
Use an 'rmdir' function that's smart about .DS_Store files
Yes, I'm aware it's not "secure". However, for the vast, vast majority of Mac users, this will simply never be an issue because they are the only person using the computer.
Use an 'rmdir' function that's smart about .DS_Store files
Wasn't meant as a negative critique -- you wrote the script well. A one-line change to use mktemp rather than hard-coding the tmpfile path fixes the issue for MacOS users that frequent computer labs, have siblings, and are otherwise in shared environments. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|