[LON-CAPA-cvs] cvs: loncom / lchtmldir

foxr foxr@source.lon-capa.org
Tue, 12 Oct 2010 09:53:45 -0000


foxr		Tue Oct 12 09:53:45 2010 EDT

  Modified files:              
    /loncom	lchtmldir 
  Log:
  Get this to run on FC13 - problem is that once one drops euid to actual uid
  you evidently can't 
  raise it again..so rather than dropping priv to check actual uid just
  ask for the actual uid directly without setting the euid to the actual uid.
  
  
Index: loncom/lchtmldir
diff -u loncom/lchtmldir:1.21 loncom/lchtmldir:1.22
--- loncom/lchtmldir:1.21	Fri May 30 13:37:48 2008
+++ loncom/lchtmldir	Tue Oct 12 09:53:45 2010
@@ -2,7 +2,7 @@
 
 # The Learning Online Network with CAPA
 #
-# $Id: lchtmldir,v 1.21 2008/05/30 13:37:48 raeburn Exp $
+# $Id: lchtmldir,v 1.22 2010/10/12 09:53:45 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -78,7 +78,7 @@
 $ENV{'PATH'} = '/bin:/usr/bin:/usr/local/sbin:/home/httpd/perl';
 delete @ENV{qw{IFS CDPATH ENV BASH_ENV}};
 
-my $DEBUG = 1;                         # .nonzero -> Debug printing enabled.
+my $DEBUG = 0;                         # .nonzero -> Debug printing enabled.
 my $path_sep = "/";		# Unix like operating systems.
 
 
@@ -88,8 +88,8 @@
     print("Checking uid...\n");
 }
 my $wwwid = getpwnam('www');
-&DisableRoot;
-if($wwwid != $>) {
+
+if($wwwid != $<) {
     if ($DEBUG) {
 	print("User ID incorrect.  This program must be run as user 'www'\n");
     }