summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lackey <tlackey@redhat.com>2005-05-09 19:32:40 +0000
committerThomas Lackey <tlackey@redhat.com>2005-05-09 19:32:40 +0000
commitc341fc3237c61f222650176ec1316b124b1c98a6 (patch)
tree501ad2e4a024a4ff9414da5c67fb44614c0201d2
parentbc338326a2a00fb9fb9a5cc329301c7f8712d9d7 (diff)
downloadds-c341fc3237c61f222650176ec1316b124b1c98a6.tar.gz
ds-c341fc3237c61f222650176ec1316b124b1c98a6.tar.xz
ds-c341fc3237c61f222650176ec1316b124b1c98a6.zip
Add makefile and component information to build the Apache DS for User Sync
on Windows.
-rw-r--r--Makefile6
-rw-r--r--component_versions.mk22
-rw-r--r--components.mk137
-rw-r--r--ldap/servers/Makefile15
-rw-r--r--ldap/servers/ntds/apacheds/org/apache/ldap/server/NetAPIPartition.java14
5 files changed, 192 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2497a0b8..828c6169 100644
--- a/Makefile
+++ b/Makefile
@@ -135,6 +135,12 @@ ifeq ($(INTERNAL_BUILD), 1)
$(AXIS_DEP) $(DSMLJAR_DEP) $(DSDOC_DEP)
endif
+## Only fetch the necessary components for ApacheDS when requested
+ifeq ($(BUILD_NTDS),1)
+ifeq ($(ARCH), WINNT)
+COMPONENT_DEPENDENCIES += $(WRAPPER_DEP) $(SWIG_DEP) $(MAVEN_DEP) $(APACHEDS_DEP)
+endif
+endif
components: $(COMPONENT_DEPENDENCIES)
-@echo "The components are up to date"
diff --git a/component_versions.mk b/component_versions.mk
index b06c973b..4ef2111f 100644
--- a/component_versions.mk
+++ b/component_versions.mk
@@ -226,3 +226,25 @@ endif
ifndef DSDOC_RELDATE
DSDOC_RELDATE = 20050311
endif
+
+# WIX
+ifndef WIX_VERSION
+ WIX_VERSION=2.0.2613.0
+endif
+
+### apacheds, etc ###
+ifndef WRAPPER_VERSION
+ WRAPPER_VERSION=3.1.2
+endif
+
+ifndef APACHEDS_VERSION
+ APACHEDS_VERSION=0.9
+endif
+
+ifndef SWIG_VERSION
+ SWIG_VERSION=1.3.24
+endif
+
+ifndef MAVEN_VERSION
+ MAVEN_VERSION=1.0.2
+endif \ No newline at end of file
diff --git a/components.mk b/components.mk
index 345c233b..354be636 100644
--- a/components.mk
+++ b/components.mk
@@ -488,3 +488,140 @@ ifeq ($(INTERNAL_BUILD), 1)
include $(BUILD_ROOT)/internal_comp_deps.mk
endif
+#################################################
+# User Sync Components
+#################################################
+# java service wrapper for Password Sync #####################
+WRAPPER = wrapper_win32_$(WRAPPER_VERSION).zip
+WRAPPER_DEST = $(NSCP_DISTDIR_FULL_RTL)/wrapper
+WRAPPER_FILE = $(WRAPPER_DEST)/$(WRAPPER)
+WRAPPER_FILES = $(WRAPPER)
+WRAPPER_RELEASE = $(COMPONENTS_DIR_DEV)/wrapper
+WRAPPER_DIR = $(WRAPPER_RELEASE)/$(WRAPPER_VERSION)
+WRAPPER_DEP = $(WRAPPER_FILE)
+WRAPPER_REL_DIR=$(subst -bin,,$(subst .zip,,$(WRAPPER)))
+
+ifndef WRAPPER_PULL_METHOD
+WRAPPER_PULL_METHOD = $(COMPONENT_PULL_METHOD)
+endif
+
+$(WRAPPER_DEP): $(NSCP_DISTDIR_FULL_RTL)
+ifeq ($(ARCH), WINNT)
+ifdef COMPONENT_DEPS
+ echo "Inside ftppull"
+ $(FTP_PULL) -method $(COMPONENT_PULL_METHOD) \
+ -objdir $(WRAPPER_DEST) -componentdir $(WRAPPER_DIR) \
+ -files $(WRAPPER_FILES) -unzip $(WRAPPER_DEST)
+endif
+ -@if [ ! -f $@ ] ; \
+ then echo "Error: could not get component WRAPPER files $@" ; \
+ fi
+else
+ -@echo "WRAPPER is not required except on Windows."
+endif #WINNT
+
+
+# swig for Password Sync #####################
+SWIG = swigwin-$(SWIG_VERSION).zip
+SWIG_DEST = $(NSCP_DISTDIR_FULL_RTL)/swig
+SWIG_FILE = $(SWIG_DEST)/$(SWIG)
+SWIG_FILES = $(SWIG)
+SWIG_RELEASE = $(COMPONENTS_DIR_DEV)/swig
+SWIG_DIR = $(SWIG_RELEASE)/$(SWIG_VERSION)
+SWIG_DEP = $(SWIG_FILE)
+SWIG_REL_DIR=$(subst -bin,,$(subst .zip,,$(SWIG)))
+SWIG_EXE = $(SWIG_DEST)/SWIG-$(SWIG_VERSION)/swig.exe
+
+ifndef SWIG_PULL_METHOD
+SWIG_PULL_METHOD = $(COMPONENT_PULL_METHOD)
+endif
+
+$(SWIG_DEP): $(NSCP_DISTDIR_FULL_RTL)
+ifeq ($(ARCH), WINNT)
+ifdef COMPONENT_DEPS
+ echo "Inside ftppull"
+ $(FTP_PULL) -method $(COMPONENT_PULL_METHOD) \
+ -objdir $(SWIG_DEST) -componentdir $(SWIG_DIR) \
+ -files $(SWIG_FILES) -unzip $(SWIG_DEST)
+
+endif
+ -@if [ ! -f $@ ] ; \
+ then echo "Error: could not get component SWIG files $@" ; \
+ fi
+else
+ -@echo "SWIG is not required except on Windows."
+endif #WINNT
+
+# apache ds for Password Sync #####################
+APACHEDS = apacheds-main-$(APACHEDS_VERSION).jar
+APACHEDSSRC = apacheds-$(APACHEDS_VERSION)-src.zip
+APACHEDS_DEST = $(NSCP_DISTDIR_FULL_RTL)/apacheds
+APACHEDS_FILE = $(APACHEDS_DEST)/$(APACHEDS)
+APACHEDS_FILES = $(APACHEDS)
+APACHEDSSRC_FILES = $(APACHEDSSRC)
+APACHEDS_RELEASE = $(COMPONENTS_DIR_DEV)/apacheds
+APACHEDS_DIR = $(APACHEDS_RELEASE)/$(APACHEDS_VERSION)
+APACHEDS_DEP = $(APACHEDS_FILE)
+APACHEDS_REL_DIR=$(subst -bin,,$(subst .jar,,$(APACHEDS)))
+APACHEDSSOURCE = $(NSCP_DISTDIR_FULL_RTL)/apacheds/apacheds-$(APACHEDS_VERSION)
+
+
+ifndef APACHEDS_PULL_METHOD
+APACHEDS_PULL_METHOD = $(COMPONENT_PULL_METHOD)
+endif
+
+$(APACHEDS_DEP) : $(NSCP_DISTDIR_FULL_RTL)
+ifeq ($(ARCH), WINNT)
+ifdef COMPONENT_DEPS
+ echo "Inside ftppull"
+ $(FTP_PULL) -method $(COMPONENT_PULL_METHOD) \
+ -objdir $(APACHEDS_DEST) -componentdir $(APACHEDS_DIR) \
+ -files $(APACHEDS_FILES)
+ $(FTP_PULL) -method $(COMPONENT_PULL_METHOD) \
+ -objdir $(APACHEDS_DEST) -componentdir $(APACHEDS_DIR) \
+ -files $(APACHEDSSRC_FILES) -unzip $(APACHEDS_DEST)
+endif
+ -@if [ ! -f $@ ] ; \
+ then echo "Error: could not get component APACHEDS files $@" ; \
+ fi
+
+
+else
+ -@echo "APACHEDS is not required except on Windows."
+endif #WINNT
+
+
+# MAVEN for Password Sync #####################
+MAVEN = maven-$(MAVEN_VERSION).zip
+MAVEN_DEST = $(NSCP_DISTDIR_FULL_RTL)/maven
+MAVEN_FILE = $(MAVEN_DEST)/$(MAVEN)
+MAVEN_FILES = $(MAVEN)
+MAVEN_RELEASE = $(COMPONENTS_DIR_DEV)/maven
+MAVEN_DIR = $(MAVEN_RELEASE)/$(MAVEN_VERSION)
+MAVEN_DEP = $(MAVEN_FILE)
+MAVEN_REL_DIR=$(subst -bin,,$(subst .zip,,$(MAVEN)))
+
+#MAVEN_EXE=$(NSCP_DISTDIR_FULL_RTL)/maven/$(MAVEN_REL_DIR)/bin/maven
+MAVEN_EXE=..\\..\\..\\..\\..\\dist\\WINNT5.0_DBG.OBJ\\maven\\maven-1.0.2\\bin\\maven.bat
+#MAVEN_HOME=..\\..\\..\\..\\..\\dist\\WINNT5.0_DBG.OBJ\\maven\\maven-1.0.2
+MAVEN_HOME=$(NSCP_DISTDIR_FULL_RTL)/maven/$(MAVEN_REL_DIR)
+
+ifndef MAVEN_PULL_METHOD
+MAVEN_PULL_METHOD = $(COMPONENT_PULL_METHOD)
+endif
+
+$(MAVEN_DEP): $(NSCP_DISTDIR_FULL_RTL)
+ifeq ($(ARCH), WINNT)
+ifdef COMPONENT_DEPS
+ echo "Inside ftppull"
+ $(FTP_PULL) -method $(COMPONENT_PULL_METHOD) \
+ -objdir $(MAVEN_DEST) -componentdir $(MAVEN_DIR) \
+ -files $(MAVEN_FILES) -unzip $(MAVEN_DEST)
+endif
+ -@if [ ! -f $@ ] ; \
+ then echo "Error: could not get component MAVEN files $@" ; \
+ fi
+else
+ -@echo "MAVEN is not required except on Windows."
+endif #WINNT
+
diff --git a/ldap/servers/Makefile b/ldap/servers/Makefile
index fbd86f92..ae89f7db 100644
--- a/ldap/servers/Makefile
+++ b/ldap/servers/Makefile
@@ -54,6 +54,9 @@ include $(LDAP_SRC)/nsldap.mk
ifeq ($(ARCH), WINNT)
PRE_SLAPD_EXTRAS=_ntmsgdll
POST_SLAPD_EXTRAS=_ntwdog _ntperfdll
+ifeq ($(BUILD_NTDS),1)
+PRE_SLAPD_EXTRAS+=_ntds
+endif
endif
all: $(PRE_SLAPD_EXTRAS) _slapd $(POST_SLAPD_EXTRAS) _backends _plugins _snmp _slapdtools
@@ -86,6 +89,9 @@ _slapdtools:
cd slapd/tools; $(MAKE) $(MFLAGS) all
ifeq ($(ARCH), WINNT)
+_ntds:
+ cd ntds; $(MAKE) $(MFLAGS) all
+
_ntmsgdll:
cd slapd/ntmsgdll; $(MAKE) $(MFLAGS) all
@@ -107,3 +113,12 @@ endif
cd slapd/back-ldif; $(MAKE) $(MFLAGS) clean
cd plugins; $(MAKE) $(MFLAGS) clean
cd slapd/tools; $(MAKE) $(MFLAGS) clean
+
+ifeq ($(ARCH), WINNT)
+ cd ntds; $(MAKE) $(MFLAGS) clean
+else
+ echo NTDS not built on non-windows
+endif
+
+
+
diff --git a/ldap/servers/ntds/apacheds/org/apache/ldap/server/NetAPIPartition.java b/ldap/servers/ntds/apacheds/org/apache/ldap/server/NetAPIPartition.java
index e932ee35..e121997c 100644
--- a/ldap/servers/ntds/apacheds/org/apache/ldap/server/NetAPIPartition.java
+++ b/ldap/servers/ntds/apacheds/org/apache/ldap/server/NetAPIPartition.java
@@ -231,11 +231,14 @@ public class NetAPIPartition implements ContextPartition {
if(attribute.contains("user")) {
user.NewUser(rdn);
- modNTUserAttributes(user, modItems);
result = user.AddUser();
if(result != 0) {
throw new NamingException("Failed to add new user: " + normName + " (" + result + ")");
}
+ modNTUserAttributes(user, modItems);
+ if(user.StoreUser() != 0) {
+ throw new NamingException("Failed to commit modified user information: " + normName);
+ }
}
else if(attribute.contains("group")) {
attribute = entry.get("groupType");
@@ -245,10 +248,13 @@ public class NetAPIPartition implements ContextPartition {
if(((new Integer((String)attribute.get())).intValue() & GLOBAL_FLAG) == GLOBAL_FLAG) {
group.NewGroup(rdn);
- modNTGroupAttributes(group, modItems);
if(group.AddGroup() != 0) {
throw new NamingException("Failed to add new group: " + normName);
}
+ modNTGroupAttributes(group, modItems);
+ if(group.StoreGroup() != 0) {
+ throw new NamingException("Failed to commit modified user information: " + normName);
+ }
}
else if(((new Integer((String)attribute.get())).intValue() & DOMAINLOCAL_FLAG) == DOMAINLOCAL_FLAG) {
localGroup.NewLocalGroup(rdn);
@@ -256,6 +262,10 @@ public class NetAPIPartition implements ContextPartition {
if(localGroup.AddLocalGroup() != 0) {
throw new NamingException("Failed add new local group: " + normName);
}
+ modNTLocalGroupAttributes(localGroup, modItems);
+ if(localGroup.StoreLocalGroup() != 0) {
+ throw new NamingException("Failed to commit modified user information: " + normName);
+ }
}
else {
throw new NamingException("Unknown group type: " + (Integer)attribute.get());