[Fedora-directory-commits] dsgw Makefile.am, 1.7, 1.8 auth.c, 1.2, 1.3 config.c, 1.4, 1.5 configure.ac, 1.6, 1.7 csearch.c, 1.2, 1.3 doauth.c, 1.2, 1.3 domodify.c, 1.1.1.1, 1.2 dsgw-httpd.conf.in, 1.4, 1.5 dsgwgetlang.c, 1.3, 1.4 dsgwutil.c, 1.5, 1.6 edit.c, 1.2, 1.3 emitauth.c, 1.1.1.1, 1.2 entrydisplay.c, 1.2, 1.3 ldaputil.c, 1.1.1.1, 1.2 setup.in, 1.2, 1.3 aclocal.m4, 1.4, 1.5 configure, 1.7, 1.8 missing, 1.3, 1.4 install-sh, 1.3, 1.4 Makefile.in, 1.7, 1.8 depcomp, 1.3, 1.4 config.sub, 1.3, 1.4 config.guess, 1.3, 1.4 compile, 1.3, 1.4
Richard Allen Megginson (rmeggins)
fedora-directory-commits at redhat.com
Mon Jan 28 21:22:50 UTC 2008
Author: rmeggins
Update of /cvs/dirsec/dsgw
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24762/dsgw
Modified Files:
Makefile.am auth.c config.c configure.ac csearch.c doauth.c
domodify.c dsgw-httpd.conf.in dsgwgetlang.c dsgwutil.c edit.c
emitauth.c entrydisplay.c ldaputil.c setup.in aclocal.m4
configure missing install-sh Makefile.in depcomp config.sub
config.guess compile
Log Message:
get phonebook and orgchart working; use memmove instead of overlapping strcpy; fix memory error in dsgw_dn_parent
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/dsgw/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile.am 16 Jan 2008 22:56:02 -0000 1.7
+++ Makefile.am 28 Jan 2008 21:22:47 -0000 1.8
@@ -150,7 +150,7 @@
orghtml/branch-cc1.gif orghtml/index.html orghtml/ldap-person.gif \
orghtml/mag.gif orghtml/mail.gif orghtml/new-branch-blank.gif \
orghtml/new-branch-first.gif orghtml/new-branch-straight.gif orghtml/orgicon.gif \
- orghtml/styles.css orghtml/topframe.html
+ orghtml/styles.css orghtml/topframe.html orghtml/starthelp.gif orghtml/orgchart.tmpl
dist_config_DATA = \
@@ -253,9 +253,9 @@
-e 's, at localstatedir\@,$(localstatedir),g' \
-e 's, at cgibindir\@,$(cgibindir),g' \
-e 's, at cgiuri\@,$(cgiuri),g' \
- -e 's, at orguri\@,$(orguri),g' \
- -e 's, at dsgwuri\@,$(dsgwuri),g' \
- -e 's, at pburi\@,$(pburi),g' \
+ -e 's, at orguri\@, at orguri@,g' \
+ -e 's, at dsgwuri\@, at dsgwuri@,g' \
+ -e 's, at pburi\@, at pburi@,g' \
-e 's, at cmdbindir\@,$(cmdbindir),g' \
-e 's, at propertydir\@,$(propertydir),g' \
-e 's, at htmldir\@,$(htmldir),g' \
Index: auth.c
===================================================================
RCS file: /cvs/dirsec/dsgw/auth.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- auth.c 14 Jan 2008 22:58:30 -0000 1.2
+++ auth.c 28 Jan 2008 21:22:47 -0000 1.3
@@ -122,3 +122,11 @@
dsgw_emit_auth_form( binddn );
}
+
+/*
+ emacs settings
+ Local Variables:
+ indent-tabs-mode: t
+ tab-width: 8
+ End:
+*/
Index: config.c
===================================================================
RCS file: /cvs/dirsec/dsgw/config.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- config.c 14 Jan 2008 22:58:30 -0000 1.4
+++ config.c 28 Jan 2008 21:22:47 -0000 1.5
@@ -192,6 +192,11 @@
gc->gc_ClientLanguage = p;
}
+ /* set languages for string database */
+ SetLanguage(CLIENT_LANGUAGE,gc->gc_ClientLanguage);
+ SetLanguage(ADMIN_LANGUAGE,gc->gc_AdminLanguage);
+ SetLanguage(DEFAULT_LANGUAGE,gc->gc_DefaultLanguage);
+
/* Set rest of config. by reading the appropriate config files */
path = dsgw_ch_malloc( MAXPATHLEN );
@@ -1064,6 +1069,7 @@
tmp = next;
for ( inquote = 0; *next; ) {
+ size_t nextlen;
switch ( *next ) {
case '"':
if ( inquote ) {
@@ -1071,12 +1077,14 @@
} else {
inquote = 1;
}
- strcpy( next, next + 1 );
+ nextlen = strlen(next); /* to include trailing null */
+ memmove( next, next + 1, nextlen );
break;
#ifndef _WIN32
case '\\':
- strcpy( next, next + 1 );
+ nextlen = strlen(next); /* to include trailing null */
+ memmove( next, next + 1, nextlen );
break;
#endif
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/dsgw/configure.ac,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- configure.ac 16 Jan 2008 22:56:02 -0000 1.6
+++ configure.ac 28 Jan 2008 21:22:47 -0000 1.7
@@ -287,8 +287,8 @@
# URIs
cgiuri=/cgi-bin
dsgwuri=/dsgw
-orguri=/orgchart
-pburi=/dsgw/pbhtml
+orguri=/org
+pburi=/pb
# Check for library dependencies
m4_include(m4/nspr.m4)
Index: csearch.c
===================================================================
RCS file: /cvs/dirsec/dsgw/csearch.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- csearch.c 14 Jan 2008 22:58:30 -0000 1.2
+++ csearch.c 28 Jan 2008 21:22:47 -0000 1.3
@@ -330,3 +330,11 @@
}
fclose (html);
}
+
+/*
+ emacs settings
+ Local Variables:
+ indent-tabs-mode: t
+ tab-width: 8
+ End:
+*/
Index: doauth.c
===================================================================
RCS file: /cvs/dirsec/dsgw/doauth.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- doauth.c 15 Jan 2008 18:23:43 -0000 1.2
+++ doauth.c 28 Jan 2008 21:22:47 -0000 1.3
@@ -420,6 +420,6 @@
emacs settings
Local Variables:
indent-tabs-mode: t
- tab-width: 4
+ tab-width: 8
End:
*/
Index: domodify.c
===================================================================
RCS file: /cvs/dirsec/dsgw/domodify.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- domodify.c 1 Jun 2006 19:43:47 -0000 1.1.1.1
+++ domodify.c 28 Jan 2008 21:22:47 -0000 1.2
@@ -1041,3 +1041,11 @@
return( rc );
}
+
+/*
+ emacs settings
+ Local Variables:
+ indent-tabs-mode: t
+ tab-width: 8
+ End:
+*/
Index: dsgw-httpd.conf.in
===================================================================
RCS file: /cvs/dirsec/dsgw/dsgw-httpd.conf.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dsgw-httpd.conf.in 14 Jan 2008 22:58:30 -0000 1.4
+++ dsgw-httpd.conf.in 28 Jan 2008 21:22:47 -0000 1.5
@@ -32,6 +32,7 @@
# URI aliases for html content
Alias @dsgwuri@ @htmldir@
+Alias @pburi@ @pbhtmldir@
Alias @orguri@ @orghtmldir@
# legacy mappings
@@ -39,6 +40,7 @@
Alias /clients/dsgw/pbhtml @pbhtmldir@
Alias /clients/dsgw/config @configdir@
Alias /clients/dsgw/pbconfig @pbconfigdir@
+Alias /clients/orgchart/html @orghtmldir@
# Allow access to the dsgw html files
<Directory "@htmldir@">
Index: dsgwgetlang.c
===================================================================
RCS file: /cvs/dirsec/dsgw/dsgwgetlang.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dsgwgetlang.c 14 Jan 2008 22:58:30 -0000 1.3
+++ dsgwgetlang.c 28 Jan 2008 21:22:47 -0000 1.4
@@ -111,11 +111,11 @@
the current language setting.
*********************************************************************/
-static char emptyString[] = "";
+static char *emptyString = "";
-static char client_language[128] = "en";
-static char admin_language[128] = "en";
-static char default_language[128] = "en";
+static char *client_language;
+static char *admin_language;
+static char *default_language;
PR_IMPLEMENT( void )
SetLanguage(int type, char *language)
@@ -123,15 +123,15 @@
switch(type) {
case CLIENT_LANGUAGE:
if (language)
- strcpy(client_language, language);
+ client_language = PL_strdup(language);
break;
case ADMIN_LANGUAGE:
if (language)
- strcpy(admin_language, language);
+ admin_language = PL_strdup(language);
break;
case DEFAULT_LANGUAGE:
if (language)
- strcpy(default_language, language);
+ default_language = PL_strdup(language);
break;
}
return ;
@@ -328,19 +328,19 @@
PR_IMPLEMENT( char * )
XP_GetClientStr(int key)
{
- static char staticbuf[256];
+ static char staticbuf[256] = {0};
static char *resstring = staticbuf;
static size_t bufsize = sizeof(staticbuf);
int rc = 0;
char keybuf[256];
+ char *lang = GetClientLanguage();
PR_snprintf(keybuf, sizeof(keybuf), "%s%d", database_name, key);
-
- resstring = res_getstring(i18nResource, keybuf, GetClientLanguage(),
+ resstring = res_getstring(i18nResource, keybuf, lang,
resstring, bufsize, &rc);
if (rc == 1) { /* need more room */
/* NULL means res_getstring will calculate and return needed memory */
- resstring = res_getstring(i18nResource, keybuf, GetClientLanguage(),
+ resstring = res_getstring(i18nResource, keybuf, lang,
NULL, bufsize, &rc);
bufsize = strlen(resstring);
}
@@ -352,4 +352,8 @@
{
database_name = strdup(dbname);
i18nResource = res_init_resource(path, NULL);
+ /* set default languages for string database */
+ SetLanguage(CLIENT_LANGUAGE, "");
+ SetLanguage(ADMIN_LANGUAGE, "");
+ SetLanguage(DEFAULT_LANGUAGE, "");
}
Index: dsgwutil.c
===================================================================
RCS file: /cvs/dirsec/dsgw/dsgwutil.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dsgwutil.c 15 Jan 2008 18:23:43 -0000 1.5
+++ dsgwutil.c 28 Jan 2008 21:22:47 -0000 1.6
@@ -95,10 +95,6 @@
/* initialize the string database */
XP_InitStringDatabase(PROPERTYDIR, "dsgw");
- /* set default default languages for string database */
- SetLanguage(CLIENT_LANGUAGE, "");
- SetLanguage(ADMIN_LANGUAGE, "");
- SetLanguage(DEFAULT_LANGUAGE, "");
if (( progname = strchr( argv[0], '/' )) == NULL ) {
progname = dsgw_ch_strdup( argv[0] );
@@ -178,11 +174,6 @@
}
}
- /* set languages for string database */
- SetLanguage(CLIENT_LANGUAGE,gc->gc_ClientLanguage);
- SetLanguage(ADMIN_LANGUAGE,gc->gc_AdminLanguage);
- SetLanguage(DEFAULT_LANGUAGE,gc->gc_DefaultLanguage);
-
/* Figure out the language that libsi18n is using */
figure_out_langwich();
Index: edit.c
===================================================================
RCS file: /cvs/dirsec/dsgw/edit.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- edit.c 14 Jan 2008 22:58:30 -0000 1.2
+++ edit.c 28 Jan 2008 21:22:47 -0000 1.3
@@ -240,12 +240,10 @@
ldap_unbind( ld );
}
-
-
-
-
-
-
-
-
-
+/*
+ emacs settings
+ Local Variables:
+ indent-tabs-mode: t
+ tab-width: 8
+ End:
+*/
Index: emitauth.c
===================================================================
RCS file: /cvs/dirsec/dsgw/emitauth.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- emitauth.c 1 Jun 2006 19:43:44 -0000 1.1.1.1
+++ emitauth.c 28 Jan 2008 21:22:47 -0000 1.2
@@ -326,9 +326,10 @@
}
}
-
-
-
-
-
-
+/*
+ emacs settings
+ Local Variables:
+ indent-tabs-mode: t
+ tab-width: 8
+ End:
+*/
Index: entrydisplay.c
===================================================================
RCS file: /cvs/dirsec/dsgw/entrydisplay.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- entrydisplay.c 15 Jan 2008 18:23:43 -0000 1.2
+++ entrydisplay.c 28 Jan 2008 21:22:47 -0000 1.3
@@ -3199,3 +3199,11 @@
return( (char *) obuf);
}
+
+/*
+ emacs settings
+ Local Variables:
+ indent-tabs-mode: t
+ tab-width: 8
+ End:
+*/
Index: ldaputil.c
===================================================================
RCS file: /cvs/dirsec/dsgw/ldaputil.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ldaputil.c 1 Jun 2006 19:43:43 -0000 1.1.1.1
+++ ldaputil.c 28 Jan 2008 21:22:47 -0000 1.2
@@ -1153,22 +1153,28 @@
char *dnp;
int i;
char **rdns;
+ size_t len;
- if ( dn == NULL ) {
+ if ( dn == NULL || !*dn ) {
return( NULL );
}
- dnp = dsgw_ch_malloc( strlen( dn ));
+ len = strlen(dn);
+ dnp = dsgw_ch_malloc( len );
dnp[ 0 ] = '\0';
if (( rdns = ldap_explode_dn( dn, 0 )) == NULL ) {
+ free(dnp);
return NULL;
}
- for ( i = 1; rdns[ i ] != NULL; i++ ) {
+ for ( i = 1; (rdns[0] != NULL) && (rdns[ i ] != NULL); i++ ) {
strcat( dnp, rdns[ i ] );
strcat( dnp, "," );
}
/* Get rid of the trailing "," we just appended */
- dnp[ strlen( dnp ) - 1 ] = '\0';
+ len = strlen(dnp);
+ if (len > 0) {
+ dnp[ len - 1 ] = '\0';
+ }
ldap_value_free( rdns );
return( dnp );
}
@@ -1566,3 +1572,11 @@
}
}
}
+
+/*
+ emacs settings
+ Local Variables:
+ indent-tabs-mode: t
+ tab-width: 8
+ End:
+*/
Index: setup.in
===================================================================
RCS file: /cvs/dirsec/dsgw/setup.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- setup.in 2 Jun 2006 22:57:17 -0000 1.2
+++ setup.in 28 Jan 2008 21:22:47 -0000 1.3
@@ -182,6 +182,7 @@
port=`getValFromInf ServerPort $inffile`
suffix=`getValFromInf Suffix $inffile`
dirmgr=`getValFromInf RootDN $inffile`
+ httpport=`getValFromInf Port $inffile`
fi
# if silent mode, do not run the pre-installer programs
@@ -242,6 +243,7 @@
# generate dsgw.conf and pb.conf and default.conf in the @contextdir@ directory
sed -e "s#@host@#$hostname#g" \
-e "s#@port@#$port#g" \
+ -e "s#@httpport@#$httpport#g" \
-e "s#@suffix@#$suffix#g" \
-e "s#@dirmgr@#$dirmgr#g" \
-e "s#\@contextdir\@#@contextdir@#g" \
@@ -249,11 +251,20 @@
sed -e "s#@host@#$hostname#g" \
-e "s#@port@#$port#g" \
+ -e "s#@httpport@#$httpport#g" \
-e "s#@suffix@#$suffix#g" \
-e "s#@dirmgr@#$dirmgr#g" \
-e "s#\@contextdir\@#@contextdir@#g" \
@pbconfigdir@/pb.tmpl > @contextdir@/pb.conf
+sed -e "s#@host@#$hostname#g" \
+ -e "s#@port@#$port#g" \
+ -e "s#@httpport@#$httpport#g" \
+ -e "s#@suffix@#$suffix#g" \
+ -e "s#@dirmgr@#$dirmgr#g" \
+ -e "s#\@contextdir\@#@contextdir@#g" \
+ @orghtmldir@/orgchart.tmpl > @contextdir@/orgchart.conf
+
# the default.conf is just a copy of dsgw.conf
cp @contextdir@/dsgw.conf @contextdir@/default.conf
Index: configure
===================================================================
RCS file: /cvs/dirsec/dsgw/configure,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- configure 16 Jan 2008 22:56:02 -0000 1.7
+++ configure 28 Jan 2008 21:22:47 -0000 1.8
@@ -21569,8 +21569,8 @@
# URIs
cgiuri=/cgi-bin
dsgwuri=/dsgw
-orguri=/orgchart
-pburi=/dsgw/pbhtml
+orguri=/org
+pburi=/pb
# Check for library dependencies
# BEGIN COPYRIGHT BLOCK
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/dsgw/Makefile.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile.in 16 Jan 2008 22:56:02 -0000 1.7
+++ Makefile.in 28 Jan 2008 21:22:47 -0000 1.8
@@ -456,7 +456,7 @@
orghtml/branch-cc1.gif orghtml/index.html orghtml/ldap-person.gif \
orghtml/mag.gif orghtml/mail.gif orghtml/new-branch-blank.gif \
orghtml/new-branch-first.gif orghtml/new-branch-straight.gif orghtml/orgicon.gif \
- orghtml/styles.css orghtml/topframe.html
+ orghtml/styles.css orghtml/topframe.html orghtml/starthelp.gif orghtml/orgchart.tmpl
dist_config_DATA = \
config/authPassword.html config/dsgw-l10n.conf \
@@ -531,9 +531,9 @@
-e 's, at localstatedir\@,$(localstatedir),g' \
-e 's, at cgibindir\@,$(cgibindir),g' \
-e 's, at cgiuri\@,$(cgiuri),g' \
- -e 's, at orguri\@,$(orguri),g' \
- -e 's, at dsgwuri\@,$(dsgwuri),g' \
- -e 's, at pburi\@,$(pburi),g' \
+ -e 's, at orguri\@, at orguri@,g' \
+ -e 's, at dsgwuri\@, at dsgwuri@,g' \
+ -e 's, at pburi\@, at pburi@,g' \
-e 's, at cmdbindir\@,$(cmdbindir),g' \
-e 's, at propertydir\@,$(propertydir),g' \
-e 's, at htmldir\@,$(htmldir),g' \
More information about the Fedora-directory-commits
mailing list