version 1.54, 2011/10/21 16:03:11
|
version 1.56, 2011/10/25 18:37:11
|
Line 75 store where they wanted to go (first url
|
Line 75 store where they wanted to go (first url
|
|
|
=over |
=over |
|
|
=item constructaccess($url,$ownerdomain) |
=item constructaccess($url,$setpriv) |
|
|
See if the owner domain and name |
See if the owner domain and name |
in the URL match those in the expected environment. If so, return |
in the URL match those in the expected environment. If so, return |
two element list ($ownername,$ownerdomain). Else, return null string. |
two element list ($ownername,$ownerdomain). Else, return null string. |
|
If 'setpriv' is set to 'setpriv', it actually assigns the privileges. |
=back |
=back |
|
|
=cut |
=cut |
Line 103 sub constructaccess {
|
Line 103 sub constructaccess {
|
if ($url=~/\.(\d+)\.(\w+)$/) { return ''; } |
if ($url=~/\.(\d+)\.(\w+)$/) { return ''; } |
|
|
# Get username and domain from URL |
# Get username and domain from URL |
my ($ownerdomain,$ownername)=($url=~/^\/priv\/($match_domain)\/($match_username)\//); |
my ($ownerdomain,$ownername)=($url=~/^(?:\/home\/httpd\/html\/|\/)priv\/($match_domain)\/($match_username)\//); |
|
|
# The URL does not really point to any authorspace, forget it |
# The URL does not really point to any authorspace, forget it |
unless (($ownername) && ($ownerdomain)) { return ''; } |
unless (($ownername) && ($ownerdomain)) { return ''; } |