Esempio n. 1
0
def task_2_1_6(fixbug=False):
    grep = os.popen('grep -R "^shell" /etc/xinetd.*').read()
    grep2 = os.popen('grep -R "^login" /etc/xinetd.*').read()
    grep3 = os.popen('grep -R "^exec" /etc/xinetd.*').read()

    if (grep == '' and grep2 == '' and grep3 == ''
            and helper.checkDisableServiceInFolder('/etc/xinetd.d', 'rsh')
            and helper.checkDisableServiceInFolder('/etc/xinetd.d', 'rlogin')
            and helper.checkDisableServiceInFolder('/etc/xinetd.d', 'rexec')):
        return True
    if (fixbug == True): fix_2_1_6()
    return False
Esempio n. 2
0
def task_2_1_5(fixbug=False):
    grep = os.popen('grep -R "^time" /etc/xinetd.*').read()

    if (grep == ''
            and helper.checkDisableServiceInFolder('/etc/xinetd.d', 'time')):
        return True
    if (fixbug == True): fix_2_1_5()
    return False