Merge pull request 'master' (#1) from krizej/sudo-parental-control:master into master
Reviewed-on: jacekpoz/sudo-parental-control#1
This commit is contained in:
commit
b4ff5d1df7
6 changed files with 94 additions and 0 deletions
79
README.md
Normal file
79
README.md
Normal file
|
@ -0,0 +1,79 @@
|
|||
# sudo parental control
|
||||
## sudo parental control
|
||||
### sudo parental control
|
||||
#### sudo parental control
|
||||
##### sudo parental control
|
||||
###### sudo parental control
|
||||
##### sudo parental control
|
||||
#### sudo parental control
|
||||
### sudo parental control
|
||||
## sudo parental control
|
||||
# sudo parental control
|
||||
|
||||
# usage
|
||||
## usage
|
||||
### usage
|
||||
#### usage
|
||||
##### usage
|
||||
###### usage
|
||||
##### usage
|
||||
#### usage
|
||||
### usage
|
||||
## usage
|
||||
# usage
|
||||
|
||||
# server
|
||||
## server
|
||||
### server
|
||||
#### server
|
||||
##### server
|
||||
###### server
|
||||
##### server
|
||||
#### server
|
||||
### server
|
||||
## server
|
||||
# server
|
||||
|
||||
i don't know
|
||||
|
||||
# client
|
||||
## client
|
||||
### client
|
||||
#### client
|
||||
##### client
|
||||
###### client
|
||||
##### client
|
||||
#### client
|
||||
### client
|
||||
## client
|
||||
# client
|
||||
```
|
||||
sudo <command>
|
||||
```
|
||||
|
||||
# thanks
|
||||
## thanks
|
||||
### thanks
|
||||
#### thanks
|
||||
##### thanks
|
||||
###### thanks
|
||||
##### thanks
|
||||
#### thanks
|
||||
### thanks
|
||||
## thanks
|
||||
# thanks
|
||||
thanks
|
||||
|
||||
# special thanks
|
||||
## special thanks
|
||||
### special thanks
|
||||
#### special thanks
|
||||
##### special thanks
|
||||
###### special thanks
|
||||
##### special thanks
|
||||
#### special thanks
|
||||
### special thanks
|
||||
## special thanks
|
||||
# special thanks
|
||||
thanks
|
||||
|
15
client/sudo
Executable file
15
client/sudo
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
url="https://sudo-parental-control.jacekpoz.pl"
|
||||
|
||||
json=$(echo '{"username":"'$USER'","command":"'$@'"}')
|
||||
r=$(curl -s -X POST $url --data "$json")
|
||||
|
||||
if [ "$r" = "ok" ]; then
|
||||
echo "Parental control approves the request"
|
||||
sudo $@
|
||||
else
|
||||
echo "Parental control prohibits the usage of sudo"
|
||||
echo "Reason: $r"
|
||||
fi
|
||||
|
0
Cargo.lock → server/Cargo.lock
generated
0
Cargo.lock → server/Cargo.lock
generated
Loading…
Reference in a new issue