projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f6f522
)
Allow use of ~ allow dir path
author
Jamie Cameron
<jcameron@webmin.com>
Sat, 1 Oct 2011 23:42:46 +0000
(16:42 -0700)
committer
Jamie Cameron
<jcameron@webmin.com>
Sat, 1 Oct 2011 23:42:46 +0000
(16:42 -0700)
chooser.cgi
patch
|
blob
|
history
diff --git
a/chooser.cgi
b/chooser.cgi
index
675b193
..
1b4dbb5
100755
(executable)
--- a/
chooser.cgi
+++ b/
chooser.cgi
@@
-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