[Fedora-directory-commits] dsmlgw build.xml,1.2,1.3
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27669
Modified Files:
build.xml
Log Message:
add packaging and war tasks
Index: build.xml
===================================================================
RCS file: /cvs/dirsec/dsmlgw/build.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.xml 18 Apr 2008 16:43:38 -0000 1.2
+++ build.xml 21 Apr 2008 17:58:54 -0000 1.3
@@ -19,6 +19,7 @@
<project name="dsmlgw" default="dist" basedir=".">
<property file="build.properties" />
+ <property file="${user.home}/build.properties" />
<!-- ******************** Adjustable Properties *********************** -->
<property name="globaldist.dir" location="/usr/share/java" />
@@ -41,7 +42,7 @@
<property name="axis.jar" location="${axis.lib.dir}/axis.jar" />
<property name="ldapjdk.jar" location="${ldapdist.dir}/ldapjdk.jar" />
<property name="activation.jar" location="${globaldist.dir}/activation.jar" />
- <property name="codec.jar" location="${globaldist.dir}/jakarta-commons-codec.jar" />
+ <property name="codec.jar" location="${globaldist.dir}/commons-codec.jar" />
<!-- These are the jars needed at run time, in addition to the ones
above needed for building
@@ -64,6 +65,7 @@
<property name="build.dir" value="${mcom.root}/built/dsmlgw" />
<!-- place to write final jar file and webapps files/dirs -->
<property name="dist.dir" value="${mcom.root}/../dist/dsmlgw" />
+
<!-- see if we are using the binary axis package and if it is local -->
<available file="${axisdist.dir}/webapps/axis" type="dir"
property="haveaxisbinpkg"/>
@@ -94,7 +96,7 @@
</echo>
</target>
- <target name="unzipaxisbinlocal" description="unzip a local axis bin tgz" if="havelocalaxisbin">
+ <target name="unzipaxisbinlocal" description="unzip a local axis bin tgz" unless="havelocalaxisbin">
<gunzip dest="${dist.dir}/${axisbin.tar}" src="${axisbin.dir}/${axisbin.tgz}" />
</target>
@@ -105,7 +107,7 @@
<!-- the useaxisbinpkg target is based on the package
axis-bin-1_4.tar.gz available from ws.apache.org download -->
- <target name="useaxisbinpkg" description="extract the webapps part of the binary axis tgz" if="haveaxisbinpkg" depends="unzipaxisbinlocal,unzipaxisbinremote">
+ <target name="useaxisbinpkg" description="extract the webapps part of the binary axis tgz" unless="havelocalaxisbin" depends="unzipaxisbinlocal,unzipaxisbinremote">
<untar src="${dist.dir}/${axisbin.tar}" dest="${dist.dir}">
<patternset>
<include name="${axisname}/webapps/axis/**" />
@@ -116,13 +118,47 @@
<delete file="${dist.dir}/${axisbin.tar}" />
</target>
+ <target name="copywebappsdir" description="copy webapps dir from axis bin dist"
+ if="havelocalaxisbin">
+ <mkdir dir="${dist.dir}/webapps"/>
+ <copy todir="${dist.dir}/webapps">
+ <fileset dir="${axisdist.dir}/webapps">
+ <exclude name="**/samples/**"/>
+ </fileset>
+ </copy>
+ </target>
+
<target name="mkwebappsdirs" description="make the webapps directory layout"
unless="haveaxisbinpkg">
<mkdir dir="${dist.dir}/webapps/axis/WEB-INF/lib" />
<mkdir dir="${dist.dir}/webapps/axis/WEB-INF/classes" />
</target>
- <target name="pkgwebapp" description="create the webapps layout, prepare for WAR" depends="dist,useaxisbinpkg,mkwebappsdirs">
+ <target name="pkgwebapp" description="create the webapps layout, prepare for WAR" depends="dist,useaxisbinpkg,copywebappsdir">
+ <!-- install jar files required at runtime -->
+ <copy file="${dist.dir}/dsmlgw.jar" todir="${dist.dir}/webapps/axis/WEB-INF/lib"/>
+ <!-- ldapjdk.jar should already be on the system - create symlink during setup
+ <copy file="${ldapjdk.jar}" todir="${dist.dir}/webapps/axis/WEB-INF/lib"/>
+ -->
+ <copy file="${codec.jar}" todir="${dist.dir}/webapps/axis/WEB-INF/lib"/>
+ <copy file="${activation.jar}" todir="${dist.dir}/webapps/axis/WEB-INF/lib"/>
+ <copy file="${mail.jar}" todir="${dist.dir}/webapps/axis/WEB-INF/lib"/>
+ <!-- install config files and etc. -->
+ <copy file="misc/dsmlgw.cfg" todir="${dist.dir}/webapps/axis/WEB-INF/classes"/>
+ <copy file="misc/dsmlgw-deploy.wsdd" todir="${dist.dir}/webapps/axis/WEB-INF/classes"/>
+ <copy file="misc/logging.properties" todir="${dist.dir}/webapps/axis/WEB-INF/classes"/>
+ <copy file="misc/log4j.properties" todir="${dist.dir}/webapps/axis/WEB-INF/classes"/>
+ </target>
+
+ <target name="makewar" description="create the WAR file" depends="pkgwebapp">
+ <war destfile="${dist.dir}/dsmlgw.war" webxml="${dist.dir}/webapps/axis/WEB-INF/web.xml">
+ <lib dir="${dist.dir}/webapps/axis/WEB-INF/lib"/>
+ <classes dir="${dist.dir}/webapps/axis/WEB-INF/classes"/>
+ <fileset dir="${dist.dir}/webapps/axis">
+ <exclude name="**/WEB-INF/lib/**"/>
+ <exclude name="**/WEB-INF/classes/**"/>
+ </fileset>
+ </war>
</target>
<target name="prepare" description="prepares the output directories">
15 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/memberof memberof.c, 1.6, 1.7
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/memberof
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24125
Modified Files:
memberof.c
Log Message:
Resolves: 439628
Summary: Check for indirect memberships when removing memberOf attributes.
Index: memberof.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/memberof/memberof.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- memberof.c 3 Apr 2008 23:04:11 -0000 1.6
+++ memberof.c 21 Apr 2008 17:45:15 -0000 1.7
@@ -87,7 +87,7 @@
typedef struct _memberofstringll
{
- char *dn;
+ const char *dn;
void *next;
} memberofstringll;
@@ -135,8 +135,9 @@
static int memberof_del_dn_from_groups(Slapi_PBlock *pb, char *dn);
static int memberof_call_foreach_dn(Slapi_PBlock *pb, char *dn,
char *type, plugin_search_entry_callback callback, void *callback_data);
-static int memberof_is_group_member(Slapi_Value *groupdn, Slapi_Value *memberdn);
-static int memberof_test_membership(Slapi_PBlock *pb, char *dn);
+static int memberof_is_direct_member(Slapi_Value *groupdn, Slapi_Value *memberdn);
+static int memberof_is_member(Slapi_Value *groupdn, Slapi_Value *memberdn);
+static int memberof_test_membership(Slapi_PBlock *pb, char *group_dn);
static int memberof_test_membership_callback(Slapi_Entry *e, void *callback_data);
static int memberof_del_dn_type_callback(Slapi_Entry *e, void *callback_data);
static int memberof_replace_dn_type_callback(Slapi_Entry *e, void *callback_data);
@@ -378,6 +379,12 @@
return rc;
}
+/*
+ * Does a callback search of "type=dn" under the db suffix that "dn" is in.
+ * If "dn" is a user, you'd want "type" to be "member". If "dn" is a group,
+ * you could want type to be either "member" or "memberOf" depending on the
+ * case.
+ */
int memberof_call_foreach_dn(Slapi_PBlock *pb, char *dn,
char *type, plugin_search_entry_callback callback, void *callback_data)
{
@@ -399,7 +406,6 @@
base_sdn = (Slapi_DN*)slapi_be_getsuffix(be,0);
}
-
if(base_sdn)
{
int filter_size =
@@ -804,6 +810,9 @@
Slapi_Entry *e = 0;
memberofstringll *ll = 0;
char *op_str = 0;
+ Slapi_Value *to_dn_val = slapi_value_new_string(op_to);
+ Slapi_Value *this_dn_val = slapi_value_new_string(op_this);
+
/* determine if this is a group op or single entry */
op_to_sdn = slapi_sdn_new_dn_byref(op_to);
@@ -853,7 +862,6 @@
{
/* group */
Slapi_Value *ll_dn_val = 0;
- Slapi_Value *to_dn_val = slapi_value_new_string(op_to);
Slapi_Attr *members = 0;
ll = stack;
@@ -865,7 +873,6 @@
if(0 == memberof_compare(&ll_dn_val, &to_dn_val))
{
- slapi_value_free(&to_dn_val);
slapi_value_free(&ll_dn_val);
/* someone set up infinitely
@@ -882,8 +889,6 @@
ll = ll->next;
}
- slapi_value_free(&to_dn_val);
-
/* do op on group */
slapi_log_error( SLAPI_LOG_PLUGIN,
MEMBEROF_PLUGIN_SUBSYSTEM,
@@ -913,9 +918,6 @@
}
/* continue with operation */
{
- Slapi_Value *to_dn_val = slapi_value_new_string(op_to);
- Slapi_Value *this_dn_val = slapi_value_new_string(op_this);
-
/* We want to avoid listing a group as a memberOf itself
* in case someone set up a circular grouping.
*/
@@ -925,15 +927,12 @@
MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_modop_one_r: not processing memberOf "
"operations on self entry: %s\n", this_dn_val);
- slapi_value_free(&to_dn_val);
- slapi_value_free(&this_dn_val);
goto bail;
}
- /* We don't need the Slapi_Value copies of the DN's anymore */
- slapi_value_free(&to_dn_val);
- slapi_value_free(&this_dn_val);
-
+ /* We need to deal with delete cases separately. We may not
+ * want to remove a memberof attribute from an entry since
+ * it could still be a member in some other indirect manner. */
if(stack && LDAP_MOD_DELETE == mod_op)
{
if(memberof_is_legit_member(pb, group_dn,
@@ -948,49 +947,64 @@
}
}
- /* single entry - do mod */
- mod_pb = slapi_pblock_new();
-
- mods[0] = &mod;
- if(LDAP_MOD_REPLACE == mod_op)
- {
- mods[1] = &replace_mod;
- mods[2] = 0;
- }
- else
- {
- mods[1] = 0;
- }
+ /* Check if the entry is still an indirect member. If it is, we
+ * don't want to remove the memberOf value. */
+ if((LDAP_MOD_DELETE != mod_op) || (0 == memberof_is_member(this_dn_val, to_dn_val))) {
+ /* If we're about to add a memberOf value to an entry, we should first check
+ * if the value already exists. */
+ if((LDAP_MOD_ADD == mod_op) && (slapi_entry_attr_has_syntax_value(e,
+ MEMBEROF_ATTR, this_dn_val)))
+ {
+ slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_modop_one_r: memberOf value %s already exists in "
+ "entry %s\n", op_this, op_to);
+ goto bail;
+ }
- val[0] = op_this;
- val[1] = 0;
+ /* single entry - do mod */
+ mod_pb = slapi_pblock_new();
- mod.mod_op = LDAP_MOD_REPLACE == mod_op?LDAP_MOD_DELETE:mod_op;
- mod.mod_type = MEMBEROF_ATTR;
- mod.mod_values = val;
+ mods[0] = &mod;
+ if(LDAP_MOD_REPLACE == mod_op)
+ {
+ mods[1] = &replace_mod;
+ mods[2] = 0;
+ }
+ else
+ {
+ mods[1] = 0;
+ }
- if(LDAP_MOD_REPLACE == mod_op)
- {
- replace_val[0] = replace_with;
- replace_val[1] = 0;
+ val[0] = op_this;
+ val[1] = 0;
- replace_mod.mod_op = LDAP_MOD_ADD;
- replace_mod.mod_type = MEMBEROF_ATTR;
- replace_mod.mod_values = replace_val;
- }
+ mod.mod_op = LDAP_MOD_REPLACE == mod_op?LDAP_MOD_DELETE:mod_op;
+ mod.mod_type = MEMBEROF_ATTR;
+ mod.mod_values = val;
- slapi_modify_internal_set_pb(
- mod_pb, op_to,
- mods, 0, 0,
- memberof_get_plugin_id(), 0);
+ if(LDAP_MOD_REPLACE == mod_op)
+ {
+ replace_val[0] = replace_with;
+ replace_val[1] = 0;
- slapi_modify_internal_pb(mod_pb);
+ replace_mod.mod_op = LDAP_MOD_ADD;
+ replace_mod.mod_type = MEMBEROF_ATTR;
+ replace_mod.mod_values = replace_val;
+ }
- slapi_pblock_get(mod_pb,
- SLAPI_PLUGIN_INTOP_RESULT,
- &rc);
+ slapi_modify_internal_set_pb(
+ mod_pb, op_to,
+ mods, 0, 0,
+ memberof_get_plugin_id(), 0);
+
+ slapi_modify_internal_pb(mod_pb);
+
+ slapi_pblock_get(mod_pb,
+ SLAPI_PLUGIN_INTOP_RESULT,
+ &rc);
- slapi_pblock_destroy(mod_pb);
+ slapi_pblock_destroy(mod_pb);
+ }
if(LDAP_MOD_DELETE == mod_op)
{
@@ -1010,6 +1024,8 @@
}
bail:
+ slapi_value_free(&to_dn_val);
+ slapi_value_free(&this_dn_val);
slapi_entry_free(e);
return rc;
}
@@ -1284,11 +1300,12 @@
((memberof_add_groups*)callback_data)->target_dn);
}
-/* memberof_is_group_member()
- * tests membership of memberdn in group groupdn
+/* memberof_is_direct_member()
+ *
+ * tests for direct membership of memberdn in group groupdn
* returns non-zero when true, zero otherwise
*/
-int memberof_is_group_member(Slapi_Value *groupdn, Slapi_Value *memberdn)
+int memberof_is_direct_member(Slapi_Value *groupdn, Slapi_Value *memberdn)
{
int rc = 0;
Slapi_DN *sdn = 0;
@@ -1316,9 +1333,164 @@
return rc;
}
+/* memberof_is_member()
+ *
+ * tests for membership of memberdn in group groupdn. This
+ * will check for both direct and indirect membership.
+ * returns non-zero when true, zero otherwise
+ */
+int memberof_is_member(Slapi_Value *groupdn, Slapi_Value *memberdn)
+{
+ memberofstringll *stack = 0;
+
+ /* Do a quick check to see if the entry is a direct
+ * member before tracing through nested groups. */
+ if(memberof_is_direct_member(groupdn, memberdn))
+ {
+ /* entry is a direct member */
+ return 1;
+ }
+
+ return memberof_is_member_r(groupdn, memberdn, stack);
+}
+
+/* memberof_is_member_r()
+ *
+ * Recursive function to do the work for the memberof_is_member()
+ * function. This will basically check if "memberdn" is a member
+ * of the group represented by "groupdn". Only "member" attribute
+ * values will be used to make this determination, not "memberOf"
+ * attribute values.
+ *
+ * returns non-zero when true, zero otherwise
+ */
+int memberof_is_member_r(Slapi_Value *groupdn, Slapi_Value *memberdn, memberofstringll *stack)
+{
+ Slapi_DN *member_sdn = 0;
+ Slapi_DN *base_sdn = 0;
+ Slapi_PBlock *search_pb = slapi_pblock_new();
+ Slapi_Backend *be = 0;
+ Slapi_Value *ll_dn_val = 0;
+ memberofstringll *ll = stack;
+ char *filter_str = 0;
+ int rc = 0;
+
+ /* Check if we've processed memberdn already to detect looped
+ * groupings. We want to do this right away to avoid any
+ * unecessary processing. */
+ while(ll)
+ {
+ ll_dn_val = slapi_value_new_string(ll->dn);
+
+ if(0 == memberof_compare(&ll_dn_val, &memberdn))
+ {
+ slapi_value_free(&ll_dn_val);
+
+ /* someone set up infinitely
+ * recursive groups - bail out */
+ slapi_log_error( SLAPI_LOG_FATAL,
+ MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_is_member_r: group recursion"
+ " detected in %s\n"
+ ,slapi_value_get_string(memberdn));
+ goto bail;
+ }
+
+ slapi_value_free(&ll_dn_val);
+ ll = ll->next;
+ }
+
+ /* push memberdn onto the stack to detect loops */
+ ll = (memberofstringll*)slapi_ch_malloc(sizeof(memberofstringll));
+ ll->dn = slapi_value_get_string(memberdn);
+ ll->next = stack;
+
+ /* Find the backend suffix that memberdn is in so we can
+ * use it as a search base. */
+ member_sdn = slapi_sdn_new_dn_byref(slapi_value_get_string(memberdn));
+ be = slapi_be_select(member_sdn);
+ if(be)
+ {
+ base_sdn = (Slapi_DN*)slapi_be_getsuffix(be,0);
+ }
+
+ /* Do a search for "member=<memberdn>". Go through matches to
+ * see if it is our group. If not, search for "member=<matchdn>"
+ * and keep looping until we've exhausted it. */
+ if(base_sdn)
+ {
+ int filter_size =
+ (strlen(MEMBEROF_GROUP_ATTR) +
+ strlen(slapi_value_get_string(memberdn)) + 4); /* 4 for (=) + null */
+ filter_str = (char*)slapi_ch_malloc(filter_size);
+ sprintf(filter_str, "(%s=%s)", MEMBEROF_GROUP_ATTR, slapi_value_get_string(memberdn));
+ }
+
+ if(filter_str)
+ {
+ slapi_search_internal_set_pb(search_pb, slapi_sdn_get_dn(base_sdn),
+ LDAP_SCOPE_SUBTREE, filter_str, 0, 0,
+ 0, 0,
+ memberof_get_plugin_id(),
+ 0);
+
+ if(slapi_search_internal_pb(search_pb))
+ {
+ /* get result and log an error */
+ int res = 0;
+ slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
+ slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_is_member_r: error searching for groups: %d",
+ res);
+ goto bail;
+ } else {
+ Slapi_Entry **entries = NULL;
+ slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
+ if ( NULL != entries && NULL != entries[0])
+ {
+ int i;
+
+ for(i = 0; entries[i] != NULL; i++)
+ {
+ /* Iterate through the matches checking if the dn is our groupdn. */
+ if(strcasecmp(slapi_entry_get_ndn(entries[i]), slapi_value_get_string(groupdn)) == 0)
+ {
+ /* This is the group we've been searching for, so
+ * set rc and bail. */
+ rc = 1;
+ break;
+ } else {
+ /* This is not the group you're looking for...
+ * Find all of the groups that this group is a member of to
+ * see if any of them are the group we are trying to find.
+ * We do this by doing a recursive call on this function. */
+ Slapi_Value *entrydn = slapi_value_new_string(slapi_entry_get_ndn(entries[i]));
+ rc = memberof_is_member_r(groupdn, entrydn, ll);
+ slapi_value_free(&entrydn);
+ }
+ }
+ }
+ }
+ }
+
+ bail:
+ slapi_ch_free((void **)&ll);
+ slapi_ch_free_string(&filter_str);
+ slapi_sdn_free(&member_sdn);
+ slapi_free_search_results_internal(search_pb);
+ slapi_pblock_destroy(search_pb);
+
+ return rc;
+}
+
/* memberof_test_membership()
+ *
+ * Finds all entries who are a "memberOf" the group
+ * represented by "group_dn". For each matching entry, we
+ * call memberof_test_membership_callback().
+ *
* for each attribute in the memberof attribute
- * determine if the entry is still a member
+ * determine if the entry is still a member.
*
* test each for direct membership
* move groups entry is memberof to member group
@@ -1326,12 +1498,19 @@
* iterate until a pass fails to move a group over to member groups
* remaining groups should be deleted
*/
-int memberof_test_membership(Slapi_PBlock *pb, char *dn)
+int memberof_test_membership(Slapi_PBlock *pb, char *group_dn)
{
- return memberof_call_foreach_dn(pb, dn, MEMBEROF_ATTR,
+ return memberof_call_foreach_dn(pb, group_dn, MEMBEROF_ATTR,
memberof_test_membership_callback ,0);
}
+/*
+ * memberof_test_membership_callback()
+ *
+ * A callback function to do the work of memberof_test_membership().
+ * Note that this not only tests membership, but updates the memberOf
+ * attributes in the entry to be correct.
+ */
int memberof_test_membership_callback(Slapi_Entry *e, void *callback_data)
{
int rc = 0;
@@ -1375,8 +1554,8 @@
while(val)
{
- /* test for membership */
- if(memberof_is_group_member(val, entry_dn))
+ /* test for direct membership */
+ if(memberof_is_direct_member(val, entry_dn))
{
/* it is a member */
member_array[m_index] = val;
@@ -1401,12 +1580,19 @@
{
member_found = 0;
+ /* For each group that this entry is a verified member of, see if
+ * any of the candidate groups are members. If they are, add them
+ * to the list of verified groups that this entry is a member of.
+ */
while(outer_index < m_index)
{
int inner_index = 0;
while(inner_index < c_index)
{
+ /* Check for a special value in this position
+ * that indicates that the candidate was moved
+ * to the member array. */
if((void*)1 ==
candidate_array[inner_index])
{
@@ -1415,7 +1601,7 @@
continue;
}
- if(memberof_is_group_member(
+ if(memberof_is_direct_member(
candidate_array[inner_index],
member_array[outer_index]))
{
@@ -1443,6 +1629,9 @@
outer_index = 0;
while(outer_index < c_index)
{
+ /* Check for a special value in this position
+ * that indicates that the candidate was moved
+ * to the member array. */
if((void*)1 == candidate_array[outer_index])
{
/* item moved, skip */
@@ -1708,7 +1897,7 @@
Slapi_Attr *memberof = 0;
Slapi_Value *memberdn = 0;
int hint = 0;
- char *delete_group_dn = 0;
+ const char *delete_group_dn = 0;
slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_is_legit_member\n" );
15 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd filterentry.c, 1.6, 1.7
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12314
Modified Files:
filterentry.c
Log Message:
Resolves: #428764
Summary: memory leaks in extensible filter code
Description: applying the patch provided by Ulf Weltman
1) type is not consumed in attrlist_merge
2) although dnattrs is a linked list, only the first item was released.
Test case filter: "(ou:dn:=groups)"
Index: filterentry.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/filterentry.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- filterentry.c 12 Oct 2007 18:03:42 -0000 1.6
+++ filterentry.c 18 Apr 2008 20:20:22 -0000 1.7
@@ -441,6 +441,7 @@
bv.bv_len = strlen(val);
bvec[0] = &bv;
attrlist_merge (&dnAttrs, type, bvec);
+ slapi_ch_free_string( &type );
}
}
ldap_value_free (avas);
@@ -505,7 +506,7 @@
/* B) Also check the DN attributes for the attribute value */
Slapi_Attr* dnattrs= dn2attrs(slapi_entry_get_dn_const(e));
rc= test_ava_filter( callers_pb, e, dnattrs, &a, LDAP_FILTER_EQUALITY, 0 /* Don't Verify Access */ , 0 /* don't just verify access */, access_check_done );
- slapi_attr_free( &dnattrs );
+ attrlist_free( dnattrs );
}
}
else
@@ -520,7 +521,7 @@
/* D & F) Also check the DN attributes for the attribute value */
Slapi_Attr* dnattrs= dn2attrs(slapi_entry_get_dn_const(e));
mrf->mrf_match (mrf->mrf_object, e, dnattrs);
- slapi_attr_free( &dnattrs );
+ attrlist_free( dnattrs );
}
}
}
@@ -573,7 +574,7 @@
/* B) Also check the DN attributes for the attribute value */
Slapi_Attr* dnattrs= dn2attrs(slapi_entry_get_dn_const(e));
rc= test_ava_filter( callers_pb, e, dnattrs, &a, LDAP_FILTER_EQUALITY, 0 /* Don't Verify Access */ , 0 /* don't just verify access */, access_check_done );
- slapi_attr_free( &dnattrs );
+ attrlist_free( dnattrs );
}
}
else
@@ -588,7 +589,7 @@
/* D & F) Also check the DN attributes for the attribute value */
Slapi_Attr* dnattrs= dn2attrs(slapi_entry_get_dn_const(e));
mrf->mrf_match (mrf->mrf_object, e, dnattrs);
- slapi_attr_free( &dnattrs );
+ attrlist_free( dnattrs );
}
}
}
15 years, 5 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd filterentry.c, 1.6, 1.6.2.1
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12164
Modified Files:
Tag: Directory_Server_8_0_Branch
filterentry.c
Log Message:
Resolves: #428764
Summary: memory leaks in extensible filter code
Description: applying the patch provided by Ulf Weltman
1) type is not consumed in attrlist_merge
2) although dnattrs is a linked list, only the first item was released.
Test case filter: "(ou:dn:=groups)"
Index: filterentry.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/filterentry.c,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -r1.6 -r1.6.2.1
--- filterentry.c 12 Oct 2007 18:03:42 -0000 1.6
+++ filterentry.c 18 Apr 2008 20:18:59 -0000 1.6.2.1
@@ -441,6 +441,7 @@
bv.bv_len = strlen(val);
bvec[0] = &bv;
attrlist_merge (&dnAttrs, type, bvec);
+ slapi_ch_free_string( &type );
}
}
ldap_value_free (avas);
@@ -505,7 +506,7 @@
/* B) Also check the DN attributes for the attribute value */
Slapi_Attr* dnattrs= dn2attrs(slapi_entry_get_dn_const(e));
rc= test_ava_filter( callers_pb, e, dnattrs, &a, LDAP_FILTER_EQUALITY, 0 /* Don't Verify Access */ , 0 /* don't just verify access */, access_check_done );
- slapi_attr_free( &dnattrs );
+ attrlist_free( dnattrs );
}
}
else
@@ -520,7 +521,7 @@
/* D & F) Also check the DN attributes for the attribute value */
Slapi_Attr* dnattrs= dn2attrs(slapi_entry_get_dn_const(e));
mrf->mrf_match (mrf->mrf_object, e, dnattrs);
- slapi_attr_free( &dnattrs );
+ attrlist_free( dnattrs );
}
}
}
@@ -573,7 +574,7 @@
/* B) Also check the DN attributes for the attribute value */
Slapi_Attr* dnattrs= dn2attrs(slapi_entry_get_dn_const(e));
rc= test_ava_filter( callers_pb, e, dnattrs, &a, LDAP_FILTER_EQUALITY, 0 /* Don't Verify Access */ , 0 /* don't just verify access */, access_check_done );
- slapi_attr_free( &dnattrs );
+ attrlist_free( dnattrs );
}
}
else
@@ -588,7 +589,7 @@
/* D & F) Also check the DN attributes for the attribute value */
Slapi_Attr* dnattrs= dn2attrs(slapi_entry_get_dn_const(e));
mrf->mrf_match (mrf->mrf_object, e, dnattrs);
- slapi_attr_free( &dnattrs );
+ attrlist_free( dnattrs );
}
}
}
15 years, 5 months
[Fedora-directory-commits] dsmlgw/src/com/netscape/xmltools DSML2LDIF.java, 1.1.1.1, 1.2 DSMLReader.java, 1.1.1.1, 1.2 DSMLSAXBuilder.java, 1.1.1.1, 1.2 DSMLSAXHandler.java, 1.1.1.1, 1.2 DSMLWriter.java, 1.1.1.1, 1.2 GetOpt.java, 1.1.1.1, 1.2 LDIF2DSML.java, 1.1.1.1, 1.2 Makefile, 1.1.1.1, NONE
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw/src/com/netscape/xmltools
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22524/dsmlgw/src/com/netscape/xmltools
Modified Files:
DSML2LDIF.java DSMLReader.java DSMLSAXBuilder.java
DSMLSAXHandler.java DSMLWriter.java GetOpt.java LDIF2DSML.java
Removed Files:
Makefile
Log Message:
initial commit of dsmlgw - updated license to plain old GPLv2 - updated to use axis1.4
Index: DSML2LDIF.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/xmltools/DSML2LDIF.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- DSML2LDIF.java 27 Apr 2007 20:57:20 -0000 1.1.1.1
+++ DSML2LDIF.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
* Copyright (C) 2005 Red Hat, Inc.
Index: DSMLReader.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/xmltools/DSMLReader.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- DSMLReader.java 27 Apr 2007 20:57:19 -0000 1.1.1.1
+++ DSMLReader.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
* Copyright (C) 2005 Red Hat, Inc.
Index: DSMLSAXBuilder.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/xmltools/DSMLSAXBuilder.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- DSMLSAXBuilder.java 27 Apr 2007 20:57:20 -0000 1.1.1.1
+++ DSMLSAXBuilder.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
* Copyright (C) 2005 Red Hat, Inc.
Index: DSMLSAXHandler.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/xmltools/DSMLSAXHandler.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- DSMLSAXHandler.java 27 Apr 2007 20:57:19 -0000 1.1.1.1
+++ DSMLSAXHandler.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
* Copyright (C) 2005 Red Hat, Inc.
Index: DSMLWriter.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/xmltools/DSMLWriter.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- DSMLWriter.java 27 Apr 2007 20:57:19 -0000 1.1.1.1
+++ DSMLWriter.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
* Copyright (C) 2005 Red Hat, Inc.
Index: GetOpt.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/xmltools/GetOpt.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- GetOpt.java 27 Apr 2007 20:57:20 -0000 1.1.1.1
+++ GetOpt.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
* Copyright (C) 2005 Red Hat, Inc.
Index: LDIF2DSML.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/xmltools/LDIF2DSML.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- LDIF2DSML.java 27 Apr 2007 20:57:20 -0000 1.1.1.1
+++ LDIF2DSML.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
* Copyright (C) 2005 Red Hat, Inc.
--- Makefile DELETED ---
15 years, 5 months
[Fedora-directory-commits] dsmlgw/src/com/netscape/dsml/gateway BatchProcessor.java, 1.1.1.1, 1.2 Configuration.java, 1.1.1.1, 1.2 Constants.java, 1.1.1.1, 1.2 GenericOperation.java, 1.1.1.1, 1.2 IConnMgrFactoryFunctor.java, 1.1.1.1, 1.2 IConnectionManager.java, 1.1.1.1, 1.2 LDAPAuthenticator.java, 1.1.1.1, 1.2 OperationAdd.java, 1.1.1.1, 1.2 OperationAuth.java, 1.1.1.1, 1.2 OperationCompare.java, 1.1.1.1, 1.2 OperationDelete.java, 1.1.1.1, 1.2 OperationExtended.java, 1.1.1.1, 1.2 OperationModify.java, 1.1.
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22524/dsmlgw/src/com/netscape/dsml/gateway
Modified Files:
BatchProcessor.java Configuration.java Constants.java
GenericOperation.java IConnMgrFactoryFunctor.java
IConnectionManager.java LDAPAuthenticator.java
OperationAdd.java OperationAuth.java OperationCompare.java
OperationDelete.java OperationExtended.java
OperationModify.java OperationModifyDN.java
OperationSearch.java ParseControl.java ParseFilter.java
ParseValue.java ProxyConnMgrFactory.java
ProxyConnectionManager.java gatewayContext.java
gatewayException.java gatewayHandler.java gatewayService.java
Log Message:
initial commit of dsmlgw - updated license to plain old GPLv2 - updated to use axis1.4
Index: BatchProcessor.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/BatchProcessor.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- BatchProcessor.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ BatchProcessor.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: Configuration.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/Configuration.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Configuration.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ Configuration.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
@@ -37,14 +18,16 @@
package com.netscape.dsml.gateway;
import java.io.*;
+import java.net.URLClassLoader;
import java.util.Properties;
-import java.util.logging.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
public class Configuration {
private static Logger logger = Logger.getLogger("com.netscape.dsml.gateway.Configuration");
-
+ private static final String DSMLGWCFG = "dsmlgw.cfg";
+ private static final String DSMLGW_CONFIG_DIR = "DSMLGW_CONFIG_DIR";
private static String propertiesFilename;
- private final static String header = "properties file for the Netscape DSMLGW";
private final static String[][] defaults = new String[][]
{ { "MinPool", "5" },
{ "MaxPool", "10" },
@@ -61,12 +44,77 @@
private static Object lock = new Object();
private static Properties properties = null;
- /** Creates a new instance of Config */
+ /** Gets the file DSMLGWCFG from the
+ * classpath (using the class loader findResource/getResource)
+ * Returns the absolute path if found, or null if not found
+ */
+ private String getCfgFromClassPath() {
+ String filename = null;
+ ClassLoader cl = this.getClass().getClassLoader();
+ if (cl instanceof URLClassLoader) {
+ if (((URLClassLoader) cl).findResource(DSMLGWCFG) != null) {
+ filename = ((URLClassLoader) cl).findResource(DSMLGWCFG).getPath();
+ } else {
+ logger.log( Level.FINE, "Configuration.getCfgFromClassPath: " +
+ "could not find the file " + DSMLGWCFG +
+ " in the class path");
+ }
+ } else {
+ logger.log(Level.FINE, "Configuration.getCfgFromClassPath: " +
+ "the classloader for this class is not a url class loader");
+ }
+
+ return filename;
+ }
+
+ /** Creates a new instance of Config
+ * First, look for the config file in the user's home directory
+ * Next, look for the config file in the DSMLGW_CONFIG_DIR env. var.
+ * Finally, look in the classpath */
private Configuration() {
- propertiesFilename = System.getProperty("user.home","") + System.getProperty("file.separator") + "dsmlgw.cfg";
- logger.log( Level.CONFIG, "using properties filename " + propertiesFilename);
- load();
+ propertiesFilename = System.getProperty("user.home","") +
+ System.getProperty("file.separator") + DSMLGWCFG;
+ logger.log( Level.CONFIG, "trying properties filename " + propertiesFilename);
+ try {
+ load();
+ } catch (FileNotFoundException fnfe) {
+ propertiesFilename = null;
+ }
+ if ((propertiesFilename == null) &&
+ (System.getenv(DSMLGW_CONFIG_DIR) != null)) {
+ propertiesFilename = System.getenv(DSMLGW_CONFIG_DIR) +
+ System.getProperty("file.separator") + DSMLGWCFG;
+ logger.log( Level.CONFIG, "trying properties filename " + propertiesFilename);
+ try {
+ load();
+ } catch (FileNotFoundException fnfe2) {
+ logger.log( Level.CONFIG, "no config file " + propertiesFilename);
+ propertiesFilename = null;
+ }
+ }
+ if (propertiesFilename == null) {
+ propertiesFilename = getCfgFromClassPath();
+ if (propertiesFilename != null) {
+ logger.log( Level.CONFIG, "trying properties filename " + propertiesFilename);
+ try {
+ load();
+ } catch (FileNotFoundException fnfe2) {
+ logger.log( Level.CONFIG, "no config file " + DSMLGWCFG +
+ " found, using defaults");
+ propertiesFilename = null;
+ }
+ } else {
+ logger.log( Level.CONFIG, "Could not find properties file " +
+ DSMLGWCFG + " in classpath" );
+ }
+ }
+ if (propertiesFilename == null) {
+ logger.log( Level.INFO, "config file " + DSMLGWCFG +
+ " not found, using defaults");
+ } else {
+ logger.log( Level.INFO, "using config file " + propertiesFilename);
+ }
}
public static Configuration getInstance() {
@@ -81,7 +129,7 @@
}
- private void load() {
+ private void load() throws FileNotFoundException {
try {
properties = new Properties();
@@ -96,12 +144,12 @@
} catch (java.io.FileNotFoundException e) {
- System.err.println("Can't find properties file: " + propertiesFilename + ". " +
- "Using defaults.");
+ logger.log(Level.WARNING, "Can't find properties file: " + propertiesFilename);
+ throw e;
} catch (java.io.IOException e) {
- System.err.println("Can't read properties file: " + propertiesFilename + ". " +
+ logger.log(Level.SEVERE, "Can't read properties file: " + propertiesFilename + ". " +
"Using defaults.");
}
Index: Constants.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/Constants.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Constants.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ Constants.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: GenericOperation.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/GenericOperation.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- GenericOperation.java 26 Apr 2007 22:28:56 -0000 1.1.1.1
+++ GenericOperation.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: IConnMgrFactoryFunctor.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/IConnMgrFactoryFunctor.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- IConnMgrFactoryFunctor.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ IConnMgrFactoryFunctor.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: IConnectionManager.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/IConnectionManager.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- IConnectionManager.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ IConnectionManager.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: LDAPAuthenticator.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/LDAPAuthenticator.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- LDAPAuthenticator.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ LDAPAuthenticator.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: OperationAdd.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/OperationAdd.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- OperationAdd.java 26 Apr 2007 22:28:56 -0000 1.1.1.1
+++ OperationAdd.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: OperationAuth.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/OperationAuth.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- OperationAuth.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ OperationAuth.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: OperationCompare.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/OperationCompare.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- OperationCompare.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ OperationCompare.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: OperationDelete.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/OperationDelete.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- OperationDelete.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ OperationDelete.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: OperationExtended.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/OperationExtended.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- OperationExtended.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ OperationExtended.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: OperationModify.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/OperationModify.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- OperationModify.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ OperationModify.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: OperationModifyDN.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/OperationModifyDN.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- OperationModifyDN.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ OperationModifyDN.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: OperationSearch.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/OperationSearch.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- OperationSearch.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ OperationSearch.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,41 +11,20 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
* --- END COPYRIGHT BLOCK --- */
package com.netscape.dsml.gateway;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
import netscape.ldap.*;
import org.w3c.dom.*;
-import java.util.logging.*;
-import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Node;
-import org.w3c.dom.traversal.NodeIterator;
-import org.w3c.dom.traversal.DocumentTraversal;
-import org.w3c.dom.traversal.TreeWalker;
import org.w3c.dom.traversal.NodeFilter;
class OperationSearch extends GenericOperation {
@@ -55,7 +34,7 @@
javax.xml.soap.MessageFactory messageFactory = null ;
javax.xml.soap.SOAPFactory sef = null;
private static Logger logger =
- Logger.getLogger("com.netscape.dsml.service.ProxyConnectionManager");
+ Logger.getLogger("com.netscape.dsml.gateway.OperationSearch");
OperationSearch(){
try {
@@ -77,7 +56,6 @@
public javax.xml.soap.SOAPElement getResponse(gatewayContext ctx) {
-
root = ctx.getRootNode();
@@ -240,10 +218,18 @@
ldapConn = ctx.getLdapConnection();
- if (ctx.getConstraints() != null)
- results = ldapConn.search(dn, scope, filterString, attributeList, false, ctx.getConstraints() );
- else
- results = ldapConn.search( dn, scope, filterString, attributeList, false);
+ if (ctx.getLdapConnection() == null) {
+ logger.log(Level.WARNING, "no LDAP connection");
+ results = null;
+ // either we could not connect for some reason (e.g. network problems)
+ // or the LDAP server is down
+ resultCode = netscape.ldap.client.opers.JDAPResult.CONNECT_ERROR;
+ } else if (ctx.getConstraints() != null) {
+ results = ldapConn.search(dn, scope, filterString, attributeList, false,
+ ctx.getConstraints());
+ } else {
+ results = ldapConn.search(dn, scope, filterString, attributeList, false);
+ }
} catch (LDAPException E) {
resultCode = E.getLDAPResultCode();
Index: ParseControl.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/ParseControl.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ParseControl.java 26 Apr 2007 22:28:56 -0000 1.1.1.1
+++ ParseControl.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: ParseFilter.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/ParseFilter.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ParseFilter.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ ParseFilter.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: ParseValue.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/ParseValue.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ParseValue.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ ParseValue.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: ProxyConnMgrFactory.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/ProxyConnMgrFactory.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ProxyConnMgrFactory.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ ProxyConnMgrFactory.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: ProxyConnectionManager.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/ProxyConnectionManager.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ProxyConnectionManager.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ ProxyConnectionManager.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
@@ -38,7 +19,9 @@
import java.lang.Exception ;
import java.util.*;
-import java.util.logging.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
import netscape.ldap.LDAPConnection;
import netscape.ldap.util.ConnectionPool;
import netscape.ldap.LDAPConstraints;
@@ -65,7 +48,7 @@
private static Logger logger =
- Logger.getLogger("com.netscape.dsml.service.ProxyConnectionManager");
+ Logger.getLogger("com.netscape.dsml.gateway.ProxyConnectionManager");
static private ConnectionPool _ldapPool = null;
static private ConnectionPool _ldapLoginPool = null;
static private LDAPConnection _trialConn = null;
Index: gatewayContext.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/gatewayContext.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- gatewayContext.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ gatewayContext.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: gatewayException.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/gatewayException.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- gatewayException.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ gatewayException.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: gatewayHandler.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- gatewayHandler.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ gatewayHandler.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
@@ -37,34 +18,22 @@
package com.netscape.dsml.gateway;
-import java.io.*;
-import java.util.Iterator;
import javax.xml.namespace.QName;
-import javax.xml.parsers.*;
-import javax.xml.rpc.handler.Handler;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.soap.SOAPMessageContext;
-import javax.xml.soap.Name;
+import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPHeaderElement;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPPart;
-import javax.xml.soap.SOAPConstants;
-import javax.xml.transform.*;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import org.w3c.dom.Document;
-import org.xml.sax.*;
-import org.w3c.dom.*;
-import javax.xml.soap.*;
import org.apache.axis.AxisFault;
import org.apache.axis.Message;
import org.apache.axis.MessageContext;
import org.apache.axis.handlers.BasicHandler;
import org.apache.commons.codec.binary.Base64;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
public class gatewayHandler extends BasicHandler {
+ private static Logger logger = Logger.getLogger("com.netscape.dsml.gateway.gatewayHandler");
private HandlerInfo handlerInfo;
static private javax.xml.soap.MessageFactory messageFactory ;
static private javax.xml.soap.SOAPFactory sef ;
@@ -72,18 +41,27 @@
public gatewayHandler() {
super();
+ System.err.println("gatewayHandler.gatewayHandler: logger class " +
+ "is " + logger.getClass().getCanonicalName() +
+ " logger name is " + logger.getName() +
+ " parent class is " + logger.getParent().getClass().getCanonicalName() +
+ " parent name is " + logger.getParent().getName());
+ logger.entering("gatewayHandler", "gatewayHandler");
try {
messageFactory = javax.xml.soap.MessageFactory.newInstance();
sef = javax.xml.soap.SOAPFactory.newInstance();
} catch (Exception e) { }
+ logger.exiting("gatewayHandler", "gatewayHandler");
}
public void invoke(MessageContext context) throws AxisFault {
+ logger.entering("gatewayHandler", "invoke");
if (context.getPastPivot() == false) {
handleRequest(context);
}
+ logger.exiting("gatewayHandler", "invoke");
}
public void cleanup() {
Index: gatewayService.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/gatewayService.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- gatewayService.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ gatewayService.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
15 years, 5 months
[Fedora-directory-commits] dsmlgw/src/com/netscape/dsml/test SOAPClient.java, 1.1.1.1, 1.2 dsmlClient.java, 1.1.1.1, 1.2 dsmlSearch.java, 1.1.1.1, 1.2
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw/src/com/netscape/dsml/test
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22524/dsmlgw/src/com/netscape/dsml/test
Modified Files:
SOAPClient.java dsmlClient.java dsmlSearch.java
Log Message:
initial commit of dsmlgw - updated license to plain old GPLv2 - updated to use axis1.4
Index: SOAPClient.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/test/SOAPClient.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- SOAPClient.java 26 Apr 2007 22:28:54 -0000 1.1.1.1
+++ SOAPClient.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
Index: dsmlClient.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/test/dsmlClient.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dsmlClient.java 26 Apr 2007 22:28:55 -0000 1.1.1.1
+++ dsmlClient.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,35 +11,14 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
* --- END COPYRIGHT BLOCK --- */
package com.netscape.dsml.test;
-import javax.xml.parsers.*;
import org.w3c.dom.*;
import org.w3c.dom.traversal.*;
-import org.xml.sax.SAXException;
import java.io.IOException;
import java.io.File;
Index: dsmlSearch.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/test/dsmlSearch.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dsmlSearch.java 26 Apr 2007 22:28:54 -0000 1.1.1.1
+++ dsmlSearch.java 18 Apr 2008 16:43:39 -0000 1.2
@@ -11,25 +11,6 @@
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
15 years, 5 months
[Fedora-directory-commits] dsmlgw/misc dsmlgw-deploy.wsdd, NONE, 1.1 fedora-ds-dsmlgw.spec, NONE, 1.1 log4j.properties, NONE, 1.1 logging.properties, NONE, 1.1 dsmlgw.cfg, 1.1.1.1, 1.2 server-config.wsdd, 1.1.1.1, 1.2
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw/misc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22524/dsmlgw/misc
Modified Files:
dsmlgw.cfg server-config.wsdd
Added Files:
dsmlgw-deploy.wsdd fedora-ds-dsmlgw.spec log4j.properties
logging.properties
Log Message:
initial commit of dsmlgw - updated license to plain old GPLv2 - updated to use axis1.4
--- NEW FILE dsmlgw-deploy.wsdd ---
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="dsmlgw" provider="Handler">
<parameter name="handlerClass" value="com.netscape.dsml.gateway.gatewayHandler"/>
</service>
</deployment>
--- NEW FILE fedora-ds-dsmlgw.spec ---
%define major_version 1.1
%define minor_version 0
%define pkgname dirsrv
%define shortname dsmlgw
Name: fedora-ds-dsmlgw
Version: %{major_version}.%{minor_version}
Release: 1%{?dist}
Summary: Fedora Directory Server DSML Gateway
Group: Applications/System
License: GPLv2
URL: http://directory.fedoraproject.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Source: http://directory.fedoraproject.org/sources/%{name}-%{version}.tar.bz2
Requires: java-1.7.0-icedtea
BuildRequires: java-1.7.0-icedtea-devel
BuildRequires: ant >= 1.6.2
BuildRequires: ldapjdk
BuildRequires: axis
BuildRequires: jakarta-commons-codec
BuildRequires: classpathx-jaf
%description
A DSML to LDAP gateway. The application runs as a Java web application.
The application is a DSMLv2 service that translates incoming DSMLv2
requests into LDAP and sends the requests to an LDAP server, gets the
LDAP response, and translates that back into a DSMLv2 response. The jar
file includes classes that can be used for command line utilities:
* dsmlClient
* dsmlSearch
* LDIF2DSML - converts LDIF files to DSML format
* DSML2LDIF - converts DSML to LDIF format
%prep
%setup -q
%build
%{ant} \
-Dglobaldist.dir=%{_javadir} \
-Dldapdist.dir=%{_javadir} \
-Daxis.dir=%{_javadir}/axis \
-Dbuild.dir=`pwd`/built \
-Ddist.dir=`pwd`/built
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_javadir}
install -m644 built/%{shortname}.jar $RPM_BUILD_ROOT%{_javadir}/%{shortname}-%{version}.jar
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/data
install -m644 dsml/*.dsml $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/data
# create symlinks
pushd $RPM_BUILD_ROOT%{_javadir}
ln -s %{shortname}-%{version}.jar %{shortname}-%{major_version}.jar
ln -s %{shortname}-%{version}.jar %{shortname}.jar
popd
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc LICENSE
%{_javadir}/%{shortname}-%{version}.jar
%{_javadir}/%{shortname}-%{major_version}.jar
%{_javadir}/%{shortname}.jar
%{_datadir}/%{pkgname}/data/*.dsml
%changelog
* Mon Apr 7 2008 Rich Megginson <rmeggins(a)redhat.com> 1.1.0-1
- Initial creation
--- NEW FILE log4j.properties ---
# axis uses log4j - these are the log settings for axis
# Set root category priority to INFO and its only appender to CONSOLE.
#log4j.rootCategory=INFO, CONSOLE
log4j.rootCategory=INFO, CONSOLE, LOGFILE
# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=${catalina.base}/logs/axis.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.Threshold=INFO
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d %-4r [%t] %-5p %c %x - %m%n
--- NEW FILE logging.properties ---
# we write logs to files and to the console
handlers = org.apache.juli.FileHandler,java.util.logging.ConsoleHandler
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
# log INFO level and higher to log file
org.apache.juli.FileHandler.level = INFO
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = dsmlgw.
org.apache.juli.FileHandler.formatter = java.util.logging.SimpleFormatter
# log WARNING level and higher to console (catalina.out using Tomcat)
java.util.logging.ConsoleHandler.level = WARNING
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
# you can set gateway and class level debugging
#com.netscape.dsml.gateway.level = INFO
#com.netscape.dsml.gateway.gatewayHandler.level = FINER
#com.netscape.dsml.gateway.Configuration.level = FINEST
Index: dsmlgw.cfg
===================================================================
RCS file: /cvs/dirsec/dsmlgw/misc/dsmlgw.cfg,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dsmlgw.cfg 26 Apr 2007 22:29:03 -0000 1.1.1.1
+++ dsmlgw.cfg 18 Apr 2008 16:43:38 -0000 1.2
@@ -11,25 +11,6 @@
# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA.
#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
#
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
Index: server-config.wsdd
===================================================================
RCS file: /cvs/dirsec/dsmlgw/misc/server-config.wsdd,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- server-config.wsdd 26 Apr 2007 22:29:03 -0000 1.1.1.1
+++ server-config.wsdd 18 Apr 2008 16:43:38 -0000 1.2
@@ -12,25 +12,6 @@
this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA.
- In addition, as a special exception, Red Hat, Inc. gives You the additional
- right to link the code of this Program with code not covered under the GNU
- General Public License ("Non-GPL Code") and to distribute linked combinations
- including the two, subject to the limitations in this paragraph. Non-GPL Code
- permitted under this exception must only link to the code of this Program
- through those well defined interfaces identified in the file named EXCEPTION
- found in the source code files (the "Approved Interfaces"). The files of
- Non-GPL Code may instantiate templates or use macros or inline functions from
- the Approved Interfaces without causing the resulting work to be covered by
- the GNU General Public License. Only Red Hat, Inc. may make changes or
- additions to the list of Approved Interfaces. You must obey the GNU General
- Public License in all respects for all of the Program code and other code used
- in conjunction with the Program except the Non-GPL Code covered by this
- exception. If you modify this file, you may extend this exception to your
- version of the file, but you are not obligated to do so. If you do not wish to
- provide this exception without modification, you must delete this exception
- statement from your version and license this file solely under the GPL without
- exception.
-
Copyright (C) 2005 Red Hat, Inc.
All rights reserved.
15 years, 5 months
[Fedora-directory-commits] dsmlgw/dsml European.dsml, 1.1.1.1, 1.2 Example-roles.dsml, 1.1.1.1, 1.2 Example.dsml, 1.1.1.1, 1.2
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw/dsml
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22524/dsmlgw/dsml
Modified Files:
European.dsml Example-roles.dsml Example.dsml
Log Message:
initial commit of dsmlgw - updated license to plain old GPLv2 - updated to use axis1.4
Index: European.dsml
===================================================================
RCS file: /cvs/dirsec/dsmlgw/dsml/European.dsml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- European.dsml 26 Apr 2007 22:29:01 -0000 1.1.1.1
+++ European.dsml 18 Apr 2008 16:43:38 -0000 1.2
@@ -12,25 +12,6 @@
this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA.
- In addition, as a special exception, Red Hat, Inc. gives You the additional
- right to link the code of this Program with code not covered under the GNU
- General Public License ("Non-GPL Code") and to distribute linked combinations
- including the two, subject to the limitations in this paragraph. Non-GPL Code
- permitted under this exception must only link to the code of this Program
- through those well defined interfaces identified in the file named EXCEPTION
- found in the source code files (the "Approved Interfaces"). The files of
- Non-GPL Code may instantiate templates or use macros or inline functions from
- the Approved Interfaces without causing the resulting work to be covered by
- the GNU General Public License. Only Red Hat, Inc. may make changes or
- additions to the list of Approved Interfaces. You must obey the GNU General
- Public License in all respects for all of the Program code and other code used
- in conjunction with the Program except the Non-GPL Code covered by this
- exception. If you modify this file, you may extend this exception to your
- version of the file, but you are not obligated to do so. If you do not wish to
- provide this exception without modification, you must delete this exception
- statement from your version and license this file solely under the GPL without
- exception.
-
Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
Copyright (C) 2005 Red Hat, Inc.
Index: Example-roles.dsml
===================================================================
RCS file: /cvs/dirsec/dsmlgw/dsml/Example-roles.dsml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Example-roles.dsml 26 Apr 2007 22:29:03 -0000 1.1.1.1
+++ Example-roles.dsml 18 Apr 2008 16:43:38 -0000 1.2
@@ -12,25 +12,6 @@
this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA.
- In addition, as a special exception, Red Hat, Inc. gives You the additional
- right to link the code of this Program with code not covered under the GNU
- General Public License ("Non-GPL Code") and to distribute linked combinations
- including the two, subject to the limitations in this paragraph. Non-GPL Code
- permitted under this exception must only link to the code of this Program
- through those well defined interfaces identified in the file named EXCEPTION
- found in the source code files (the "Approved Interfaces"). The files of
- Non-GPL Code may instantiate templates or use macros or inline functions from
- the Approved Interfaces without causing the resulting work to be covered by
- the GNU General Public License. Only Red Hat, Inc. may make changes or
- additions to the list of Approved Interfaces. You must obey the GNU General
- Public License in all respects for all of the Program code and other code used
- in conjunction with the Program except the Non-GPL Code covered by this
- exception. If you modify this file, you may extend this exception to your
- version of the file, but you are not obligated to do so. If you do not wish to
- provide this exception without modification, you must delete this exception
- statement from your version and license this file solely under the GPL without
- exception.
-
Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
Copyright (C) 2005 Red Hat, Inc.
Index: Example.dsml
===================================================================
RCS file: /cvs/dirsec/dsmlgw/dsml/Example.dsml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Example.dsml 26 Apr 2007 22:28:57 -0000 1.1.1.1
+++ Example.dsml 18 Apr 2008 16:43:38 -0000 1.2
@@ -12,25 +12,6 @@
this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA.
- In addition, as a special exception, Red Hat, Inc. gives You the additional
- right to link the code of this Program with code not covered under the GNU
- General Public License ("Non-GPL Code") and to distribute linked combinations
- including the two, subject to the limitations in this paragraph. Non-GPL Code
- permitted under this exception must only link to the code of this Program
- through those well defined interfaces identified in the file named EXCEPTION
- found in the source code files (the "Approved Interfaces"). The files of
- Non-GPL Code may instantiate templates or use macros or inline functions from
- the Approved Interfaces without causing the resulting work to be covered by
- the GNU General Public License. Only Red Hat, Inc. may make changes or
- additions to the list of Approved Interfaces. You must obey the GNU General
- Public License in all respects for all of the Program code and other code used
- in conjunction with the Program except the Non-GPL Code covered by this
- exception. If you modify this file, you may extend this exception to your
- version of the file, but you are not obligated to do so. If you do not wish to
- provide this exception without modification, you must delete this exception
- statement from your version and license this file solely under the GPL without
- exception.
-
Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
Copyright (C) 2005 Red Hat, Inc.
15 years, 5 months
[Fedora-directory-commits] dsmlgw LICENSE, NONE, 1.1 build.properties, NONE, 1.1 build.xml, 1.1.1.1, 1.2 Makefile, 1.1.1.1, NONE
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22524/dsmlgw
Modified Files:
build.xml
Added Files:
LICENSE build.properties
Removed Files:
Makefile
Log Message:
initial commit of dsmlgw - updated license to plain old GPLv2 - updated to use axis1.4
--- NEW FILE LICENSE ---
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
--- NEW FILE build.properties ---
axisbin.url=http://apache.mirrors.tds.net/ws/axis/1_4/
#axisbin.dir=/path/to/
axisbin.tgz=axis-bin-1_4.tar.gz
axisbin.tar=axis-bin-1_4.tar
axisname=axis-1_4
#havelocalaxisbin=true
Index: build.xml
===================================================================
RCS file: /cvs/dirsec/dsmlgw/build.xml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- build.xml 26 Apr 2007 22:28:54 -0000 1.1.1.1
+++ build.xml 18 Apr 2008 16:43:38 -0000 1.2
@@ -12,99 +12,143 @@
this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA.
- In addition, as a special exception, Red Hat, Inc. gives You the additional
- right to link the code of this Program with code not covered under the GNU
- General Public License ("Non-GPL Code") and to distribute linked combinations
- including the two, subject to the limitations in this paragraph. Non-GPL Code
- permitted under this exception must only link to the code of this Program
- through those well defined interfaces identified in the file named EXCEPTION
- found in the source code files (the "Approved Interfaces"). The files of
- Non-GPL Code may instantiate templates or use macros or inline functions from
- the Approved Interfaces without causing the resulting work to be covered by
- the GNU General Public License. Only Red Hat, Inc. may make changes or
- additions to the list of Approved Interfaces. You must obey the GNU General
- Public License in all respects for all of the Program code and other code used
- in conjunction with the Program except the Non-GPL Code covered by this
- exception. If you modify this file, you may extend this exception to your
- version of the file, but you are not obligated to do so. If you do not wish to
- provide this exception without modification, you must delete this exception
- statement from your version and license this file solely under the GPL without
- exception.
-
-
Copyright (C) 2005 Red Hat, Inc.
All rights reserved.
END COPYRIGHT BLOCK -->
<!-- ANT build script for the new dsml gateway -->
-<!-- Possible to compile by hand, use
- cd /ldapserver/ldap/clients/dsmlgw
- ant -Dxerces=../../../../dist/classes/jakarta-tomcat-5.0.27/common/endorsed
- -->
<project name="dsmlgw" default="dist" basedir=".">
-<!-- ******************** Adjustable Properties *********************** -->
-<property name="mcom.root" value="../../.."/>
-<property name="globaldist.dir" value="${mcom.root}/../dist/classes"/>
-<property name="ldapdist.dir" value="${mcom.root}/../dist/classes"/>
-<property name="app.name" value="dsmlgw"/>
-<property name="taglib.name" value="dsmlgw"/>
-
-<property name="ldapjdk.jar" value="${ldapdist.dir}/ldapjdk.jar"/>
-<property name="activation.jar" value="${globaldist.dir}/activation.jar"/>
-<property name="jaf.jar" value="${globaldist.dir}/jaf.jar"/>
-<property name="jaxrpc-api.jar" value="${globaldist.dir}/jaxrpc-api.jar"/>
-<property name="jaxrpc.jar" value="${globaldist.dir}/jaxrpc.jar"/>
-<property name="saaj.jar" value="${globaldist.dir}/saaj.jar"/>
-<property name="xercesImpl.jar" value="${globaldist.dir}/xercesImpl.jar"/>
-<property name="xmlParserAPIs.jar" value="${globaldist.dir}/xml-apis.jar"/>
-<property name="axis.jar" value="${globaldist.dir}/axis.jar"/>
-<property name="codec.jar" value="${globaldist.dir}/jakarta-commons-codec.jar"/>
-<property environment="env"/>
-
-<path id="class.path">
-<pathelement location="${ldapjdk.jar}"/>
-<pathelement location="${activation.jar}"/>
-<pathelement location="${jaf.jar}"/>
-<pathelement location="${jaxrpc-api.jar}"/>
-<pathelement location="${jaxrpc.jar}"/>
-<pathelement location="${saaj.jar}"/>
-
-<pathelement location="${xercesImpl.jar}"/>
-<pathelement location="${xmlParserAPIs.jar}"/>
-<pathelement location="${axis.jar}"/>
-<pathelement location="${codec.jar}"/>
-</path>
-
-<property name="build.dir" value="${mcom.root}/built/dsmlgw"/>
-<property name="dist.dir" value="${mcom.root}/../dist/dsmlgw"/>
-
-
+ <property file="build.properties" />
-<target name="prepare" description="prepares the output directories">
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${dist.dir}"/>
-</target>
-
-<target name="library" depends="classpath,prepare" description="builds it">
-<javac srcdir="." destdir="${build.dir}" classpathref="class.path" debug="on"/>
-</target>
-
-
- <!-- Create the library distribution files -->
-<target name="dist" depends="classpath,library" description="makes the distribution">
- <jar jarfile="${dist.dir}/dsmlgw.jar" basedir="${build.dir}"/>
-
- </target>
-
- <target name="clean" description="makes clean">
- <delete dir="${build.dir}"/>
- <delete dir="${dist.dir}"/>
- </target>
-
-<property name="classpath" refid="class.path"/>
- <target name="classpath">
- <echo message="${classpath}"/>
- </target>
+ <!-- ******************** Adjustable Properties *********************** -->
+ <property name="globaldist.dir" location="/usr/share/java" />
+ <property name="ldapdist.dir" location="/usr/share/java" />
+
+ <!-- If using the binary distribution of axis 1.4, the axisdist.dir
+ will be /path/to/axis-1_4 and the lib dir is the "lib" dir
+ under that - use -Daxisbinpkg=true -Daxisdist.dir=/path/to/axis-1_4
+ on the command line - otherwise, it will default to using
+ /usr/share/java and /usr/share/java/axis
+ -->
+ <property name="axisdist.dir" location="/usr/share/java/axis" />
+ <property name="axis.lib.dir" location="/usr/share/java/axis" />
+
+ <!-- These are the jars needed for building - the first 3 are usually
+ found in the ${axis.home}/lib directory from the binary distribution
+ -->
+ <property name="saaj.jar" location="${axis.lib.dir}/saaj.jar" />
+ <property name="jaxrpc.jar" location="${axis.lib.dir}/jaxrpc.jar" />
+ <property name="axis.jar" location="${axis.lib.dir}/axis.jar" />
+ <property name="ldapjdk.jar" location="${ldapdist.dir}/ldapjdk.jar" />
+ <property name="activation.jar" location="${globaldist.dir}/activation.jar" />
+ <property name="codec.jar" location="${globaldist.dir}/jakarta-commons-codec.jar" />
+
+ <!-- These are the jars needed at run time, in addition to the ones
+ above needed for building
+ -->
+ <property name="mail.jar" location="${globaldist.dir}/mail.jar" />
+
+ <property environment="env" />
+
+ <path id="class.path">
+ <pathelement location="${ldapjdk.jar}" />
+ <pathelement location="${saaj.jar}" />
+ <pathelement location="${axis.jar}" />
+ <pathelement location="${codec.jar}" />
+ <pathelement location="${activation.jar}" />
+ <pathelement location="${jaxrpc.jar}" />
+ </path>
+
+ <!-- place to write class files and other transient files
+ generated during build process -->
+ <property name="build.dir" value="${mcom.root}/built/dsmlgw" />
+ <!-- place to write final jar file and webapps files/dirs -->
+ <property name="dist.dir" value="${mcom.root}/../dist/dsmlgw" />
+ <!-- see if we are using the binary axis package and if it is local -->
+ <available file="${axisdist.dir}/webapps/axis" type="dir"
+ property="haveaxisbinpkg"/>
+ <available file="${axisdist.dir}" type="dir"
+ property="havelocalaxisbin"/>
+
+ <target name="help" description="get help">
+ <echo>
+There are 6 jar files required to build ${ant.project.name}, specified
+by the following properties:
+ ldapjdk.jar - the Mozilla LDAP Java SDK
+ codec.jar - the Jakarta Commons codec
+ activation.jar - the Java Activation Framework - Sun or Classpathx
+These 3 are provided by Axis:
+ axis.jar, saaj.jar, jaxrpc.jar
+
+On many linux systems, all of these jars are available in /usr/share/java
+or whatever the java datadir is. Axis is usually provided in the axis
+subdir of this.
+
+If you want to build using the axis binary distribution from ws.apache.org/axis,
+download and unpack it. The top level directory will be axis-1_4. The two main
+subdirs that ${ant.project.name} requires are "lib" and "webapps". lib is needed
+during building, to find the axis jars listed above. webapps is used in packaging
+the ${ant.project.name} as a standard web app or WAR. In order to use the binary
+distribution, you must specify the properties on the command line like this:
+-Daxisdist.dir=/path/to/axis-1_4 -Daxis.lib.dir=/path/to/axis-1_4/lib
+ </echo>
+ </target>
+
+ <target name="unzipaxisbinlocal" description="unzip a local axis bin tgz" if="havelocalaxisbin">
+ <gunzip dest="${dist.dir}/${axisbin.tar}" src="${axisbin.dir}/${axisbin.tgz}" />
+ </target>
+
+ <target name="unzipaxisbinremote" description="download and unzip a remote axis bin tgz" unless="havelocalaxisbin">
+ <get dest="${dist.dir}/${axisbin.tgz}" src="${axisbin.url}${axisbin.tgz}" verbose="true" usetimestamp="true" />
+ <gunzip dest="${dist.dir}/${axisbin.tar}" src="${dist.dir}/${axisbin.tgz}" />
+ </target>
+
+ <!-- the useaxisbinpkg target is based on the package
+ axis-bin-1_4.tar.gz available from ws.apache.org download -->
+ <target name="useaxisbinpkg" description="extract the webapps part of the binary axis tgz" if="haveaxisbinpkg" depends="unzipaxisbinlocal,unzipaxisbinremote">
+ <untar src="${dist.dir}/${axisbin.tar}" dest="${dist.dir}">
+ <patternset>
+ <include name="${axisname}/webapps/axis/**" />
+ </patternset>
+ </untar>
+ <move file="${dist.dir}/${axisname}/webapps" todir="${dist.dir}" />
+ <delete dir="${dist.dir}/${axisname}" />
+ <delete file="${dist.dir}/${axisbin.tar}" />
+ </target>
+
+ <target name="mkwebappsdirs" description="make the webapps directory layout"
+ unless="haveaxisbinpkg">
+ <mkdir dir="${dist.dir}/webapps/axis/WEB-INF/lib" />
+ <mkdir dir="${dist.dir}/webapps/axis/WEB-INF/classes" />
+ </target>
+
+ <target name="pkgwebapp" description="create the webapps layout, prepare for WAR" depends="dist,useaxisbinpkg,mkwebappsdirs">
+ </target>
+
+ <target name="prepare" description="prepares the output directories">
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${dist.dir}" />
+ </target>
+
+ <target name="library" depends="classpath,prepare" description="builds it">
+ <javac srcdir="." destdir="${build.dir}" classpathref="class.path" debug="on" />
+ </target>
+
+
+ <!-- Create the library distribution files -->
+ <target name="dist" depends="classpath,library" description="makes the distribution">
+ <jar jarfile="${dist.dir}/dsmlgw.jar" basedir="${build.dir}" />
+ </target>
+
+ <target name="clean" description="makes clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${dist.dir}" />
+ </target>
+
+ <property name="classpath" refid="class.path" />
+ <target name="classpath">
+ <echo message="${classpath}" />
+ </target>
</project>
--- Makefile DELETED ---
15 years, 5 months