Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/dkillproc.tmpl

[% WRAPPER 'master_templates/master.tmpl'
    app_key = 'background_process_killer'
    theme   = "yui"
    extrastyle = '

form {
    margin: 0 20px;
}

.float_panel {
    float: left;
}

#processes_div {
    background-color: #eeeeee;
    padding: 8px;
    margin-right: 30px;
}

#trusted,
#processes_div {
    margin-top: 6px;
    border: 1px solid #aaaaaa;
    border-radius: 5px;
}

#blurb {
    max-width: 600px;
}
#footnote_text {
    max-width: 590px;
}

#cjt_pagenotice_container {
    margin-bottom: 0;
}
'
-%]
[% PROCESS '_ajaxapp_styles.tmpl' -%]
[% PROCESS '_ajaxapp_header.tmpl' -%]
<div id="blurb">
<p class="description">
        You can configure WHM to kill any of the following processes and send you an
        email when it finds one of them. Malicious users may run
        an IRC bouncer on their shell accounts even though this may be against
        your policy. WHM detects these processes correctly even if the bouncer is renamed
        (e.g. to something that appears non-malicious like “pine”, to give the impression that the user is just
        reading email).
</p>
<p class="description">
        Please check the names of any
        programs you do not want running on your server; we recommend that you check
        them all since letting users run IRC bots and servers
        usually leads to denial-of-service attacks.
</p>
</div>

<form id="the_form" method="post" action="javascript:void(0)" onsubmit="send_ajax_submit(); return false">

<br />
<div class="float_panel">
<b>Processes</b><br />
<div id="processes_div">
[% FOREACH pair = data.sym -%]
<label><input type="checkbox" value="[% pair.key FILTER html %]" name="processes_to_kill" [% IF pair.value; 'checked="checked" '; END %] /> [% pair.key FILTER html -%]</label><br />
[% END -%]
</div>
</div>
<div class="float_panel"><b>Trusted users</b> (optional)<span style="position:absolute"><small><sup>*</sup></small></span>&nbsp;&nbsp;<br />
<textarea id="trusted" name="trusted_users" rows="8" cols="12">[% data.trusted.join("\n") _ "\n" FILTER html %]</textarea>
</div>
<div style="clear:both"></div>
<br /><input id="save_button" type="submit" style="margin-left:0" class="btn-primary" value="Save">
<br /><br />
<br /><div style="float:left"><sup>*</sup></div><div style="float:left;margin-left:2px;" id="footnote_text">List users that you want the process killer to ignore, one per line, in the textbox.
Note that root, mysql, named, cpanel, and users with UIDs below 99 are already considered trusted and do not need to be added to this list.</div>
<div style="clear:both"></div>
</form>

[% PROCESS '_ajaxapp_footer.tmpl' -%]
<script>
function send_ajax_submit() {
    var data = CPANEL.dom.get_data_from_form( "the_form" );
    if ( /\S/.test(data.trusted_users) ) {
        data.trusted_users = data.trusted_users.trim().split(/\s*[\r\n,;]+\s*/);
    }
    else {
        delete data.trusted_users;
    }
    // Without this, the API interprets sending none of a parameter as not
    // changing it instead of removing all the items.
    data.force = 1;

    CPANEL.api( {
        progress_panel: {
            status_html: "[% locale.maketext('Saving …') %]",
            source_el:   "save_button"
        },
        application: "whm",
        func:        "configurebackgroundprocesskiller",
        data:        data
    } );
}
</script>

[% END #wrapper -%]
Back to Directory File Manager