~ubuntu-branches/ubuntu/wily/bandit/wily-proposed

« back to all changes in this revision

Viewing changes to examples/os-chmod-py2.py

  • Committer: Package Import Robot
  • Author(s): Dave Walker (Daviey)
  • Date: 2015-07-22 09:01:39 UTC
  • Revision ID: package-import@ubuntu.com-20150722090139-fl0nluy0x8m9ctx4
Tags: upstream-0.12.0
ImportĀ upstreamĀ versionĀ 0.12.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import os
 
2
import stat
 
3
 
 
4
keyfile = 'foo'
 
5
 
 
6
os.chmod('/etc/passwd', 0777)
 
7
os.chmod('/etc/passwd', 0227)
 
8
os.chmod('/etc/passwd', 07)
 
9
os.chmod('/etc/passwd', 0664)
 
10
os.chmod('/etc/passwd', 0777)
 
11
os.chmod('/etc/passwd', 0o770)
 
12
os.chmod('/etc/passwd', 0o776)
 
13
os.chmod('/etc/passwd', 0o760)
 
14
os.chmod('~/.bashrc', 511)
 
15
os.chmod('/etc/hosts', 0o777)
 
16
os.chmod('/tmp/oh_hai', 0x1ff)
 
17
os.chmod('/etc/passwd', stat.S_IRWXU)
 
18
os.chmod(key_file, 0o777)