projects
/
schsh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new git URL
[schsh.git]
/
schsh
diff --git
a/schsh
b/schsh
index 823eeaa70cfcf710311451f5ae610dfa0769d888..1a790bbb034cd64162fe2ed0786b589296297cd8 100755
(executable)
--- a/
schsh
+++ b/
schsh
@@
-1,4
+1,4
@@
-#!/usr/bin/python3
+#!/usr/bin/
env
python3
import logging, logging.handlers
import os, sys, shlex, pwd
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
import logging, logging.handlers
import os, sys, shlex, pwd
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
@@
-68,7
+68,7
@@
elif len(sys.argv) == 3 and sys.argv[1] == "-c":
# check if the command is allowed, and add path
run = shlex.split(sys.argv[2])
if commandAllowed(run, sys.argv[2]): # this may change run, but that's okay
# check if the command is allowed, and add path
run = shlex.split(sys.argv[2])
if commandAllowed(run, sys.argv[2]): # this may change run, but that's okay
- log("Running
'"+str(run)+"'"
)
+ log("Running
"+str(run)
)
else:
print("You are not allowed to run this command.")
logquit("Attempt to run invalid command '"+sys.argv[2]+"'")
else:
print("You are not allowed to run this command.")
logquit("Attempt to run invalid command '"+sys.argv[2]+"'")