Private
Server IP : 195.201.23.43  /  Your IP : 3.147.68.89
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/webmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/webmin/update.cgi
#!/usr/bin/perl
# update.cgi
# Find and install modules that need updating

require './webmin-lib.pl';
&ReadParse();
&error_setup($text{'update_err'});

# Display the results and maybe take action
$| = 1;
$theme_no_table = 1;
&ui_print_header(undef, $text{'update_title'}, "");

print "<b>",&text('update_info'),"</b><p>\n";

# Fetch updates
@urls = $in{'source'} == 0 ? ( $update_url ) : split(/\r?\n/, $in{'other'});
$count = 0;
foreach $url (@urls) {
	# Get updates from this URL, and filter to those for this system
	$checksig = $in{'checksig'} ? 2 : $url eq $update_url ? 2 : 1;
	($updates, $host, $port, $page, $ssl) =
		&fetch_updates($url, $in{'upuser'}, $in{'uppass'}, $checksig);
	$updates = &filter_updates($updates, undef,
				   $in{'third'}, $in{'missing'});
	$count += scalar(@$updates);
	foreach $u (@$updates) {
		# Get module or theme's details
		my %minfo = &get_module_info($u->[0]);
		my %tinfo = &get_theme_info($u->[0]);
		my %info = %minfo ? %minfo : %tinfo;

		# Skip if we already have the version, perhaps from an earlier
		# update in this run
		my $nver = $u->[1];
		$nver =~ s/^(\d+\.\d+)\..*$/$1/;
		next if (%info && $info{'version'} &&
			&compare_version_numbers($info{'version'}, $nver) >= 0);

		if ($in{'show'}) {
			# Just tell the user what would be done
			print &text('update_mshow', "<b>$u->[0]</b>", "<b>$u->[1]</b>"),
			      "<br>\n";
			print "&nbsp;" x 10;
			print "$text{'update_fixes'} : " if ($info{'longdesc'});
			print $u->[4],"<p>\n";
			$donemodule{$u->[0]} = 1;
			}
		else {
			# Actually do the update ..
			my (@mdescs, @mdirs, @msizes);
			print &text('update_mok', "<b>$u->[0]</b>", "<b>$u->[1]</b>"),
			      "<br>\n";
			print "&nbsp;" x 10;
			print "$text{'update_fixes'} : " if ($info{'longdesc'});
			print $u->[4],"<br>\n";
			($mhost, $mport, $mpage, $mssl) =
				&parse_http_url($u->[2], $host, $port, $page, $ssl);
			($mfile = $mpage) =~ s/^(.*)\///;
			$mtemp = &transname($mfile);
			$progress_callback_url = $u->[2];
			$progress_callback_prefix = "&nbsp;" x 10;
			&retry_http_download($mhost, $mport, $mpage, $mtemp, undef,
				       \&progress_callback, $mssl,
				       $in{'upuser'}, $in{'uppass'});
			$irv = &check_update_signature($mhost, $mport, $mpage,
					$mssl, $in{'upuser'}, $in{'uppass'},
					$mtemp, $checksig);
			$irv ||= &install_webmin_module($mtemp, 1, 0,
					      [ $base_remote_user ]);
			print "&nbsp;" x 10;
			if (!ref($irv)) {
				print &text('update_failed', $irv),"<p>\n";
				}
			else {
				print &text('update_mdesc', "<b>$irv->[0]->[0]</b>",
					    "<b>$irv->[2]->[0]</b>"),"<p>\n";
				$donemodule{$irv->[0]->[0]} = 1;
				}
			}
		}
	}
print &text('update_none'),"<br>\n" if (!$count);

# Check if a new version of webmin itself is available
$version = &get_latest_webmin_version();
if ($version > &get_webmin_version()) {
	print "<b>",&text('update_version', $version),"</b><p>\n";
	}

&ui_print_footer("", $text{'index_return'});

Private