[csw-devel] SF.net SVN: gar:[20213] csw/mgar/pkg/389-ds-base/trunk
cgrzemba at users.sourceforge.net
cgrzemba at users.sourceforge.net
Thu Jan 24 15:30:51 CET 2013
Revision: 20213
http://gar.svn.sourceforge.net/gar/?rev=20213&view=rev
Author: cgrzemba
Date: 2013-01-24 14:30:51 +0000 (Thu, 24 Jan 2013)
Log Message:
-----------
389-ds-base/trunk: fix some bugs
Modified Paths:
--------------
csw/mgar/pkg/389-ds-base/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/389-ds-base/trunk/files/0009-fix-for-550-memberuid-not-created.patch
csw/mgar/pkg/389-ds-base/trunk/files/0011-Makefile.am.patch
Modified: csw/mgar/pkg/389-ds-base/trunk/Makefile
===================================================================
--- csw/mgar/pkg/389-ds-base/trunk/Makefile 2013-01-24 14:02:52 UTC (rev 20212)
+++ csw/mgar/pkg/389-ds-base/trunk/Makefile 2013-01-24 14:30:51 UTC (rev 20213)
@@ -36,7 +36,10 @@
PATCHFILES += 0008-mntent-daemon.c.patch
PATCHFILES += 0009-mozldap-pw.c.patch
PATCHFILES += 0010-mntent-config.ac.patch
+PATCHFILES += 0011-Makefile.am.patch
+PATCHFILES += 0009-fix-for-550-memberuid-not-created.patch
+
BUILD_DEP_PKGS += CSWautoconf
BUILD_DEP_PKGS += CSWautomake
BUILD_DEP_PKGS += CSWbdb48devel
Added: csw/mgar/pkg/389-ds-base/trunk/files/0009-fix-for-550-memberuid-not-created.patch
===================================================================
--- csw/mgar/pkg/389-ds-base/trunk/files/0009-fix-for-550-memberuid-not-created.patch (rev 0)
+++ csw/mgar/pkg/389-ds-base/trunk/files/0009-fix-for-550-memberuid-not-created.patch 2013-01-24 14:30:51 UTC (rev 20213)
@@ -0,0 +1,99 @@
+From 7b74f56c497c1cef1a97667548f5a49ea09a3552 Mon Sep 17 00:00:00 2001
+From: Carsten Grzemba <cgrzemba at opencsw.org>
+Date: Thu, 24 Jan 2013 14:23:49 +0100
+Subject: [PATCH 9/9] fix for #550: memberuid not created
+
+---
+ ldap/servers/plugins/posix-winsync/posix-group-func.c | 8 ++++++--
+ ldap/servers/plugins/posix-winsync/posix-group-func.h | 2 +-
+ ldap/servers/plugins/posix-winsync/posix-winsync.c | 18 ++++++------------
+ 3 Dateien ge\xE4ndert, 13 Zeilen hinzugef\xFCgt(+), 15 Zeilen entfernt(-)
+
+diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.c b/ldap/servers/plugins/posix-winsync/posix-group-func.c
+index 1403a89..37ab4d7 100644
+--- a/ldap/servers/plugins/posix-winsync/posix-group-func.c
++++ b/ldap/servers/plugins/posix-winsync/posix-group-func.c
+@@ -209,6 +209,9 @@ isPosixGroup(Slapi_Entry *entry)
+ ) {
+ const char *oc = NULL;
+ oc = slapi_value_get_string(value);
++ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
++ "found objectclass %s\n", oc);
++
+ if (strncasecmp(oc, "posixGroup", 11) == 0) {
+ return 1; /* Entry has objectclass posixGroup */
+ }
+@@ -218,13 +221,14 @@ isPosixGroup(Slapi_Entry *entry)
+ }
+
+ int
+-modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int *do_modify)
++modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int *do_modify, int newposixgroup)
+ {
+ int rc = 0;
+
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME, "modGroupMembership: ==>\n");
+
+- if (!isPosixGroup(entry)) {
++ if (!newposixgroup && !isPosixGroup(entry)) {
++ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME, "modGroupMembership: <== no posixgroup\n");
+ return 0;
+ }
+
+diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.h b/ldap/servers/plugins/posix-winsync/posix-group-func.h
+index 9452022..8a8dc9a 100644
+--- a/ldap/servers/plugins/posix-winsync/posix-group-func.h
++++ b/ldap/servers/plugins/posix-winsync/posix-group-func.h
+@@ -11,7 +11,7 @@ Slapi_PBlock * dnHasObjectClass( const char *baseDN, const char *objectClass, Sl
+ char * searchUid(const char *udn);
+ int dn_in_set(const char* uid, char **uids);
+ */
+-int modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int *do_modify);
++int modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int *do_modify, int newposixgroup);
+ int addGroupMembership(Slapi_Entry *entry, Slapi_Entry *ad_entry);
+ char * searchUid(const char *udn);
+ void memberUidLock();
+diff --git a/ldap/servers/plugins/posix-winsync/posix-winsync.c b/ldap/servers/plugins/posix-winsync/posix-winsync.c
+index 398541d..4cee336 100644
+--- a/ldap/servers/plugins/posix-winsync/posix-winsync.c
++++ b/ldap/servers/plugins/posix-winsync/posix-winsync.c
+@@ -897,12 +897,6 @@ posix_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry *rawentry, Sla
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ "_pre_ds_mod_group_cb present %d modify %d before\n", is_present_local,
+ do_modify_local);
+- if (posix_winsync_config_get_mapMemberUid()) {
+- memberUidLock();
+- modGroupMembership(ds_entry, smods, do_modify);
+- memberUidUnlock();
+- }
+-
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ "_pre_ds_mod_group_cb present %d modify %d\n", is_present_local,
+ do_modify_local);
+@@ -924,17 +918,17 @@ posix_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry *rawentry, Sla
+ "_pre_ds_mod_group_cb add oc:posixGroup\n");
+ slapi_mods_add_mod_values(smods, LDAP_MOD_REPLACE, "objectClass",
+ valueset_get_valuearray(oc_vs));
+- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+- "_pre_ds_mod_group_cb step\n");
+ slapi_value_free(&oc_nv);
+- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+- "_pre_ds_mod_group_cb step\n");
+ slapi_valueset_free(oc_vs);
+- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+- "_pre_ds_mod_group_cb step\n");
+ }
+ slapi_value_free(&voc);
+ }
++ if (posix_winsync_config_get_mapMemberUid()) {
++ memberUidLock();
++ modGroupMembership(ds_entry, smods, do_modify, !is_present_local && do_modify_local);
++ memberUidUnlock();
++ }
++
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name, "_pre_ds_mod_group_cb step\n");
+
+ if (slapi_is_loglevel_set(SLAPI_LOG_PLUGIN)) {
+--
+1.7.12
+
Added: csw/mgar/pkg/389-ds-base/trunk/files/0011-Makefile.am.patch
===================================================================
--- csw/mgar/pkg/389-ds-base/trunk/files/0011-Makefile.am.patch (rev 0)
+++ csw/mgar/pkg/389-ds-base/trunk/files/0011-Makefile.am.patch 2013-01-24 14:30:51 UTC (rev 20213)
@@ -0,0 +1,12 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1034,8 +1034,7 @@ libposix_winsync_plugin_la_SOURCES = ldap/servers/plugins/posix-winsync/posix-wi
+ ldap/servers/plugins/posix-winsync/posix-group-task.c \
+ ldap/servers/plugins/posix-winsync/posix-winsync-config.c
+
+-libposix_winsync_plugin_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) -DWINSYNC_TEST_POSIX \
+- -I$(srcdir)/ldap/servers/plugins/replication
++libposix_winsync_plugin_la_CPPFLAGS = -I$(srcdir)/ldap/servers/plugins/replication $(PLUGIN_CPPFLAGS) -DWINSYNC_TEST_POSIX
+ libposix_winsync_plugin_la_LIBADD = libslapd.la $(LDAPSDK_LINK) $(NSPR_LINK)
+ libposix_winsync_plugin_la_LDFLAGS = -avoid-version
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list