mirror of
https://github.com/webmin/webmin.git
synced 2025-07-23 00:30:33 +00:00
Allow use of ~ allow dir path
This commit is contained in:
@ -24,12 +24,13 @@ if (&get_product_name() eq 'usermin') {
|
||||
%access = &get_module_acl();
|
||||
|
||||
# Work out root directory
|
||||
local @uinfo = getpwnam($remote_user);
|
||||
if (!$access{'root'}) {
|
||||
local @uinfo = getpwnam($remote_user);
|
||||
$rootdir = $uinfo[7] ? $uinfo[7] : "/";
|
||||
}
|
||||
else {
|
||||
$rootdir = $access{'root'};
|
||||
$rootdir =~ s/^\~/$uinfo[7]/;
|
||||
}
|
||||
|
||||
# Switch to correct Unix user
|
||||
|
Reference in New Issue
Block a user