403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.168
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/dns/dnscheckengine/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/dns/dnscheckengine/files/patch-apps-dnscheck-dispatcher.pl
*** apps/dnscheck-dispatcher.pl	Tue Jun 29 04:15:59 2010
--- apps/dnscheck-dispatcher.pl	Sun Jul  4 19:22:42 2010
***************
*** 43,49 ****
    %running
    %reaped
    %problem
!   $debug
    $verbose
    $check
    $limit
--- 43,49 ----
    %running
    %reaped
    %problem
!   $user
    $verbose
    $check
    $limit
***************
*** 54,59 ****
--- 54,60 ----
    $exit_timeout
    $savelevel
    %levels
+   $debug
  ];
  
  %running   = ();
***************
*** 75,81 ****
      ERROR    => 4,
      CRITICAL => 5,
  );
! 
  # Kick everything off
  main();
  
--- 76,83 ----
      ERROR    => 4,
      CRITICAL => 5,
  );
! # user to run as
! $user = 'nobody';
  # Kick everything off
  main();
  
***************
*** 124,130 ****
  sub setup {
      my $errfile = $check->config->get("daemon")->{errorlog};
      my $pidfile = $check->config->get("daemon")->{pidfile};
! 
      @saved_argv = @ARGV;    # We'll use this if we're asked to restart ourselves
      GetOptions('debug' => \$debug, 'verbose' => \$verbose);
      openlog($check->config->get("syslog")->{ident},
--- 126,135 ----
  sub setup {
      my $errfile = $check->config->get("daemon")->{errorlog};
      my $pidfile = $check->config->get("daemon")->{pidfile};
!     my $uid;
!     unless ($uid = (getpwnam($user))[2]) {
! 	die "Attempt to run dispatcher as non-existent user or as root\n";
!     }
      @saved_argv = @ARGV;    # We'll use this if we're asked to restart ourselves
      GetOptions('debug' => \$debug, 'verbose' => \$verbose);
      openlog($check->config->get("syslog")->{ident},
***************
*** 149,154 ****
--- 154,161 ----
      open PIDFILE, '>', $pidfile or die "Failed to open PID file: $!";
      print PIDFILE $$;
      close PIDFILE;
+ # become non-root
+     $>= $uid;
      $SIG{CHLD} = \&REAPER;
      $SIG{TERM} = sub { $running = 0 };
      $SIG{HUP}  = sub {

Youez - 2016 - github.com/yon3zu
LinuXploit