version 1.376, 2007/07/25 22:52:07
|
version 1.380, 2007/08/23 17:39:51
|
Line 135 my @adderrors = ("ok",
|
Line 135 my @adderrors = ("ok",
|
"lcuseradd Unable to make www member of users's group", |
"lcuseradd Unable to make www member of users's group", |
"lcuseradd Unable to su to root", |
"lcuseradd Unable to su to root", |
"lcuseradd Unable to set password", |
"lcuseradd Unable to set password", |
"lcuseradd Usrname has invalid characters", |
"lcuseradd Username has invalid characters", |
"lcuseradd Password has an invalid character", |
"lcuseradd Password has an invalid character", |
"lcuseradd User already exists", |
"lcuseradd User already exists", |
"lcuseradd Could not add user.", |
"lcuseradd Could not add user.", |
Line 2187 sub subscribe_handler {
|
Line 2187 sub subscribe_handler {
|
®ister_handler("sub", \&subscribe_handler, 0, 1, 0); |
®ister_handler("sub", \&subscribe_handler, 0, 1, 0); |
|
|
# |
# |
# Determine the version of a resource (?) Or is it return |
# Determine the latest version of a resource (it looks for the highest |
# the top version of the resource? Not yet clear from the |
# past version and then returns that +1) |
# code in currentversion. |
|
# |
# |
# Parameters: |
# Parameters: |
# $cmd - The command that got us here. |
# $cmd - The command that got us here. |
# $tail - Tail of the command (remaining parameters). |
# $tail - Tail of the command (remaining parameters). |
|
# (Should consist of an absolute path to a file) |
# $client - File descriptor connected to client. |
# $client - File descriptor connected to client. |
# Returns |
# Returns |
# 0 - Requested to exit, caller should shut down. |
# 0 - Requested to exit, caller should shut down. |
Line 4640 sub inst_usertypes_handler {
|
Line 4640 sub inst_usertypes_handler {
|
} |
} |
®ister_handler("inst_usertypes", \&inst_usertypes_handler, 0, 1, 0); |
®ister_handler("inst_usertypes", \&inst_usertypes_handler, 0, 1, 0); |
|
|
sub inst_dirsrch_handler { |
|
my ($cmd, $tail, $client) = @_; |
|
my ($domain,$srchby,$srchterm,$srchtype) = split(/:/, $tail); |
|
$srchby = &unescape($srchby); |
|
$srchterm = &unescape($srchterm); |
|
my $userinput = $cmd.":".$tail; # For logging purposes. |
|
my (%instusers,%instids,$result,$res); |
|
eval { |
|
local($SIG{__DIE__})='DEFAULT'; |
|
$result=&localenroll::get_userinfo($domain,undef,undef,\%instusers,\%instids,undef,$srchby,$srchterm,$srchtype); |
|
}; |
|
if ($result eq 'ok') { |
|
if (keys(%instusers) > 0) { |
|
foreach my $key (keys(%instusers)) { |
|
my $usrstr = &Apache::lonnet::hash2str(%{$instusers{$key}}); |
|
$res.=&escape($key).'='.&escape($usrstr).'&'; |
|
} |
|
} |
|
$res=~s/\&$//; |
|
} |
|
&Reply($client, "$res\n", $userinput); |
|
} |
|
®ister_handler("instdirsrch", \&inst_dirsrch_handler, 0, 1, 0); |
|
|
|
# mkpath makes all directories for a file, expects an absolute path with a |
# mkpath makes all directories for a file, expects an absolute path with a |
# file or a trailing / if just a dir is passed |
# file or a trailing / if just a dir is passed |
# returns 1 on success 0 on failure |
# returns 1 on success 0 on failure |
Line 5794 sub validate_user {
|
Line 5770 sub validate_user {
|
$password, |
$password, |
$credentials); |
$credentials); |
$validated = ($krbreturn == 1); |
$validated = ($krbreturn == 1); |
|
if (!$validated) { |
|
&logthis('krb5: '.$user.', '.$contentpwd.', '. |
|
&Authen::Krb5::error()); |
|
} |
} else { |
} else { |
$validated = 0; |
$validated = 0; |
} |
} |