This file is indexed.

/usr/bin/sirvecole.py is in controlaula 1.8.0-3.1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
#!/usr/bin/python
# -*- coding: utf-8 -*-
##############################################################################
# Project:     Controlaula/Sirvecole
# Module:     Sirvecole.py
# Purpose:     Starting module for this daemon
# Language:    Python 2.5
# Date:        15-Jan-2010.
# Ver.:        2-Feb-2010.
# Copyright:    2009-2010 - José L. Redrejo Rodríguez       <jredrejo @nospam@ debian.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# 
##############################################################################

try:
    import psyco
    psyco.full()
except ImportError:
    pass
import signal
import sys
import logging
import subprocess
import os
from ControlAula.Utils import NetworkUtils
from twisted.application import service

LOG_FILENAME= "/var/log/controlaula.log"
HOSTNAME=''

#Interval to check if the hosts are off or users have logout
REFRESH=5

def SigHandler(signum, frame):
    print 'Stopping Sirvecole'

    try:
        reactor.stop()
    except:
        pass
    sys.exit()                                                   
       
def prepareBroadcast():        
    NetworkUtils.cleanRoutes()
    ltspGW=NetworkUtils.ltspGW()
    if ltspGW!='0':
        NetworkUtils.addRoute('239.255.255.0', ltspGW)
    else:
        reactor.callLater(10, prepareBroadcast)
        
 
from twisted.internet import reactor



# Initialise the signal handler.
signal.signal(signal.SIGINT, SigHandler)  

HOSTNAME=NetworkUtils.getHostName()



logging.basicConfig(level=logging.DEBUG,
                format='%(asctime)s %(levelname)-8s %(message)s',
                datefmt='%a, %d %b %Y %H:%M:%S',
                filename=LOG_FILENAME)

######### Begin the application loop #######

from ControlAula import StudentLoop

#vlc cache for the nobody user:
if not os.path.isdir('/nonexistent'):
    try:
        os.makedirs('/nonexistent')
    except:
        pass
    try:
        os.chown('/nonexistent',65534, 0)
    except:
        pass

MyStudent=StudentLoop.Obey(REFRESH)
reactor.callWhenRunning(MyStudent.listen)
reactor.callWhenRunning(MyStudent.startScan)
reactor.callWhenRunning(prepareBroadcast)

application = service.Application('controlaula',uid=0,gid=0)
#reactor.run()