summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c12640)
raw | patch | inline | side by side (parent: 7c12640)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Jun 2008 09:36:21 +0000 (09:36 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Jun 2008 09:36:21 +0000 (09:36 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11204 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/client/events/krb5.pm | patch | blob | history |
index 0a262f5cc0cce7bd6a2077370a0680a84d147044..474e1ed338ad81798deed472013b0547380bfdd0 100644 (file)
my $source = @{$msg_hash->{'source'}}[0];
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
+ my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
# build return message with twisted target and source
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
} else {
if ( $kadm5->get_principal($principal)){
&add_content2xml_hash($out_hash, "error", "Principal exists");
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
return &create_xml_string($out_hash);
}
}
}
- my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
if (defined $forward_to_gosa) {
&add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
}
my $source = @{$msg_hash->{'source'}}[0];
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
+ my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
# build return message with twisted target and source
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
# Sanity check
if (not defined @{$msg_hash->{'principal'}}[0]){
- &add_content2xml_hash($out_hash, "error", "No principal specified");
- return &create_xml_string($out_hash);
+ &add_content2xml_hash($out_hash, "error", "No principal specified");
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
+ return &create_xml_string($out_hash);
}
# Authenticate
} else {
if (not $kadm5->get_principal($principal)){
&add_content2xml_hash($out_hash, "error", "Principal does not exists");
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
return &create_xml_string($out_hash);
}
}
}
- my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
if (defined $forward_to_gosa) {
&add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
}
my $source = @{$msg_hash->{'source'}}[0];
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
+ my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
# build return message with twisted target and source
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
# Sanity check
if (not defined @{$msg_hash->{'principal'}}[0]){
&add_content2xml_hash($out_hash, "error", "No principal specified");
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
return &create_xml_string($out_hash);
}
}
}
- my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
if (defined $forward_to_gosa) {
&add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
}
my $source = @{$msg_hash->{'source'}}[0];
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
+ my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
# build return message with twisted target and source
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
# Sanity check
if (not defined @{$msg_hash->{'principal'}}[0]){
- &add_content2xml_hash($out_hash, "error", "No principal specified");
- return &create_xml_string($out_hash);
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
+ &add_content2xml_hash($out_hash, "error", "No principal specified");
+ return &create_xml_string($out_hash);
}
# Authenticate
}
}
- my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
if (defined $forward_to_gosa) {
&add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
}
my $source = @{$msg_hash->{'source'}}[0];
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
+ my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
# build return message with twisted target and source
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
# Sanity check
if (not defined @{$msg_hash->{'policy'}}[0]){
- &add_content2xml_hash($out_hash, "error", "No policy specified");
- return &create_xml_string($out_hash);
+ &add_content2xml_hash($out_hash, "error", "No policy specified");
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
+ return &create_xml_string($out_hash);
}
# Authenticate
&add_content2xml_hash($out_hash, "policy_refcnt", $data->policy_refcnt);
}
- my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
if (defined $forward_to_gosa) {
&add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
}
my $source = @{$msg_hash->{'source'}}[0];
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
+ my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
# Build return message
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
# Sanity check
if (not defined @{$msg_hash->{'policy'}}[0]){
- &add_content2xml_hash($out_hash, "error", "No policy specified");
- return &create_xml_string($out_hash);
+ &add_content2xml_hash($out_hash, "error", "No policy specified");
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
+
+ return &create_xml_string($out_hash);
}
&add_content2xml_hash($msg_hash, "name", @{$msg_hash->{'policy'}}[0]);
# Authenticate
my $kadm5 = Authen::Krb5::Admin->init_with_password($krb_admin, $krb_password);
if (not defined $kadm5){
- &add_content2xml_hash($out_hash, "error", "Cannot connect to kadmin server");
+ &add_content2xml_hash($out_hash, "error", "Cannot connect to kadmin server");
} else {
- if ( $kadm5->get_policy(@{$msg_hash->{'policy'}}[0])) {
- &add_content2xml_hash($out_hash, "error", "Policy exists");
- return &create_xml_string($out_hash);
- }
+ if ( $kadm5->get_policy(@{$msg_hash->{'policy'}}[0])) {
+ &add_content2xml_hash($out_hash, "error", "Policy exists");
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
+ return &create_xml_string($out_hash);
+ }
my $pol = Authen::Krb5::Admin::Policy->new;
$kadm5->create_policy($pol) or &add_content2xml_hash($out_hash, "error", Authen::Krb5::Admin::error);
}
- my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
if (defined $forward_to_gosa) {
&add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
}
my $source = @{$msg_hash->{'source'}}[0];
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
+ my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
# Build return message
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
# Sanity check
if (not defined @{$msg_hash->{'policy'}}[0]){
- &add_content2xml_hash($out_hash, "error", "No policy specified");
- return &create_xml_string($out_hash);
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
+ &add_content2xml_hash($out_hash, "error", "No policy specified");
+ return &create_xml_string($out_hash);
}
&add_content2xml_hash($msg_hash, "name", @{$msg_hash->{'policy'}}[0]);
$kadm5->modify_policy($pol) or &add_content2xml_hash($out_hash, "error", Authen::Krb5::Admin::error);
}
- my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
if (defined $forward_to_gosa) {
&add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
}
my $source = @{$msg_hash->{'source'}}[0];
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
+ my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
# build return message with twisted target and source
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
# Sanity check
if (not defined @{$msg_hash->{'policy'}}[0]){
- &add_content2xml_hash($out_hash, "error", "No policy specified");
- return &create_xml_string($out_hash);
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
+ &add_content2xml_hash($out_hash, "error", "No policy specified");
+ return &create_xml_string($out_hash);
}
# Authenticate
$kadm5->delete_policy($policy) or &add_content2xml_hash($out_hash, "error", Authen::Krb5::Admin::error);
}
- my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
if (defined $forward_to_gosa) {
&add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
}
my $source = @{$msg_hash->{'source'}}[0];
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
+ my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
# build return message with twisted target and source
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
# Sanity check
if (not defined @{$msg_hash->{'principal'}}[0]){
- &add_content2xml_hash($out_hash, "error", "No principal specified");
- return &create_xml_string($out_hash);
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
+
+ &add_content2xml_hash($out_hash, "error", "No principal specified");
+ return &create_xml_string($out_hash);
}
if (not defined @{$msg_hash->{'password'}}[0]){
- &add_content2xml_hash($out_hash, "error", "No password specified");
- return &create_xml_string($out_hash);
+ if (defined $forward_to_gosa) {
+ &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
+ }
+
+ &add_content2xml_hash($out_hash, "error", "No password specified");
+ return &create_xml_string($out_hash);
}
# Authenticate
$kadm5->chpass_principal($principal, @{$msg_hash->{'password'}}[0]) or &add_content2xml_hash($out_hash, "error", Authen::Krb5::Admin::error);
}
- my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
if (defined $forward_to_gosa) {
&add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
}