version 1.178.2.10, 2004/03/22 09:16:26
|
version 1.178.2.12, 2004/03/22 10:02:24
|
Line 254 sub TieUserHash {
|
Line 254 sub TieUserHash {
|
# Tie the database. |
# Tie the database. |
|
|
my %hash; |
my %hash; |
if(tie(%hash, 'GDBM_FILE', "$proname/$namespace.db", |
if(tie(%hash, 'GDBM_File', "$proname/$namespace.db", |
$how, 0640)) { |
$how, 0640)) { |
return \%hash; |
return \%hash; |
} |
} |
Line 3900 sub subsqlreply {
|
Line 3900 sub subsqlreply {
|
|
|
sub propath { |
sub propath { |
my ($udom,$uname)=@_; |
my ($udom,$uname)=@_; |
|
Debug("Propath:$udom:$uname"); |
$udom=~s/\W//g; |
$udom=~s/\W//g; |
$uname=~s/\W//g; |
$uname=~s/\W//g; |
|
Debug("Propath2:$udom:$uname"); |
my $subdir=$uname.'__'; |
my $subdir=$uname.'__'; |
$subdir =~ s/(.)(.)(.).*/$1\/$2\/$3/; |
$subdir =~ s/(.)(.)(.).*/$1\/$2\/$3/; |
my $proname="$perlvar{'lonUsersDir'}/$udom/$subdir/$uname"; |
my $proname="$perlvar{'lonUsersDir'}/$udom/$subdir/$uname"; |
|
Debug("Propath returning $proname"); |
return $proname; |
return $proname; |
} |
} |
|
|
Line 4162 sub PasswordPath {
|
Line 4165 sub PasswordPath {
|
my $user = shift; |
my $user = shift; |
|
|
my $path = &propath($domain, $user); |
my $path = &propath($domain, $user); |
my $path .= "/passwd"; |
$path .= "/passwd"; |
|
|
return $path; |
return $path; |
} |
} |
Line 4181 sub PasswordFilename {
|
Line 4184 sub PasswordFilename {
|
my $domain = shift; |
my $domain = shift; |
my $user = shift; |
my $user = shift; |
|
|
my $path = PasswordPath($domain, $user); |
Debug ("PasswordFilename called: dom = $domain user = $user"); |
|
|
|
my $path = PasswordPath($domain, $user); |
|
Debug("PasswordFilename got path: $path"); |
if(-e $path) { |
if(-e $path) { |
return $path; |
return $path; |
} else { |
} else { |