LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Password
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.

Notices


Reply
  Search this Thread
Old 09-25-2010, 03:30 AM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 128,362

Rep: Reputation: 118Reputation: 118
LXer: Writing Better Shell Scripts - Part 3


Published at LXer:

Your shell script has little to no chance of running securely if it trusts the environment that it runs in, and that environment has been compromised. You can help protect your script from unintended behavior by not trusting items like environment variables. Whenever possible, assume that input from the external environment has been designed to cause your script problems. The PATH variable is a common source of security holes in scripts. Two of the most common issues are the inclusion of the current directory (via the . character) in the path, and using a PATH variable that’s been manipulated by a cracker. The reason that you don’t want the current directory included in the path is that a malicious version of a command like ls could have been placed in your current directory.

Read More...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Writing Better Shell Scripts – Part 2 LXer Syndicated Linux News 0 07-26-2010 07:50 PM
LXer: Writing Better Shell Scripts – Part 1 LXer Syndicated Linux News 0 06-15-2010 02:20 PM
Difficulties writing shell scripts lostinsyntax Programming 8 05-02-2005 07:42 AM
Difficulties writing shell scripts lostinsyntax Linux - Newbie 2 05-01-2005 03:48 PM
Writing C++ Shell Scripts MasterKin8T Programming 5 09-29-2003 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 11:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration