mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-01 14:15:49 +08:00
Add DEFAULT_EDITOR to ldapconfig.h. Used by ldbmtest and ud.
This commit is contained in:
parent
1676d61130
commit
5a4babde00
@ -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" );
|
||||
|
Loading…
Reference in New Issue
Block a user