From a4a7ffdf5cb4aa57d03db18f0233793abc771534 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 9 Jun 2011 17:59:08 -0700 Subject: [PATCH] Try to discourage editing back-ldif files --- servers/slapd/back-ldif/ldif.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-ldif/ldif.c b/servers/slapd/back-ldif/ldif.c index 8c731105e1..3af0580a1a 100644 --- a/servers/slapd/back-ldif/ldif.c +++ b/servers/slapd/back-ldif/ldif.c @@ -395,8 +395,10 @@ ldif_read_file( const char *path, char **datap ) static int spew_file( int fd, const char *spew, int len, int *save_errno ) { - int writeres = 0; + int writeres; +#define HEADER "# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.\n" + writeres = write(fd, HEADER, sizeof(HEADER)); while(len > 0) { writeres = write(fd, spew, len); if(writeres == -1) { -- 2.39.5