Fix ACL restriction in chroot mode
authorJamie Cameron <jcameron@webmin.com>
Thu, 4 Nov 2010 04:26:23 +0000 (21:26 -0700)
committerJamie Cameron <jcameron@webmin.com>
Thu, 4 Nov 2010 04:26:23 +0000 (21:26 -0700)
https://sourceforge.net/tracker/?func=detail&atid=117457&aid=3100477&group_id=17457

file/show.cgi

index 5b08fd3..3e4bda8 100755 (executable)
@@ -41,11 +41,11 @@ else {
 # Dump the file
 &switch_acl_uid();
 $temp = &transname();
-$p = &unmake_chroot($p);
 if (!&can_access($p)) {
        # ACL rules prevent access to file
        &error_exit(&text('view_eaccess', &html_escape($p)));
        }
+$p = &unmake_chroot($p);
 
 if ($in{'format'}) {
        # An archive of a directory was requested .. create it