version 1.338, 2006/08/25 17:26:26
|
version 1.340, 2006/08/29 21:08:08
|
Line 888 sub EditFile {
|
Line 888 sub EditFile {
|
|
|
# Split the command into it's pieces: edit:filetype:script |
# Split the command into it's pieces: edit:filetype:script |
|
|
my ($request, $filetype, $script) = split(/:/, $request,3); # : in script |
my ($cmd, $filetype, $script) = split(/:/, $request,3); # : in script |
|
|
# Check the pre-coditions for success: |
# Check the pre-coditions for success: |
|
|
if($request != "edit") { # Something is amiss afoot alack. |
if($cmd != "edit") { # Something is amiss afoot alack. |
return "error:edit request detected, but request != 'edit'\n"; |
return "error:edit request detected, but request != 'edit'\n"; |
} |
} |
if( ($filetype ne "hosts") && |
if( ($filetype ne "hosts") && |
Line 1250 sub push_file_handler {
|
Line 1250 sub push_file_handler {
|
# |
# |
sub du_handler { |
sub du_handler { |
my ($cmd, $ududir, $client) = @_; |
my ($cmd, $ududir, $client) = @_; |
my ($ududir) = split(/:/,$ududir); # Make 'telnet' testing easier. |
($ududir) = split(/:/,$ududir); # Make 'telnet' testing easier. |
my $userinput = "$cmd:$ududir"; |
my $userinput = "$cmd:$ududir"; |
|
|
if ($ududir=~/\.\./ || $ududir!~m|^/home/httpd/|) { |
if ($ududir=~/\.\./ || $ududir!~m|^/home/httpd/|) { |
Line 2593 sub get_profile_entry_encrypted {
|
Line 2593 sub get_profile_entry_encrypted {
|
|
|
my $userinput = "$cmd:$tail"; |
my $userinput = "$cmd:$tail"; |
|
|
my ($cmd,$udom,$uname,$namespace,$what) = split(/:/,$userinput); |
my ($udom,$uname,$namespace,$what) = split(/:/,$tail); |
chomp($what); |
chomp($what); |
my $qresult = read_profile($udom, $uname, $namespace, $what); |
my $qresult = read_profile($udom, $uname, $namespace, $what); |
my ($first) = split(/:/, $qresult); |
my ($first) = split(/:/, $qresult); |
Line 3039 sub restore_handler {
|
Line 3039 sub restore_handler {
|
|
|
my $userinput = "$cmd:$tail"; # Only used for logging purposes. |
my $userinput = "$cmd:$tail"; # Only used for logging purposes. |
|
|
my ($cmd,$udom,$uname,$namespace,$rid) = split(/:/,$userinput); |
my ($udom,$uname,$namespace,$rid) = split(/:/,$tail); |
$namespace=~s/\//\_/g; |
$namespace=~s/\//\_/g; |
$namespace=~s/\W//g; |
$namespace=~s/\W//g; |
chomp($rid); |
chomp($rid); |
Line 3214 sub reply_query_handler {
|
Line 3214 sub reply_query_handler {
|
|
|
my $userinput = "$cmd:$tail"; |
my $userinput = "$cmd:$tail"; |
|
|
my ($cmd,$id,$reply)=split(/:/,$userinput); |
my ($id,$reply)=split(/:/,$tail); |
my $store; |
my $store; |
my $execdir=$perlvar{'lonDaemons'}; |
my $execdir=$perlvar{'lonDaemons'}; |
if ($store=IO::File->new(">$execdir/tmp/$id")) { |
if ($store=IO::File->new(">$execdir/tmp/$id")) { |
Line 4179 sub validate_course_section_handler {
|
Line 4179 sub validate_course_section_handler {
|
®ister_handler("autovalidatecourse", \&validate_course_section_handler, 0, 1, 0); |
®ister_handler("autovalidatecourse", \&validate_course_section_handler, 0, 1, 0); |
|
|
# |
# |
# Create a password for a new auto-enrollment user. |
# Validate course owner's access to enrollment data for specific class section. |
# I think/guess, this password allows access to the institutions |
# |
# AIS class list server/services. Stuart can correct this comment |
# |
# when he finds out how wrong I am. |
# Formal Parameters: |
|
# $cmd - The command request that got us dispatched. |
|
# $tail - The tail of the command. In this case this is a colon separated |
|
# set of words that will be split into: |
|
# $inst_class - Institutional code for the specific class section |
|
# $courseowner - The escaped username:domain of the course owner |
|
# $cdom - The domain of the course from the institution's |
|
# point of view. |
|
# $client - The socket open on the client. |
|
# Returns: |
|
# 1 - continue processing. |
|
# |
|
|
|
sub validate_class_access_handler { |
|
my ($cmd, $tail, $client) = @_; |
|
my $userinput = "$cmd:$tail"; |
|
my ($inst_class,$courseowner,$cdom) = split(/:/, $tail); |
|
$courseowner = &unescape($courseowner); |
|
my $outcome=&localenroll::check_section($inst_class,$courseowner,$cdom); |
|
&Reply($client,"$outcome\n", $userinput); |
|
|
|
return 1; |
|
} |
|
®ister_handler("autovalidateclass_sec", \&validate_class_access_handler, 0, 1, 0); |
|
|
|
# |
|
# Create a password for a new LON-CAPA user added by auto-enrollment. |
|
# Only used for case where authentication method for new user is localauth |
# |
# |
# Formal Parameters: |
# Formal Parameters: |
# $cmd - The command request that got us dispatched. |
# $cmd - The command request that got us dispatched. |
# $tail - The tail of the command. In this case this is a colon separated |
# $tail - The tail of the command. In this case this is a colon separated |
# set of words that will be split into: |
# set of words that will be split into: |
# $authparam - An authentication parameter (username??). |
# $authparam - An authentication parameter (localauth parameter). |
# $cdom - The domain of the course from the institution's |
# $cdom - The domain of the course from the institution's |
# point of view. |
# point of view. |
# $client - The socket open on the client. |
# $client - The socket open on the client. |