Bug 432395 - visudo reports incorrect line numbers in error messages
visudo reports incorrect line numbers in error messages
Status: CLOSED DUPLICATE of bug 428546
Product: Fedora
Classification: Fedora
Component: sudo (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Peter Vrabec
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-02-11 14:43 EST by Joe Krahn
Modified: 2008-02-21 11:46 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-21 11:46:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joe Krahn 2008-02-11 14:43:27 EST
Description of problem:
If an error is found by 'visudo', it gives an error with the line number.
However, it fails to count lines continued with backslashes, which are used in
the installed defaults. It also starts off counting the first line as 2. My
guess is that the latter is a known problem, because the error message states
"... near line %d", but maybe this could be fixed as well.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. run visudo
2. put an intentional typo at the end of the file
3. save
Actual results:
>>> sudoers file: syntax error, line 89 <<<

Expected results:
>>> sudoers file: syntax error, line 94 <<<

Additional info:
Comment 1 Peter Vrabec 2008-02-21 11:46:22 EST

*** This bug has been marked as a duplicate of 428546 ***

Note You need to log in before you can comment on or make changes to this bug.