summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 960f4dd)
raw | patch | inline | side by side (parent: 960f4dd)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Jan 2008 14:05:46 +0000 (14:05 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Jan 2008 14:05:46 +0000 (14:05 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8667 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history | |
gosa-si/modules/ServerPackages.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index 86e2f2afef55a5e094e2971e7945934bbef91246..d3a47578d50a4546f3c9b3e80005b684a935deb1 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
my @nss_options;
my $goto_admin;
my $goto_secret;
+ my $admin_base= "";
+ my $department= "";
+ my $unit_tag= "";
# Transform input into array
while ( my ($key, $value) = each(%$msg_hash) ) {
push (@nss_options, "$element");
next;
}
+ if ($key =~ /^admin_base$/) {
+ $admin_base= $element;
+ next;
+ }
+ if ($key =~ /^department$/) {
+ $department= $element;
+ next;
+ }
+ if ($key =~ /^unit_tag$/) {
+ $unit_tag= $element;
+ next;
+ }
}
}
+ # Unit tagging enabled?
+ if ($unit_tag != ""){
+ push (@pam_options, "pam_filter gosaUnitTag=$unit_tag");
+ push (@nss_options, "nss_base_passwd $admin_base?sub?gosaUnitTag=$unit_tag");
+ push (@nss_options, "nss_base_group $admin_base?sub?gosaUnitTag=$unit_tag");
+ }
+
# Setup ldap.conf
my $file1;
my $file2;
daemon_log("wrote /etc/goto/secret", 5);
}
-
- # TODO: write these values to /etc/ldap/ldap-shell.conf
- # LDAP_BASE=
- # ADMIN_BASE=
- # DEPARTMENT=
- # UNIT_TAG=
- # UNIT_TAG_FILTER=
+ # Write shell based config
+ open(file1, "> /etc/ldap/ldap-shell.conf");
+ print file1 "LDAP_BASE=\"$ldap_base\"\n";
+ print file1 "ADMIN_BASE=\"$admin_base\"\n";
+ print file1 "DEPARTMENT=\"$department\"\n";
+ print file1 "UNIT_TAG=\"$unit_tag\"\n";
+ print file1 "UNIT_TAG_FILTER=\"".($unit_tag!="" ? "(gosaUnitTag=$unit_tag)" : "")."\"\n";
+ close(file1);
return;
index 884b8f7ffdcab166588d17d6518de15da1a054b2..c4de90d9a7ab48b691c1fdb41c6e3929cd4dce69 100644 (file)
my $base;
# Do we need to look at an object class?
- if ($#servers < 1){
+ my $cnt= @servers;
+ if ($cnt < 1){
$mesg = $ldap->search( base => $ldap_base,
scope => 'sub',
attrs => ['dn', 'gotoLdapServer'],