Skip to content
Snippets Groups Projects
Commit 5a4babde authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add DEFAULT_EDITOR to ldapconfig.h. Used by ldbmtest and ud.

parent 1676d611
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
......@@ -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" );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment