From c0db5c1234a70ef65f4cc4176ef9733729e2df4c Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 1 Sep 2016 12:45:42 -0600 Subject: [PATCH] No line continuation support in ldap.conf. --- doc/sudoers.ldap.cat | 6 ++---- doc/sudoers.ldap.man.in | 6 +----- doc/sudoers.ldap.mdoc.in | 6 +----- plugins/sudoers/ldap.c | 2 +- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/doc/sudoers.ldap.cat b/doc/sudoers.ldap.cat index 6f70c061f..6f0e75f00 100644 --- a/doc/sudoers.ldap.cat +++ b/doc/sudoers.ldap.cat @@ -315,10 +315,8 @@ DDEESSCCRRIIPPTTIIOONN by ssuuddoo are honored. Configuration options are listed below in upper case but are parsed in a case-independent manner. - Lines beginning with a pound sign (`#') are ignored. Long lines can be - continued with a backslash (`\') as the last character on the line. Note - that leading white space is removed from the beginning of lines even when - the continuation character is used. + Lines beginning with a pound sign (`#') are ignored. Leading white space + is removed from the beginning of lines. BBIINNDD__TTIIMMEELLIIMMIITT _s_e_c_o_n_d_s The BBIINNDD__TTIIMMEELLIIMMIITT parameter specifies the amount of time, in diff --git a/doc/sudoers.ldap.man.in b/doc/sudoers.ldap.man.in index 8454d85ae..5737f0453 100644 --- a/doc/sudoers.ldap.man.in +++ b/doc/sudoers.ldap.man.in @@ -562,11 +562,7 @@ in a case-independent manner. Lines beginning with a pound sign (\(oq#\(cq) are ignored. -Long lines can be continued with a backslash -(\(oq\e\(cq) -as the last character on the line. -Note that leading white space is removed from the beginning of lines -even when the continuation character is used. +Leading white space is removed from the beginning of lines. .TP 6n \fBBIND_TIMELIMIT\fR \fIseconds\fR The diff --git a/doc/sudoers.ldap.mdoc.in b/doc/sudoers.ldap.mdoc.in index 93613eb36..47721bdf9 100644 --- a/doc/sudoers.ldap.mdoc.in +++ b/doc/sudoers.ldap.mdoc.in @@ -534,11 +534,7 @@ in a case-independent manner. Lines beginning with a pound sign .Pq Ql # are ignored. -Long lines can be continued with a backslash -.Pq Ql \e -as the last character on the line. -Note that leading white space is removed from the beginning of lines -even when the continuation character is used. +Leading white space is removed from the beginning of lines. .Bl -tag -width 4n .It Sy BIND_TIMELIMIT Ar seconds The diff --git a/plugins/sudoers/ldap.c b/plugins/sudoers/ldap.c index 552e15a72..df1402e0a 100644 --- a/plugins/sudoers/ldap.c +++ b/plugins/sudoers/ldap.c @@ -2024,7 +2024,7 @@ sudo_ldap_read_config(void) if ((fp = fopen(path_ldap_conf, "r")) == NULL) debug_return_bool(false); - while (sudo_parseln(&line, &linesize, NULL, fp, PARSELN_COMM_BOL) != -1) { + while (sudo_parseln(&line, &linesize, NULL, fp, PARSELN_COMM_BOL|PARSELN_CONT_IGN) != -1) { if (*line == '\0') continue; /* skip empty line */ -- 2.40.0