From 5a4babde001329825a188c7c471bc884d327ec11 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 17 Mar 1999 22:34:17 +0000 Subject: [PATCH] Add DEFAULT_EDITOR to ldapconfig.h. Used by ldbmtest and ud. --- include/ldapconfig.h.edit | 4 +++- servers/slapd/tools/ldbmtest.c | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ldapconfig.h.edit b/include/ldapconfig.h.edit index ae9bea12e6..bb6ceff049 100644 --- a/include/ldapconfig.h.edit +++ b/include/ldapconfig.h.edit @@ -39,6 +39,8 @@ #define DEFAULT_LIBEXECDIR "%LIBEXECDIR%" #define DEFAULT_RUNDIR "%RUNDIR%" +#define DEFAULT_EDITOR "%EDITOR%" + #define DEFAULT_LDAP_CONF_FILE "%SYSCONFDIR%/ldap.conf" #define DEFAULT_LDAP_USERRC_FILE "ldaprc" #define DEFAULT_LDAP_ENV_PREFIX "LDAP" @@ -178,7 +180,7 @@ Please try again later.\r\n" /* ud configuration file */ #define UD_CONFIG_FILE "%SYSCONFDIR%/ud.conf" /* default editor */ -#define UD_DEFAULT_EDITOR "%EDITOR%" +#define UD_DEFAULT_EDITOR DEFAULT_EDITOR /* default bbasename of user config file */ #define UD_USER_CONFIG_FILE ".udrc" /* default base where groups are created */ diff --git a/servers/slapd/tools/ldbmtest.c b/servers/slapd/tools/ldbmtest.c index a03fde8b00..08935704fc 100644 --- a/servers/slapd/tools/ldbmtest.c +++ b/servers/slapd/tools/ldbmtest.c @@ -31,8 +31,6 @@ #include "../slap.h" #include "../back-ldbm/back-ldbm.h" -#define EDITOR "/usr/ucb/vi" - static struct dbcache *openchoice(char c, int mode, int verbose, char **fname); static void print_entry(FILE *fp, char c, Datum *key, char *klabel, Datum *data, char *dlabel); static void free_and_close(struct dbcache *dbc, Datum key, Datum data); @@ -537,7 +535,7 @@ edit_entry( char c, Datum *data ) char *editor; if ( (editor = getenv( "EDITOR" )) == NULL ) { - editor = EDITOR; + editor = DEFAULT_EDITOR; } execl( editor, editor, tmpname, NULL ); perror( "execl" ); -- 2.39.5