aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlacme4
1 files changed, 2 insertions, 2 deletions
diff --git a/lacme b/lacme
index d141b62..9f46b47 100755
--- a/lacme
+++ b/lacme
@@ -237,9 +237,9 @@ sub drop_privileges($$$) {
# sanitize environment
my $term = $ENV{TERM};
- my @ent = getpwuid($>) or die "getpwuid($>): $!";
+ my @ent = getpwuid($<) or die "getpwuid($<): $!";
%ENV = ( USER => $ent[0], LOGNAME => $ent[0], HOME => $ent[7], SHELL => $ent[8] );
- $ENV{PATH} = $> == 0 ? "/usr/sbin:/usr/bin:/sbin:/bin" : "/usr/bin:/bin";
+ $ENV{PATH} = $< == 0 ? "/usr/sbin:/usr/bin:/sbin:/bin" : "/usr/bin:/bin";
$ENV{TERM} = $term if defined $term; # preserve $TERM
chdir $dir or die "chdir($dir): $!";