package Check::Linux2_6;

# cpanel - Linux2_4.pm                            Copyright(c) 2007 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

my ($system, $release) = ( POSIX::uname() )[0,2];

our $title = 'Linux 2.6 Kernel';
our $notice = "You are running an insecure kernel ($release). You should upgrade to a newer version as soon as possible to avoid your system being compromised.";
our $severity = 8;
our $group = 'security';

sub relevant {
    return if $system ne 'Linux';
    my $insecurekernel = 0;
    if ( $main::kernver =~ m/(\d+)\.(\d+)\.(\d+)/ ) {
        my $major   = $1;
        my $minor   = $2;
        my $rev     = $3;
        if ( $major eq '2' && $minor eq '6' && $rev <= 9 ) {
            $insecurekernel = 1;
        }
    }
    return $insecurekernel;
}