File: scontext.cfg

package info (click to toggle)
assaultcube-data 1.0.4%2Brepack1-1
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze
  • size: 60,024 kB
  • ctags: 15,165
  • sloc: cpp: 34,920; ansic: 20,515; xml: 3,864; sh: 3,408; objc: 975; cs: 350; makefile: 146
file content (22 lines) | stat: -rw-r--r-- 908 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// define script security contexts to restrict commands to certain contexts
// do NOT modify

// supported contexts
alias context_core 0    // hardcoded scripts
alias context_cfg 1     // known scripts
alias context_prompt 2  // command prompt
alias context_mapcfg 3  // map configs, we don't trust them

// set allowed commands for the map config context
alias mapcfgidents [ alias loadnotexture loadsky mapmodelreset mapmodel texturereset texture fog fogcolour mapsoundreset mapsound watercolour shadowyaw ]
loop i (listlen $mapcfgidents) [
    scriptcontext $context_mapcfg (at $mapcfgidents $i)
]

// isolate the map config context
// this disables access from this context to identifiers located in other contexts
// also it removes all aliases created in this context once the running context changes
isolatecontext $context_mapcfg 

// secure this configuration for the rest of the game
sealcontexts