access_mode should be blacklist by default
This commit is contained in:
parent
6460b1c312
commit
f13a29f960
|
@ -1,7 +1,6 @@
|
||||||
# make.sh config
|
# make.sh config
|
||||||
PREFIX=${PREFIX:-/}
|
|
||||||
USR=${USR:-"${PREFIX}usr/local"}
|
|
||||||
|
|
||||||
BINDIR=${BINDIR:-"${DESTDIR}${USR}/bin"}
|
|
||||||
LOGDIR=${LOGDIR:-"/tmp/userrc"}
|
LOGDIR=${LOGDIR:-"/tmp/userrc"}
|
||||||
CONFIG=${CONFIG:-"/etc/userrc.conf"}
|
|
||||||
|
BINDIR=${BINDIR:-"${PREFIX}/bin"}
|
||||||
|
CONFDIR=${CONFDIR:-"${PREFIX}/etc"}
|
||||||
|
CONFIG=${CONFIG:-"${CONFDIR}/userrc.conf"}
|
||||||
|
|
9
make.sh
9
make.sh
|
@ -5,9 +5,12 @@ set -e
|
||||||
set_vars() {
|
set_vars() {
|
||||||
printf 'Setting vars...\n' >&2
|
printf 'Setting vars...\n' >&2
|
||||||
|
|
||||||
|
for i in "$@"; do
|
||||||
sed -r \
|
sed -r \
|
||||||
-e "s%@CONFIG@%${CONFIG}%" \
|
-e "s%@CONFIG@%${CONFIG}%" \
|
||||||
-e "s%@LOGDIR@%${LOGDIR}%"
|
-e "s%@LOGDIR@%${LOGDIR}%" \
|
||||||
|
< "$i".in > "$i"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
do_tell() {
|
do_tell() {
|
||||||
|
@ -20,9 +23,9 @@ target_userrc() {
|
||||||
target='userrc'
|
target='userrc'
|
||||||
|
|
||||||
printf '%s\n' "Building $target..."
|
printf '%s\n' "Building $target..."
|
||||||
set_vars < "$target".in > "$target"
|
|
||||||
|
set_vars "$target"
|
||||||
do_tell chmod 755 "$target"
|
do_tell chmod 755 "$target"
|
||||||
ls -l "$target"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
target_clean() {
|
target_clean() {
|
||||||
|
|
|
@ -47,7 +47,7 @@ get_allowed_users() {
|
||||||
|
|
||||||
msg "Running in $access_mode access mode."
|
msg "Running in $access_mode access mode."
|
||||||
|
|
||||||
case "${access_mode:-freeforall}" in
|
case "${access_mode:-blacklist}" in
|
||||||
explicit)
|
explicit)
|
||||||
while IFS=':' read -r username pass uid gid description homedir shell; do
|
while IFS=':' read -r username pass uid gid description homedir shell; do
|
||||||
if is_whitelisted "$username"; then
|
if is_whitelisted "$username"; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user