Commit d2ef362f authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Removed use of paths not defined in ldapconfig.h.edit.

Fixed Dependency Generation not to mess with Make-templates.
	side effect: depends are not carried forward after "make makefiles"
parent b3ac1849
......@@ -161,8 +161,7 @@ depend: makeconfig
for i in $(SRCDIRS); do \
echo; echo "cd $$i; $(MAKE) $(MFLAGS) depend"; \
( cd $$i; $(MAKE) $(MFLAGS) depend ); \
done; \
$(MAKE) $(MFLAGS) makefiles
done;
#
# rules to check out and in Make-template files
......@@ -350,12 +349,13 @@ Make-common: Make-common.dist
echo " creating $$i/Makefile"; \
$(RM) $$i/Makefile; \
$(CAT) $$HDRFILE $$i/Make-template $$DEFSFILE > $$i/Makefile; \
$(CHMOD) 444 $$i/Makefile; \
fi; \
done; \
$(RM) .makefiles; \
touch .makefiles; \
$(RM) $$HDRFILE $$DEFSFILE
$(RM) $$HDRFILE $$DEFSFILE \
echo "Please \"make depend\" before building."
#
# rule to always build makefiles
......
......@@ -66,7 +66,7 @@ INSTALL = install
INSTALLFLAGS = -c
BASENAME= basename
DIRNAME = dirname
MKDEP = $(LDAPSRC)/build/mkdep -s -f Make-template
MKDEP = $(LDAPSRC)/build/mkdep -s -f Makefile
PWD = pwd
DATE = date
HOSTNAME= hostname
......
......@@ -75,13 +75,3 @@ depend: FORCE
links:
@$(LN) .src/README .src/xrpcomp .src/*.[ch] .
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
rp500.o: rp500.c ../../include/ldapconfig.h ../../include/proto-lber.h
rp500.o: ../../include/proto-ldap.h
main.o: main.c ../../include/portable.h ../../include/proto-lber.h
main.o: ../../include/proto-ldap.h
faxtotpc.o: faxtotpc.c
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
......@@ -308,7 +308,7 @@ connect_to_x500()
ld->ld_sizelimit = FAX_MAXAMBIGUOUS;
ld->ld_deref = LDAP_DEREF_ALWAYS;
if ( ldap_simple_bind_s( ld, FAX_BINDDN, NULL ) != LDAP_SUCCESS ) {
if ( ldap_simple_bind_s( ld, FAX_BINDDN, FAX_BIND_CRED ) != LDAP_SUCCESS ) {
syslog( LOG_ALERT, "ldap_simple_bind_s failed" );
return( -1 );
}
......
......@@ -22,16 +22,18 @@
#include <sys/resource.h>
#include <sys/wait.h>
#include <signal.h>
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>
#include "lber.h"
#include "ldap.h"
#define DEFAULT_PORT 79
#define DEFAULT_SIZELIMIT 50
int debug;
char *ldaphost = LDAPHOST;
char *base = DEFAULT_BASE;
char *ldaphost = LDAPHOST;
char *base = RP_BASE;
int deref;
int sizelimit;
LDAPFiltDesc *filtd;
......@@ -114,7 +116,7 @@ main (argc, argv)
ld->ld_sizelimit = sizelimit ? sizelimit : DEFAULT_SIZELIMIT;
ld->ld_deref = deref;
if ( ldap_simple_bind_s( ld, RP_BINDDN, NULL ) != LDAP_SUCCESS ) {
if ( ldap_simple_bind_s( ld, RP_BINDDN, RP_BIND_CRED ) != LDAP_SUCCESS ) {
fprintf( stderr, "X.500 is temporarily unavailable.\n" );
ldap_perror( ld, "ldap_simple_bind_s" );
exit( -1 );
......
......@@ -60,10 +60,3 @@ depend: FORCE
links:
@$(LN) .src/README .src/*.[ch] .
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
main.o: main.c ../../include/ldap.h ../../include/proto-ldap.h
main.o: ../../include/portable.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
......@@ -168,7 +168,9 @@ static do_query()
ld->ld_sizelimit = FINGER_SIZELIMIT;
ld->ld_deref = deref;
if ( ldap_simple_bind_s( ld, FINGER_BINDDN, NULL ) != LDAP_SUCCESS ) {
if ( ldap_simple_bind_s( ld, FINGER_BINDDN, FINGER_BIND_CRED )
!= LDAP_SUCCESS )
{
fprintf( stderr, FINGER_UNAVAILABLE );
ldap_perror( ld, "ldap_simple_bind_s" );
exit( 1 );
......
......@@ -77,14 +77,3 @@ depend: FORCE
links:
@$(LN) .src/README .src/*.help .src/*.[ch] .
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
go500.o: go500.c ../../include/ldapconfig.h ../../include/proto-lber.h
go500.o: ../../include/proto-ldap.h
go500gw.o: go500gw.c ../../include/ldap.h ../../include/proto-ldap.h
go500gw.o: ../../include/ldapconfig.h
detach.o: detach.c
setproctitle.o: setproctitle.c
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
......@@ -379,7 +379,7 @@ int s;
}
ld->ld_deref = GO500_DEREF;
if ( (rc = ldap_simple_bind_s( ld, GO500_BINDDN, NULL ))
if ( (rc = ldap_simple_bind_s( ld, GO500_BINDDN, GO500_BIND_CRED ))
!= LDAP_SUCCESS ) {
fprintf(fp,
"0An error occurred (explanation)\t@%d\t%s\t%d\r\n",
......
......@@ -59,10 +59,3 @@ depend: FORCE
links:
@$(LN) .src/README .src/sendmail.cf .src/*.[ch] .
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
main.o: main.c ../../include/portable.h ../../include/proto-lber.h
main.o: ../../include/proto-ldap.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
......@@ -58,13 +58,3 @@ depend: FORCE
links:
@$(LN) .src/README .src/*.[ch] .src/*.help .
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
main.o: main.c ../../include/portable.h
cmds.o: cmds.c
help.o: help.c ../../include/portable.h
query.o: query.c ../../include/proto-lber.h ../../include/proto-ldap.h
query.o: ../../include/ldapconfig.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
......@@ -103,16 +103,3 @@ depend: FORCE
links:
@$(LN) .src/*.[ch] .
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
ldapsearch.o: ldapsearch.c ../../include/lber.h ../../include/proto-ldap.h
ldapsearch.o: ../../include/ldapconfig.h
ldapmodify.o: ldapmodify.c ../../include/lber.h ../../include/proto-ldap.h
ldapmodify.o: ../../include/ldapconfig.h
ldapdelete.o: ldapdelete.c ../../include/proto-lber.h
ldapdelete.o: ../../include/proto-ldap.h
ldapmodrdn.o: ldapmodrdn.c ../../include/proto-lber.h
ldapmodrdn.o: ../../include/proto-ldap.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
......@@ -12,8 +12,8 @@
#include "ldapconfig.h"
static char *binddn = LDAPDELETE_BINDDN;
static char *passwd = LDAPDELETE_BIND_CRED;
static char *base = LDAPDELETE_BASE;
static char *passwd = NULL;
static char *ldaphost = LDAPHOST;
static int ldapport = LDAP_PORT;
static int not, verbose, contoper;
......
......@@ -19,7 +19,7 @@
static char *prog;
static char *binddn = LDAPMODIFY_BINDDN;
static char *passwd = NULL;
static char *passwd = LDAPMODIFY_BIND_CRED;
static char *ldaphost = LDAPHOST;
static int ldapport = LDAP_PORT;
static int new, replace, not, verbose, contoper, force, valsfromfiles;
......
......@@ -12,8 +12,8 @@
#include "ldapconfig.h"
static char *binddn = LDAPMODRDN_BINDDN;
static char *passwd = LDAPMODRDN_BIND_CRED;
static char *base = LDAPMODRDN_BASE;
static char *passwd = NULL;
static char *ldaphost = LDAPHOST;
static int ldapport = LDAP_PORT;
static int not, verbose, contoper;
......
......@@ -54,7 +54,7 @@ char *s;
}
static char *binddn = LDAPSEARCH_BINDDN;
static char *passwd = NULL;
static char *passwd = LDAPSEARCH_BIND_CRED;
static char *base = LDAPSEARCH_BASE;
static char *ldaphost = LDAPHOST;
static int ldapport = LDAP_PORT;
......
......@@ -29,8 +29,7 @@ OBJS= main.o find.o mod.o print.o auth.o util.o help.o\
HDRS= ud.h
INCLUDES= -I$(HDIR) $(KRBINCLUDEFLAG)
DEFINES= $(DEFS) -DDEBUG -DCONFIG_FILE=\"$(LDAP_ETCDIR)/ud.conf\" \
-DLDAP_FRIENDLY_MAP_FILE=\"$(LDAP_ETCDIR)/ldapfriendly\"
DEFINES= $(DEFS) -DDEBUG
TERMLIB= -ltermcap
CFLAGS= ${INCLUDES} ${DEFINES} ${ACFLAGS}
......@@ -77,20 +76,3 @@ lint: FORCE
links:
@$(LN) .src/README .src/etc.ud.conf .src/*.[ch] .
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
main.o: main.c ../../include/lber.h ../../include/proto-ldap.h
main.o: ../../include/portable.h
find.o: find.c ../../include/proto-lber.h ../../include/proto-ldap.h
mod.o: mod.c ../../include/proto-lber.h ../../include/proto-ldap.h
print.o: print.c ../../include/proto-lber.h ../../include/proto-ldap.h
auth.o: auth.c ../../include/proto-lber.h ../../include/proto-ldap.h
util.o: util.c ../../include/proto-lber.h ../../include/ldapconfig.h
help.o: help.c ../../include/proto-lber.h ../../include/proto-ldap.h
string_to_key.o: string_to_key.c
group.o: group.c ../../include/lber.h ../../include/proto-ldap.h
edit.o: edit.c ../../include/lber.h ../../include/proto-ldap.h
globals.o: globals.c
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
......@@ -251,7 +251,7 @@ int implicit;
else
ldap_perror(ld, "ldap_bind_s" );
(void) ldap_bind_s(ld, default_bind_object,
(char *) UD_PASSWD, LDAP_AUTH_SIMPLE);
(char *) UD_BIND_CRED, LDAP_AUTH_SIMPLE);
if (default_bind_object == NULL)
set_bound_dn(NULL);
else
......
......@@ -632,7 +632,7 @@ initialize_client()
exit(0);
/* NOTREACHED */
}
if (ldap_bind_s(ld, (char *) default_bind_object, (char *) UD_PASSWD,
if (ldap_bind_s(ld, (char *) default_bind_object, (char *) UD_BIND_CRED,
LDAP_AUTH_SIMPLE) != LDAP_SUCCESS) {
fprintf(stderr, " The X.500 Directory is temporarily unavailable. Please try again later.\n");
if (ld->ld_errno != LDAP_UNAVAILABLE)
......
......@@ -22,16 +22,29 @@
/*
* SHARED DEFINITIONS - things you should change
*/
/* default ldap host */
#define LDAPHOST "localhost"
/* default place to start searching */
#define DEFAULT_BASE "o=Your Organization Name, c=US"
#define DEFAULT_BINDIR "%BINDIR%"
#define DEFAULT_SBINDIR "%SBINDIR%"
#define DEFAULT_ETCDIR "%ETCDIR%"
#define DEFAULT_LIBEXECDIR "%LIBEXECDIR%"
/* default ldap host */
#define LDAPHOST "localhost"
#define DEFAULT_LDAPHOST_FILE "%ETCDIR%/ldaphost"
/* default place to start searching */
#define DEFAULT_BASE "o=Your Organization Name, c=US"
#define DEFAULT_BASE_FILE "%ETCDIR%/ldapbase"
/*
* default binddn and creditials
* use files, make sure they are not generally readable
*/
#define DEFAULT_BINDDN NULL
#define DEFAULT_BINDDN_FILE "%ETCDIR%/ldapbinddn"
#define DEFAULT_BIND_CRED NULL
#define DEFAULT_BIND_CRED_FILE "%ETCDIR%/ldapbindcred"
/*********************************************************************
* *
* You probably do not need to edit anything below this point *
......@@ -55,18 +68,19 @@
* FINGER DEFINITIONS
*/
/* who to bind as */
#define FINGER_BINDDN NULL
#define FINGER_BINDDN NULL
#define FINGER_BIND_CRED NULL
/* where to search */
#define FINGER_BASE DEFAULT_BASE
#define FINGER_BASE DEFAULT_BASE
/* banner to print */
#define FINGER_BANNER "X.500 Finger Service...\r\n"
/* who to report errors to */
#define FINGER_ERRORS "your local system administrator"
#define FINGER_ERRORS "System Administrator"
/* what to say if no matches are found */
#define FINGER_NOMATCH "Search failed to find anything.\r\n"
/* what to say if the service may be unavailable */
#define FINGER_UNAVAILABLE \
"The X.500 service may be temporarily unavailable.\r\n\
"The directory service may be temporarily unavailable.\r\n\
Please try again later.\r\n"
/* printed if a match has no email address - for disptmp default */
#define FINGER_NOEMAIL1 "None registered in this service."
......@@ -94,6 +108,7 @@ Please try again later.\r\n"
*/
/* who to bind as */
#define GO500_BINDDN NULL
#define GO500_BIND_CRED NULL
/* where to search */
#define GO500_BASE DEFAULT_BASE
/* port on which to listen */
......@@ -118,7 +133,8 @@ Please try again later.\r\n"
* GO500GW GOPHER GATEWAY DEFINITIONS
*/
/* who to bind as */
#define GO500GW_BINDDN NULL
#define GO500GW_BINDDN NULL
#define GO500GW_BIND_CRED NULL
/* where the helpfile lives */
#define GO500GW_HELPFILE "%ETCDIR%/go500gw.help"
/* port on which to listen */
......@@ -142,12 +158,13 @@ Please try again later.\r\n"
*/
/* who to bind as */
#define RCPT500_BINDDN NULL
#define RCPT500_BIND_CRED NULL
/* where the helpfile lives */
#define RCPT500_HELPFILE "%ETCDIR%/rcpt500.help"
/* maximum number of matches returned */
#define RCPT500_SIZELIMIT 50
/* address replies will appear to come from */
#define RCPT500_FROM "\"X.500 Query Program\" <X500-Query>"
#define RCPT500_FROM "\"Directory Query Program\" <Dir-Query>"
/* command that will accept an RFC822 message text on standard
input, and send it. sendmail -t does this nicely. */
#define RCPT500_PIPEMAILCMD "%SENDMAIL% -t"
......@@ -166,7 +183,8 @@ Please try again later.\r\n"
* LDAPSEARCH TOOL
*/
/* who to bind as */
#define LDAPSEARCH_BINDDN NULL
#define LDAPSEARCH_BINDDN NULL
#define LDAPSEARCH_BIND_CRED NULL
/* search base */
#define LDAPSEARCH_BASE DEFAULT_BASE
......@@ -174,7 +192,8 @@ Please try again later.\r\n"
* LDAPMODIFY TOOL
*/
/* who to bind as */
#define LDAPMODIFY_BINDDN NULL
#define LDAPMODIFY_BINDDN NULL
#define LDAPMODIFY_BIND_CRED NULL
/* search base */
#define LDAPMODIFY_BASE DEFAULT_BASE
......@@ -182,7 +201,8 @@ Please try again later.\r\n"
* LDAPDELETE TOOL
*/
/* who to bind as */
#define LDAPDELETE_BINDDN NULL
#define LDAPDELETE_BINDDN NULL
#define LDAPDELETE_BIND_CRED NULL
/* search base */
#define LDAPDELETE_BASE DEFAULT_BASE
......@@ -190,7 +210,8 @@ Please try again later.\r\n"
* LDAPMODRDN TOOL
*/
/* who to bind as */
#define LDAPMODRDN_BINDDN NULL
#define LDAPMODRDN_BINDDN NULL
#define LDAPMODRDN_BIND_CRED NULL
/* search base */
#define LDAPMODRDN_BASE DEFAULT_BASE
......@@ -198,7 +219,8 @@ Please try again later.\r\n"
* MAIL500 MAILER DEFINITIONS
*/
/* who to bind as */
#define MAIL500_BINDDN NULL
#define MAIL500_BINDDN NULL
#define MAIL500_BIND_CRED NULL
/* max number of ambiguous matches reported */
#define MAIL500_MAXAMBIGUOUS 10
/* max subscribers allowed (size limit when searching for them ) */
......@@ -220,9 +242,9 @@ Please try again later.\r\n"
/* default user to bind as */
#define UD_BINDDN NULL
/* default password to bind with */
#define UD_PASSWD NULL
#define UD_BIND_CRED NULL
/* default search base */
#define UD_BASE DEFAULT_BASE
#define UD_BASE DEFAULT_BASE
/* default base where groups are created */
#define UD_WHERE_GROUPS_ARE_CREATED ""
/* default base below which all groups live */
......@@ -232,7 +254,10 @@ Please try again later.\r\n"
* FAX500 DEFINITIONS
*/
/* what to bind as */
#define FAX_BINDDN NULL
#define FAX_BINDDN NULL
#define FAX_BIND_CRED NULL
/* default search base */
#define FAX_BASE DEFAULT_BASE
/* how long to wait for searches */
#define FAX_TIMEOUT 180
/* maximum number of ambiguous matches reported */
......@@ -246,7 +271,11 @@ Please try again later.\r\n"
* RP500 DEFINITIONS
*/
/* what to bind as */
#define RP_BINDDN NULL
#define RP_BINDDN NULL
#define RP_BIND_CRED NULL
/* default search base */
#define RP_BASE DEFAULT_BASE
/* prefix to add to non-fully-qualified numbers */
#define RP_PHONEPREFIX ""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment