[LON-CAPA-cvs] cvs: doc /loncapafiles systemd_config_check.piml loncom/auth lonauth.pm

raeburn raeburn at source.lon-capa.org
Sun Sep 13 19:25:04 EDT 2026


raeburn		Sun Sep 13 23:25:04 2026 EDT

  Modified files:              
    /loncom/auth	lonauth.pm 
    /doc/loncapafiles	systemd_config_check.piml 
  Log:
  - "Accessibility Checking Available" configuration item is lonAxeUse. 
  
  
-------------- next part --------------
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.121.2.24.2.5 loncom/auth/lonauth.pm:1.121.2.24.2.6
--- loncom/auth/lonauth.pm:1.121.2.24.2.5	Tue Aug 30 12:10:43 2022
+++ loncom/auth/lonauth.pm	Mon Jan 23 00:38:50 2023
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # User Authentication Module
 #
-# $Id: lonauth.pm,v 1.121.2.24.2.5 2022/08/30 12:10:43 raeburn Exp $
+# $Id: lonauth.pm,v 1.121.2.24.2.6 2023/01/23 00:38:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -116,6 +116,10 @@
                 $destination .= 'selectrole=1&'.$newrole.'=1';
             }
         }
+    } elsif (defined($form->{display})) {
+        if ($destination =~ m{^/adm/email($|\?)}) {
+            $destination  .= ($destination =~ /\?/) ? '&' : '?' .'display='.&escape($form->{display});
+        }
     }
     if (defined($form->{symb})) {
         my $destsymb = $form->{symb};
@@ -759,6 +763,11 @@
             }
             if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
                 &set_deeplink_login(%form);
+            } elsif ($firsturl eq '/adm/email') {
+                if ($form{'display'} && ($form{'mailrecip'} eq "$form{'uname'}:$form{'udom'}")) {
+                    $env{'request.display'} = $form{'display'};
+                    $env{'request.mailrecip'} = $form{'mailrecip'};
+                }
             }
             $r->internal_redirect($switchto);
         } else {
@@ -795,6 +804,11 @@
                 }
                 if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
                     &set_deeplink_login(%form);
+                } elsif ($firsturl eq '/adm/email') {
+                    if ($form{'display'} && ($form{'mailrecip'} eq "$form{'uname'}:$form{'udom'}")) {
+                        $env{'request.display'} = $form{'display'};
+                        $env{'request.mailrecip'} = $form{'mailrecip'};
+                    }
                 }
                 $r->internal_redirect($switchto);
             } else {
@@ -834,6 +848,11 @@
                 }
                 if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
                     &set_deeplink_login(%form);
+                } elsif ($firsturl eq '/adm/email') {
+                    if ($form{'display'} && ($form{'mailrecip'} eq "$form{'uname'}:$form{'udom'}")) {
+                        $env{'request.display'} = $form{'display'};
+                        $env{'request.mailrecip'} = $form{'mailrecip'};
+                    }
                 }
                 $r->internal_redirect('/adm/switchserver?otherserver='.$unloaded.'&origurl='.$firsturl);
                 return OK;
@@ -853,6 +872,14 @@
                         $form{$item} = $sessiondata{$item};
                     }
                 }
+                if ($sessiondata{'origurl'} eq '/adm/email') {
+                    if (($sessiondata{'display'}) && ($sessiondata{'mailrecip'})) {
+                        if (&unescape($sessiondata{'mailrecip'}) eq "$form{'uname'}:$form{'udom'}") {
+                            $form{'display'} = &unescape($sessiondata{'display'});
+                            $form{'mailrecip'} = &unescape($sessiondata{'mailrecip'});
+                        }
+                    }
+                }
             }
         }
         if ($form{'linkprot'}) {
@@ -1051,6 +1078,11 @@
                      $form);
             if ($form->{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
                 $env{'request.deeplink.login'} = $form->{'firsturl'};
+            } elsif ($form->{'firsturl'} eq '/adm/email') {
+                if ($form->{'display'} && ($form->{'mailrecip'} eq $form->{'uname'}.':'.$form->{'udom'})) {
+                    $env{'request.display'} = $form->{'mailrecip'};
+                    $env{'request.mailrecip'} = $form->{'mailrecip'};
+                }
             }
             if ($form->{'linkprot'}) {
                 $env{'request.linkprot'} = $form->{'linkprot'};
Index: doc/loncapafiles/systemd_config_check.piml
diff -u doc/loncapafiles/systemd_config_check.piml:1.4 doc/loncapafiles/systemd_config_check.piml:1.5
--- doc/loncapafiles/systemd_config_check.piml:1.4	Thu Aug 20 20:58:11 2026
+++ doc/loncapafiles/systemd_config_check.piml	Sun Sep 13 23:25:04 2026
@@ -2,7 +2,7 @@
         "http://lpml.sourceforge.net/DTD/piml.dtd">
 <!-- systemd_config_check.piml -->
 
-<!-- $Id: systemd_config_check.piml,v 1.4 2026/08/20 20:58:11 raeburn Exp $ -->
+<!-- $Id: systemd_config_check.piml,v 1.5 2026/09/13 23:25:04 raeburn Exp $ -->
 
 <!--
 
@@ -80,15 +80,15 @@
         $confdir = '/etc/apache2/';
     }
     my $filename='loncapa.conf';
-    my $lonAxeUser;
+    my $lonAxeUse;
     if (-e "$confdir$filename") {
         if (open(my $fh,'<',$confdir.$filename)) {
             while (my $configline=<$fh>) {
-                next unless ($configline =~ /lonAxeUser/);
+                next unless ($configline =~ /lonAxeUse/);
                 if ($configline =~ /^[^\#]*PerlSetVar/) {
                     my ($unused,$varname,$varvalue)=split(/\s+/,$configline);
                     chomp($varvalue);
-                    $lonAxeUser=$varvalue if $varvalue!~/^\{\[\[\[\[/;
+                    $lonAxeUse=$varvalue if $varvalue!~/^\{\[\[\[\[/;
                 }
             }
             close($fh);
@@ -110,7 +110,7 @@
             }
         }
         close(PIPE);
-        if (($protecthome || $suidsgid) || (($lonAxeUser) && (($restrictnames || $memorydeny)))) { 
+        if (($protecthome || $suidsgid) || (($lonAxeUse) && (($restrictnames || $memorydeny)))) { 
             if (!-d '/etc/systemd/system/'.$service.'.d') {
                 mkdir '/etc/systemd/system/'.$service.'.d', 0755;
             }
@@ -155,7 +155,7 @@
                                 }
                                 $is_no{$key} = $linenum;
                             } elsif (($entry =~ /^(RestrictNamespaces|MemoryDenyWriteExecute)\s*=\s*(\w+)\s*$/) &&
-                                      ($lonAxeUser)) {
+                                      ($lonAxeUse)) {
                                 my ($key,$value) = ($1,$2);
                                 next if ($is_no{$key});
                                 if (lc($value) eq 'no') {
@@ -197,7 +197,7 @@
                                 $needs_update = 1;
                             }
                         }
-                        if ($lonAxeUser) {
+                        if ($lonAxeUse) {
                             foreach my $item ('RestrictNamespaces','MemoryDenyWriteExecute') {
                                 unless (exists($is_no{$item})) {
                                     push(@{$lines{'Service'}},$item.'=no');
@@ -224,7 +224,7 @@
                                                             print $fh "$item\n";
                                                         }
                                                     } elsif (($item =~ /^(RestrictNamespaces|MemoryDenyWriteExecute)\s*=\s*no\s*$/i) &&
-                                                             ($lonAxeUser)) {
+                                                             ($lonAxeUse)) {
                                                         my $key = $1;
                                                         unless (grep/^$key\s*=\s*no\s*$/i,@{$lines{$category}}) {
                                                             print $fh "$item\n";
@@ -255,7 +255,7 @@
                                     print '**** ERROR: Could not open /etc/systemd/system/'.$service.'.d/override.conf to write RestrictSUIDSGID=no.'."\n".
                                           'Creation of sub-directories in Authoring Space will not be possible from the web interface.'."\n";  
                                 }
-                                if (($lonAxeUser) && ($restrictnames || $memorydeny)) {
+                                if (($lonAxeUse) && ($restrictnames || $memorydeny)) {
                                     if (($restrictnames) && ($memorydeny)) {
                                         print '**** ERROR: Could not open /etc/systemd/system/'.$service.'.d/override.conf to write RestrictNamespaces=no and MemoryDenyWriteExecute="no.'."\n";
                                     } elsif ($restrictnames) {
@@ -271,7 +271,7 @@
                 } else {
                     if (open(my $fh,'>','/etc/systemd/system/'.$service.'.d/override.conf')) {
                         print $fh '[Service]'."\n".'ProtectHome=no'."\n".'RestrictSUIDSGID=no'."\n";
-                        if ($lonAxeUser) {
+                        if ($lonAxeUse) {
                             print $fh ('RestrictNamespaces=no','MemoryDenyWriteExecute=no')
                         }
                         close($fh);
@@ -286,7 +286,7 @@
                             print '**** ERROR: Could not open /etc/systemd/system/'.$service.'.d/override.conf to write RestrictSUIDSGID=no.'."\n".
                                   'Creation of sub-directories in Authoring Space will not be possible from the web interface.'."\n";
                         }
-                        if (($lonAxeUser) && ($restrictnames || $memorydeny)) {
+                        if (($lonAxeUse) && ($restrictnames || $memorydeny)) {
                             if (($restrictnames) && ($memorydeny)) {
                                 print '**** ERROR: Could not open /etc/systemd/system/'.$service.'.d/override.conf to write RestrictNamespaces=no and MemoryDenyWriteExecute="no.'."\n";
                             } elsif ($restrictnames) {
@@ -306,7 +306,7 @@
                 if ($suidsgid) {
                     print 'Creation of sub-directories in Authoring Space will not be possible from the web interface.'."\n";
                 }
-                if (($lonAxeUser) && ($restrictnames || $memorydeny)) {
+                if (($lonAxeUse) && ($restrictnames || $memorydeny)) {
                     print 'Accessibility Checker will be not usable.'."\n";
                 }
             }
@@ -314,7 +314,7 @@
     } else {
         print '**** WARNING *** Could not determine status of ProtectHome property for systemd '.$service.".\n".
               'It was not possible to determine whether LON-CAPA web interface will be usable.'."\n";
-        if ($lonAxeUser) {
+        if ($lonAxeUse) {
             print '**** WARNING *** Could not determine status of RestrictNamespaces property for systemd '.$service.".\n".
                   'It was not possible to determine whether Accessibility Checker will be usable.'."\n";
         }


More information about the LON-CAPA-cvs mailing list