From: Howard Chu Date: Fri, 10 Jun 2011 00:59:08 +0000 (-0700) Subject: Try to discourage editing back-ldif files X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a4a7ffdf5cb4aa57d03db18f0233793abc771534;p=openldap Try to discourage editing back-ldif files --- 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) {