Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env python3
#
# Wrapper around 'chgrp' that redirects to root in all cases
import os
import shutil
import sys
# calculate path to the real 'chgrp'
path = os.environ['PATH']
path = path.replace(os.path.dirname(sys.argv[0]), '')
real_chgrp = shutil.which('chgrp', path=path)
args = list()
found = False
for i in sys.argv:
if i.startswith("-"):
args.append(i)
continue
if not found:
args.append("root")
found = True
else:
args.append(i)
os.execv(real_chgrp, args)
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env python3
#
# Wrapper around 'chown' that redirects to root in all cases
import os
import shutil
import sys
# calculate path to the real 'chown'
path = os.environ['PATH']
path = path.replace(os.path.dirname(sys.argv[0]), '')
real_chown = shutil.which('chown', path=path)
args = list()
found = False
for i in sys.argv:
if i.startswith("-"):
args.append(i)
continue
if not found:
args.append("root:root")
found = True
else:
args.append(i)
os.execv(real_chown, args)