#!/usr/local/cpanel/3rdparty/bin/perl
# cpanel - scripts/check_mount_procfs Copyright 2022 cPanel, L.L.C.
# All rights reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
use strict;
use warnings;
use Cpanel::TempFile ();
use Cpanel::FileUtils::Write ();
use Cpanel::FileUtils::TouchFile ();
use Cpanel::Logger ();
my $logger = Cpanel::Logger->new();
exit 0 if -e '/var/cpanel/conf/jail/flags/mount_proc_jailed_fallback_none';
my $tf = Cpanel::TempFile->new();
my $dir = $tf->dir();
my $src = $dir . '/proc_test.c';
my $bin = '/root/.__proc_test_bin';
Cpanel::FileUtils::Write::overwrite_no_exceptions( $src, <<'EOF', 0600 );
#include