<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Running UNIX &#187; variables</title>
	<atom:link href="http://www.runningunix.com/tag/variables/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.runningunix.com</link>
	<description>UNIX/Solaris tips, tricks, and advice</description>
	<lastBuildDate>Mon, 01 Aug 2011 17:37:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>sudo loses environment variables</title>
		<link>http://www.runningunix.com/2008/06/sudo-loses-environment-variables/</link>
		<comments>http://www.runningunix.com/2008/06/sudo-loses-environment-variables/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 23:42:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HPUX]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://www.cybersand.com/blog/?p=10</guid>
		<description><![CDATA[Tricky. When a user uses sudo to &#8220;su&#8221; to another user, certain environment variables will not remain. From the man page: Variables that control how dynamic loading and binding is done can be used to subvert the program that sudo runs. To combat this the LD_*, _RLD_*, SHLIB_PATH (HP-UX only), and LIBPATH (AIX only) environment [...]]]></description>
			<content:encoded><![CDATA[<p>Tricky. When a user uses sudo to &#8220;su&#8221; to another user, <strong>certain </strong>environment variables will not remain.</p>
<p>From the man page:</p>
<blockquote><p><code>Variables that control how dynamic loading and binding is done can be used to subvert the program that sudo runs. To combat this the LD_*, _RLD_*, SHLIB_PATH (HP-UX only), and LIBPATH (AIX only) environment variables are removed from the environment passed on to all commands executed. sudo will also remove the IFS, ENV, BASH_ENV, KRB_CONF, KRBCONFDIR, KRBTKFILE, KRB5_CONFIG, LOCALDOMAIN, RES_OPTIONS, HOSTALIASES, NLSPATH, PATH_LOCALE, TERMINFO, TERMINFO_DIRS and TERMPATH variables as they too can pose a threat. If the TERMCAP variable is set and is a pathname, it too is ignored. Additionally, if the LC_* or LANGUAGE<br />
variables contain the / or % characters, they are ignored. If sudo has been compiled with SecurID support, the VAR_ACE, USR_ACE and DLC_ACE variables are cleared as well. The list of environment variables that sudo clears is contained in the output of sudo -V when run as root.</code></p></blockquote>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.runningunix.com%2F2008%2F06%2Fsudo-loses-environment-variables%2F&amp;title=sudo%20loses%20environment%20variables" id="wpa2a_2"><img src="http://www.runningunix.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.runningunix.com/2008/06/sudo-loses-environment-variables/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

