37 |
|
|
38 |
# Some common file commands we may want to check to make sure they are |
# Some common file commands we may want to check to make sure they are |
39 |
# in the right directory. Any commands accessing files that could be |
# in the right directory. Any commands accessing files that could be |
40 |
# added to allowed_requests must be here. A few others have also been |
# added to allowed_requests must be here. |
|
# added---this is not a intended to be a complete list of course, just |
|
|
# some support for the depreciated --restrict option when the |
|
|
# security_level is "all" so you don't accidentally step out of the |
|
|
# directory. |
|
41 |
# |
# |
42 |
# The keys are files request, the value is the index of the argument |
# The keys are files request, the value is the index of the argument |
43 |
# taking a file. |
# taking a file. |
45 |
'os.chown':0, 'os.remove':0, 'os.removedirs':0, |
'os.chown':0, 'os.remove':0, 'os.removedirs':0, |
46 |
'os.rename':0, 'os.renames':0, 'os.rmdir':0, 'os.unlink':0, |
'os.rename':0, 'os.renames':0, 'os.rmdir':0, 'os.unlink':0, |
47 |
'os.utime':0, 'os.lchown':0, 'os.link':1, 'os.symlink':1, |
'os.utime':0, 'os.lchown':0, 'os.link':1, 'os.symlink':1, |
48 |
'os.mkdir':0, 'os.lchown':0} |
'os.mkdir':0} |
49 |
|
|
50 |
|
|
51 |
def initialize(action, cmdpairs): |
def initialize(action, cmdpairs): |