package Cpanel::Easy::Apache::SymlinkProtection;

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

# Patch a race condition related to symbolic links in Apache.
# Patch source: http://mail-archives.apache.org/mod_mbox/httpd-dev/201210.mbox/%3C5090AD37.1070303@bluehost.com%3E
# FogBugz 63676

use strict;
use warnings;

our $easyconfig = {
    'name'      => 'Symlink Race Condition Protection',
    'verify_on' => 'This option may adversely affect performance.',
    'step'      => {
        '0' => {
            'name'    => 'to patch list',
            'command' => sub {
                my ($self) = @_;
                return $self->apply_patch( '../cppatch/symlink-protection.patch', $self->{'_'}{'apache_src_path'} );
            },
        },
    },
};

1;
