Skip to content

Commit

Permalink
Add check if user allowed to use terminal based on set shell
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Jul 23, 2023
1 parent 561cc69 commit b46217c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions xterm/webmin_menu_link.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Checks if Terminal link should be printed in Webmin menu

require "xterm-lib.pl";

sub allow_menu_link
{
my @uinfo = @remote_user_info;
@uinfo = getpwnam($remote_user) if (!@uinfo);
return 0 if (!$uinfo[8]);
return 0 if ($uinfo[8] =~ /(nologin|false|null|sync)$/);
return 1;
}

1;

0 comments on commit b46217c

Please sign in to comment.