version 1.4, 2012/08/17 22:43:03
|
version 1.7, 2015/03/10 21:24:53
|
Line 194 if (!$domrolesref) {
|
Line 194 if (!$domrolesref) {
|
|
|
# Store in nohist_domainroles.db |
# Store in nohist_domainroles.db |
my $domkey=&LONCAPA::escape('dc:'.$username.':'.$domain.'::'.$domain.':'); |
my $domkey=&LONCAPA::escape('dc:'.$username.':'.$domain.'::'.$domain.':'); |
$domrolesref->{$domkey}= &LONCAPA::escape('$now:'.$start); |
$domrolesref->{$domkey}= &LONCAPA::escape($now.':'.$start); |
&LONCAPA::locking_hash_untie($domrolesref); |
&LONCAPA::locking_hash_untie($domrolesref); |
|
|
system('/bin/chown',"www:www","$dompath/nohist_domainroles.db"); # Must be writeable by httpd process. |
system('/bin/chown',"www:www","$dompath/nohist_domainroles.db"); # Must be writeable by httpd process. |
Line 205 my $domconfiguser = $domain.'-domainconf
|
Line 205 my $domconfiguser = $domain.'-domainconf
|
my $subdir = $domconfiguser; |
my $subdir = $domconfiguser; |
$subdir =~ s/(.)(.)(.).*/$1\/$2\/$3/; |
$subdir =~ s/(.)(.)(.).*/$1\/$2\/$3/; |
|
|
print "Looking to tie $dompath/$subdir/nohist_rolelog.db\n"; |
|
|
|
my $rolelogref = &LONCAPA::locking_hash_tie("$dompath/$subdir/$domconfiguser/nohist_rolelog.db",&GDBM_WRCREAT()); |
my $rolelogref = &LONCAPA::locking_hash_tie("$dompath/$subdir/$domconfiguser/nohist_rolelog.db",&GDBM_WRCREAT()); |
|
|
if (ref($rolelogref) eq 'HASH') { |
if (!$rolelogref) { |
foreach my $key (keys(%{$rolelogref})) { |
print(&mt('unable to tie [_1]',"nohist_rolelog db: $dompath/$subdir/$domconfiguser/nohist_rolelog.db")."\n"); |
print "found $key\n"; |
exit; |
} |
|
} |
} |
|
|
my $domlogkey = &LONCAPA::escape($now.'00000'.$$.'000000'); |
my $domlogkey = &LONCAPA::escape($now.'00000'.$$.'000000'); |
Line 235 my $domlogvalue = {
|
Line 232 my $domlogvalue = {
|
$rolelogref->{$domlogkey}=&freeze_escape($domlogvalue); |
$rolelogref->{$domlogkey}=&freeze_escape($domlogvalue); |
&LONCAPA::locking_hash_untie($rolelogref); |
&LONCAPA::locking_hash_untie($rolelogref); |
|
|
system('/bin/chown',"www:www","$dompath/$subdir/nohist_rolelog.db"); # Must be writeable by httpd process. |
system('/bin/chown',"www:www","$dompath/$subdir/$domconfiguser/nohist_rolelog.db"); # Must be writeable by httpd process. |
system('/bin/chown',"www:www","$dompath/$subdir/nohist_rolelog.db.lock"); |
system('/bin/chown',"www:www","$dompath/$subdir/$domconfiguser/nohist_rolelog.db.lock"); |
|
|
|
|
# Output success message. |
# Output success message. |
print(&mt('User: [_1], domain coordinator role expired in domain: [_2].',$user,$role_domain)."\n"); |
print(&mt('User: [_1], domain coordinator role expired in domain: [_2].',$user,$role_domain)."\n"); |