Unnamed
public text v1 · immutable#!/usr/bin/python
#test cases for catbox remode
import catbox.catbox as catbox
import os
def logger(text):
print text
def run_tests():
ret = catbox.run(lambda: os.chown('hello.txt', 0, 0), [os.getcwd()], logger)
print ret.ownerships
if ret.ownerships['hello.txt'] != (0,0):
print "Chown not trapped"
if os.stat('hello.txt').st_uid == 0:
print "Chown not trapped"
run_tests()