diff options
| author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2025-10-05 16:50:04 -0500 |
|---|---|---|
| committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2025-10-17 19:10:23 -0500 |
| commit | 283d22040978ad83322555f7b9b9005e00d8c16c (patch) | |
| tree | 9fa7490df8cc1bbbcb7841b7b163f5d1a9e1c4db /src/libtdeldap.cpp | |
| parent | 378bc745595ec8d442c2a02d65a5fd31ea286789 (diff) | |
| download | libtdeldap-283d22040978ad83322555f7b9b9005e00d8c16c.tar.gz libtdeldap-283d22040978ad83322555f7b9b9005e00d8c16c.zip | |
Add group support
Diffstat (limited to 'src/libtdeldap.cpp')
| -rw-r--r-- | src/libtdeldap.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libtdeldap.cpp b/src/libtdeldap.cpp index 27eeb98..fb67e62 100644 --- a/src/libtdeldap.cpp +++ b/src/libtdeldap.cpp @@ -2054,7 +2054,7 @@ int LDAPManager::updateGroupInfo(LDAPGroupInfo group, TQString *errstr) { else { // Assemble the LDAPMod structure // We will replace any existing attributes with the new values - int number_of_parameters = 3; // 3 primary attributes + int number_of_parameters = 4; // 4 primary attributes LDAPMod *mods[number_of_parameters+1]; set_up_attribute_operations(mods, number_of_parameters); @@ -2078,6 +2078,7 @@ int LDAPManager::updateGroupInfo(LDAPGroupInfo group, TQString *errstr) { posixGroupList.append(plainUserName); } add_multiple_attributes_operation(mods, &i, "memberUid", posixGroupList); + add_single_attribute_operation(mods, &i, "displayName", group.displayName); LDAPMod *prevterm = mods[i]; mods[i] = NULL; @@ -2181,7 +2182,7 @@ int LDAPManager::addGroupInfo(LDAPGroupInfo group, TQString *errstr) { } else { // Create the base DN entry - int number_of_parameters = 6; // 6 primary attributes + int number_of_parameters = 7; // 7 primary attributes LDAPMod *mods[number_of_parameters+1]; set_up_attribute_operations(mods, number_of_parameters); @@ -2190,9 +2191,10 @@ int LDAPManager::addGroupInfo(LDAPGroupInfo group, TQString *errstr) { // Load initial required LDAP object attributes i=0; create_single_attribute_operation(mods, &i, "gidNumber", TQString("%1").arg(group.gid)); - create_multiple_attributes_operation(mods, &i, "objectClass", TQStringList::split(" ", "emsGroup groupOfNames posixGroup")); + create_multiple_attributes_operation(mods, &i, "objectClass", TQStringList::split(" ", "emsGroup groupOfNames posixGroup tdeExtendedGroupData")); create_single_attribute_operation(mods, &i, "cn", group.name); create_multiple_attributes_operation(mods, &i, "member", TQStringList(placeholderGroup)); + add_single_attribute_operation(mods, &i, "displayName", group.displayName); // Zivios specific create_single_attribute_operation(mods, &i, "emsdescription", "None"); create_single_attribute_operation(mods, &i, "emstype", "GroupEntry"); @@ -2577,6 +2579,9 @@ LDAPGroupInfo LDAPManager::parseLDAPGroupRecord(LDAPMessage* entry) { else if (ldap_field == "gidNumber") { groupinfo.gid = atoi(vals[i]->bv_val); } + else if (ldap_field == "displayName") { + groupinfo.displayName = vals[i]->bv_val; + } else if (ldap_field == "tdeBuiltinAccount") { groupinfo.tde_builtin_account = (TQString(vals[i]->bv_val).upper() == "TRUE")?true:false; } |
