Repository navigation
Conversation
When a folded LDIF line was appended to the saved portion, len was left as the length of the continuation alone. A second continuation was then saved with that short length and copied over the middle of the attribute, so a value folded over three or more lines was corrupted, e.g. "sudoCommand: /usr/bin/sys", " temctl rest", " art httpd" became "sudoCommandart httpd" and was rejected as an invalid LDIF attribute. Add the saved length to len after the append, and add a cvtsudoers regression test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cvtsudoers -i ldifbreaks on an attribute that is folded over three or more lines. With two lines it works:but split the same value once more:
and it fails:
After appending a continuation to the saved line,
lenstill holds just the continuation's length. The next fold saves that assavedlen, so the third piece is copied over the middle of the line. This adds the saved length back tolenafter the append.Added
regress/cvtsudoers/test42.sh(and MANIFEST entries). It fails without the fix, andmake -C plugins/sudoers checkpasses with it.