mirror of
https://github.com/webmin/webmin.git
synced 2025-07-23 00:30:33 +00:00
Add support for Terminal to work in Usermin
This commit is contained in:
@ -19,7 +19,8 @@ use WebminCore;
|
||||
$env_support = $config{'vixie_cron'};
|
||||
if ($module_info{'usermin'}) {
|
||||
$single_user = $remote_user;
|
||||
&switch_to_remote_user();
|
||||
&switch_to_remote_user()
|
||||
if (!getvar('cron_no_switch_to_remote_user'));
|
||||
&create_user_config_dirs();
|
||||
$range_cmd = "$user_module_config_directory/range.pl";
|
||||
$hourly_only = 0;
|
||||
|
@ -23,7 +23,12 @@ foreach my $modname (@modnames) {
|
||||
&text('index_suse', "<tt>$modname</tt>",
|
||||
'https://software.opensuse.org/download/package?package=perl-IO-Tty&project=devel%3Alanguages%3Aperl');
|
||||
}
|
||||
print $missinglink ."<p>\n";
|
||||
if (&get_product_name() eq 'usermin') {
|
||||
print &text('index_missing', $modname) ."<p>\n";
|
||||
}
|
||||
else {
|
||||
print $missinglink ."<p>\n";
|
||||
}
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -179,6 +184,8 @@ my @uinfo = getpwnam($user);
|
||||
my $dir = $in{'dir'};
|
||||
|
||||
# Launch the shell server on the allocated port
|
||||
setvar('cron_no_switch_to_remote_user', 1)
|
||||
if (&get_product_name() eq 'usermin');
|
||||
&foreign_require("cron");
|
||||
my $shellserver_cmd = "$module_config_directory/shellserver.pl";
|
||||
if (!-r $shellserver_cmd) {
|
||||
|
@ -4,6 +4,7 @@ index_epel=It is recommended to have <a href='$1' target='_blank'>EPEL</a> repos
|
||||
index_suse=The Perl package <tt>perl-IO-Tty</tt> is missing, and should be manually installed first from <a href='$2' target='_blank'>devel:languages:perl</a> repository.
|
||||
index_euser=Error : User $1 cannot run the shell as it does not exist!
|
||||
index_connecting=Connecting ..
|
||||
index_missing=The Perl module <tt>$1</tt> is missing. You need to contact your administrator to resolve this issue.
|
||||
|
||||
acl_user=Run shell as Unix user
|
||||
acl_sameuser=Same as Webmin login
|
||||
|
Reference in New Issue
Block a user