Initial port of web_ldap to OpenLDAP. Also fixed some doc bugs.

This commit is contained in:
Hallvard Furuseth 1999-03-27 18:05:33 +00:00
parent a3bc2bbe63
commit dd44e1c28f
9 changed files with 81 additions and 77 deletions

2
configure vendored
View File

@ -10642,6 +10642,7 @@ tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@ -10813,6 +10814,7 @@ tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
"}
EOF
cat >> $CONFIG_STATUS <<\EOF

View File

@ -1876,6 +1876,7 @@ tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
,[
date > stamp-h
echo Please \"make depend\" to build dependencies

View File

@ -3,4 +3,4 @@
##
## doc Makefile.in for OpenLDAP
SUBDIRS= saucer
SUBDIRS= saucer web_ldap

View File

@ -1,28 +0,0 @@
#
# This file used under Irix (SGI) - please modify for your needs
#
#CC = cc -signed
#For Optimization
CFLAGS= -O2 $(CPPFLAGS)
#For debugging
#CFLAGS= -g $(CPPFLAGS)
PREFIX=../..
# PREFIX=/usr/local
CPPFLAGS= -I$(PREFIX)/include
LDFLAGS= -L$(PREFIX)/libraries
# CC = cc $(CFLAGS) $(CPPFLAGS)
#
# Create Executables
#
web_ldap: web_ldap.o util.o
$(CC) -o web_ldap web_ldap.o util.o $(LDFLAGS) -lldap -llber
clean:
rm -f *.o a.out core web_ldap

View File

@ -0,0 +1,18 @@
PROGRAMS= web_ldap
SRCS= web_ldap.c util.c
OBJS= web_ldap.o util.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = -lldap -llber -llutil
XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
web_ldap: ${OBJS} $(LDAP_LIBDEPEND)
$(LTLINK) -o $@ $(OBJS) $(LIBS)
install-local: $(PROGRAMS) FORCE
-test -d $(libexecdir) || $(MKDIR) $(libexecdir)
$(LTINSTALL) $(INSTALLFLAGS) -m 755 web_ldap $(libexecdir)
@echo ">> You must copy and edit web_ldap.cfg and web_ldap.html as needed. <<"

View File

@ -12,14 +12,18 @@
* time/date functions added - R. Scott Guthrie
*/
#include "portable.h"
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <ac/string.h>
#include <ac/ctype.h>
#include <ac/unistd.h>
#include "process_form.h"
/*--------------*/

View File

@ -5,23 +5,33 @@
* Jens Moller - Dec 11, 1998
*/
#include "portable.h"
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <ac/unistd.h>
#include <ac/string.h>
#include <lber.h>
#include <ldap.h>
#include <ldif.h>
#include "maint_form.h" /* for HTML Form manipulations */
/* default values */
#ifndef LDAP_PORT
#define LDAP_PORT 389
#define SERVER "ldap.bigfoot.com"
#endif
#ifndef SERVER
#define SERVER "ldap.bigfoot.com"
#endif
#ifndef CONFIG
#define CONFIG "web_ldap.cfg"
#endif
#define MAX_ATTRIB 100
#define MAX_CHARS 256

View File

@ -3,17 +3,21 @@
<body text="#000000"
bgcolor="#FFFFFF">
<h2>web_ldap V 1.1</h2>
<h2>web_ldap version 1.1, OpenLDAP variant</h2>
This is an OpenLDAP port of the web_ldap program.
<p>
<i>
The files provided in the file set for 'web_ldap'
were developed under the GNU General Public License (GPL).
Under the GPL, the source code is freely-distributed and available
to the general public. There is no warranty on the software,
and it does not come with support, however, I would appreciate
it if you emailed me any bug-fixes you create
(<a href="mailto:jens@colomar.com">jens@colomar.com</a>).
it if you emailed any bug-fixes you create to me
(<a href="mailto:jens@colomar.com">jens@colomar.com</a>) and
<a href="mailto:OpenLDAP-bugs@OpenLDAP.org">OpenLDAP-bugs@OpenLDAP.org</a>.
<p>
All code here is generic Ansi C, allowing most Unix compilers
All code here is generic ISO C, allowing most Unix compilers
to generate the required object files and executable images.
It was tested against an Apache HTTPD server and uses no
special HTML functionality that does not appear within V 3.x
@ -37,7 +41,7 @@ and a sample makefile. You will need the LDAP SDK for your
specific Unix System (both the UofM libraries and Netscape
libraries - which are also free - have been tested).
<p>
The tool allows You to specify that actions taken
The tool allows you to specify that actions taken
be logged to a file. This provides you a method by which
you can build out larger applications and see what is happening.
<p>
@ -66,7 +70,7 @@ When you execute the application from a command line such as:
</pre>
All actions take place in the same directory that the web_ldap
program resides in. Most people would typically build an
application of this nature in one of their own directorys and
application of this nature in one of their own directories and
this would give them Read/Write access to all of the files
associated with the program. Any file restrictions or capabilities
that you have will be enabled as part of your session.
@ -94,22 +98,15 @@ If you get errors - start with this simple change.
<h3>Building the application:</h3>
Requires Ansi C (your standard OS compiler or GCC should
Requires ISO C (your standard OS compiler or GCC should
work fine).
<p>
The make file contains:
Under OpenLDAP, you should build with the following commands after
having configured and built OpenLDAP itself:
<pre>
web_ldap: web_ldap.o
$(CC) -o web_ldap web_ldap.o util.o \
libldap.a liblber.a
web_ldap.o: web_ldap.c
$(CC) -c web_ldap.c
util.o: util.c
$(CC) -c util.c
cd contrib/web_ldap
make depend
make
</pre>
<h3>Configuration:</h3>
@ -203,7 +200,7 @@ attribute could have multiple values. This application will
list all the values it finds for any given attribute.
<h3?Where to put the files:</h3>
<h3>Where to put the files:</h3>
If running this interactively (from a Unix shell prompt),
all the files can reside in any of your home directories.
@ -352,4 +349,6 @@ that your modified web_ldap.c program may want to have passed to it.
<p>
<hr>
Jens Moller - Jens@colomar.com -
<a href="http://www.colomar.com">COLOMAR Group</a>
<a href="http://www.colomar.com">COLOMAR Group</a>.<br>
<a href="http://www.OpenLDAP.org/">OpenLDAP</a> - OpenLDAP-devel@OpenLDAP.org.

View File

@ -1,13 +1,16 @@
web_ldap V 1.0
web_ldap Version 1.1, OpenLDAP variant
This is an OpenLDAP port of the web_ldap program.
The files provided in the file set for 'web_ldap'
were developed under the GNU General Public License (GPL).
Under the GPL, the source code is freely-distributed and available
to the general public. There is no warranty on the software,
and it does not come with support, however, I would appreciate
it if you emailed me any bug-fixes you create (jens@colomar.com).
it if you emailed any bug-fixes you create to me (jens@colomar.com)
and OpenLDAP-bugs@OpenLDAP.org.
All code here is generic Ansi C, allowing most Unix compilers
All code here is generic ISO C, allowing most Unix compilers
to generate the required object files and executable images.
It was tested against an Apache HTTPD server and uses no
special HTML functionality that does not appear within V 3.x
@ -60,7 +63,7 @@ When you execute the application from a command line such as:
All actions take place in the same directory that the web_ldap
program resides in. Most people would typically build an
application of this nature in one of their own directorys and
application of this nature in one of their own directories and
this would give them Read/Write access to all of the files
associated with the program. Any file restrictions or capabilities
that you have will be enabled as part of your session.
@ -88,23 +91,16 @@ If you get errors - start with this simple change.
Building the application:
Requires Ansi C (your standard OS compiler or GCC should
Requires ISO C (your standard OS compiler or GCC should
work fine).
The make file contains:
Under OpenLDAP, you should build with the following commands after having
configured and built OpenLDAP itself:
web_ldap: web_ldap.o
$(CC) -o web_ldap web_ldap.o util.o \
libldap.a liblber.a
cd contrib/web_ldap
make depend
make
web_ldap.o: web_ldap.c
$(CC) -c web_ldap.c
util.o: util.c
$(CC) -c util.c
Configuration:
@ -313,9 +309,10 @@ additional HTML code you add may need to to have proper termination syntax
(tables are very touchy about this), and you may need to further enhance
your changes to compensate.
Please test your results on both Netscape's Web Browser and Internet
Explorer. Nothing is more irritating to end users than getting different
results based on their Web Browser selection.
When creating new applications, please test your results on both
Netscape's Web Browser and Internet Explorer. Nothing is more
irritating to end users than getting different results based on their
Web Browser selection.
The Unix Command line will not allow you to pass some characters into
an application unless you surround the characters or command with quotes.
@ -343,4 +340,5 @@ options (such as which configuration file to use), or other options
that your modified web_ldap.c program may want to have passed to it.
Jens Moller - Jens@colomar.com - COLOMAR Group
Jens Moller - Jens@colomar.com - COLOMAR Group.
OpenLDAP - OpenLDAP-devel@OpenLDAP.org.