version 1.162, 2001/10/06 20:57:45
|
version 1.167, 2001/10/30 19:19:09
|
Line 130
|
Line 130
|
# July Guy Albertelli |
# July Guy Albertelli |
# 8/4,8/7,8/8,8/9,8/11,8/16,8/17,8/18,8/20,8/23,9/20,9/21,9/26, |
# 8/4,8/7,8/8,8/9,8/11,8/16,8/17,8/18,8/20,8/23,9/20,9/21,9/26, |
# 10/2 Gerd Kortemeyer |
# 10/2 Gerd Kortemeyer |
# 10/5 Scott Harrison |
# 10/5,10/10 Scott Harrison |
|
|
package Apache::lonnet; |
package Apache::lonnet; |
|
|
Line 148 use Fcntl qw(:flock);
|
Line 148 use Fcntl qw(:flock);
|
|
|
# --------------------------------------------------------------------- Logging |
# --------------------------------------------------------------------- Logging |
|
|
|
sub logtouch { |
|
my $execdir=$perlvar{'lonDaemons'}; |
|
unless (-e "$execdir/logs/lonnet.log") { |
|
my $fh=Apache::File->new(">>$execdir/logs/lonnet.log"); |
|
close $fh; |
|
} |
|
my ($wwwuid,$wwwgid)=(getpwnam('www'))[2,3]; |
|
chown($wwwuid,$wwwgid,$execdir.'/logs/lonnet.log'); |
|
} |
|
|
sub logthis { |
sub logthis { |
my $message=shift; |
my $message=shift; |
my $execdir=$perlvar{'lonDaemons'}; |
my $execdir=$perlvar{'lonDaemons'}; |
Line 844 sub devalidate {
|
Line 854 sub devalidate {
|
} |
} |
} |
} |
|
|
|
# -------------------------------------------------------------------Temp Store |
|
|
|
sub tmpstore { |
|
my ($storehash,$symb,$namespace,$domain,$stuname) = @_; |
|
my $home=''; |
|
|
|
if ($stuname) { |
|
$home=&homeserver($stuname,$domain); |
|
|
|
} |
|
|
|
if (!$symb) { |
|
$symb=&symbread(); |
|
if (!$symb) { |
|
$symb= $ENV{'request.url'}; |
|
} |
|
} |
|
|
|
$symb=escape($symb); |
|
if (!$namespace) { unless ($namespace=$ENV{'request.course.id'}) { return ''; } } |
|
if (!$domain) { $domain=$ENV{'user.domain'}; } |
|
if (!$stuname) { $stuname=$ENV{'user.name'}; } |
|
if (!$home) { $home=$ENV{'user.home'}; } |
|
my $namevalue=''; |
|
map { |
|
$namevalue.=escape($_).'='.escape($$storehash{$_}).'&'; |
|
} keys %$storehash; |
|
$namevalue=~s/\&$//; |
|
|
|
} |
|
|
# ----------------------------------------------------------------------- Store |
# ----------------------------------------------------------------------- Store |
|
|
sub store { |
sub store { |
Line 1231 sub allowed {
|
Line 1272 sub allowed {
|
|
|
# If this is generating or modifying users, exit with special codes |
# If this is generating or modifying users, exit with special codes |
|
|
if (':csu:cdc:ccc:cin:cta:cep:ccr:cst:cad:cli:cau:cdg:'=~/\:$priv\:/) { |
if (':csu:cdc:ccc:cin:cta:cep:ccr:cst:cad:cli:cau:cdg:cca:'=~/\:$priv\:/) { |
return $thisallowed; |
return $thisallowed; |
} |
} |
# |
# |
Line 2423 unless ($readit) {
|
Line 2464 unless ($readit) {
|
%metacache=(); |
%metacache=(); |
|
|
$readit='done'; |
$readit='done'; |
|
&logtouch(); |
&logthis('<font color=yellow>INFO: Read configuration</font>'); |
&logthis('<font color=yellow>INFO: Read configuration</font>'); |
} |
} |
} |
} |