Skip to content

Commit 8dc9c7c

Browse files
committed
Check if combination nologin rss + jail has been used or create an error
Users sometimes only use CLI might activate this ...
1 parent 6ce9c88 commit 8dc9c7c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/v-change-user-shell

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ is_format_valid 'user' 'shell shell_jail_enabled'
3232
is_object_valid 'user' 'USER' "$user"
3333
is_object_unsuspended 'user' 'USER' "$user"
3434

35+
if [[ "$shell" =~ nologin ]] || [[ "$shell" =~ rssh ]] && [[ "$shell_jail_enabled" =~ yes ]]; then
36+
check_result "$E_INVALID" "nologin and rssh can't be jailed"
37+
fi
38+
3539
# Perform verification if read-only mode is enabled
3640
check_hestia_demo_mode
3741

0 commit comments

Comments
 (0)