Bug 146659 - [PATCH] line continuation character handling
Summary: [PATCH] line continuation character handling
Alias: None
Product: Fedora
Classification: Fedora
Component: authconfig   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Brian Brock
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2005-01-31 16:12 UTC by Garrett Comeaux
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: authconfig-5.0.0-1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-08 13:11:15 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patches authinfo.c to "assemble" a line before processing it. (2.48 KB, patch)
2005-01-31 16:18 UTC, Garrett Comeaux
no flags Details | Diff

Description Garrett Comeaux 2005-01-31 16:12:55 UTC
Description of problem:
The PAM(8) man page says that each rule is "typically placed on a
single line, but may be extended with an escaped end of line."
Authconfig parses PAM configuration files, but it does not seem
to recognize or honor any portion of a rule which follows the
line continuation character.

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

How reproducible:

Steps to Reproduce:
1. Add several options to a rule line such as pam_unix:
   password  required  pam_unix.so  nullok \
                                    use_authtok \
                                    md5 shadow remember=7
2. Run authconfig and note that it doesn't see any options
   on "continued" portions of the line.
Actual results:
No options on "continued" portions of the line are recognized (MD5,
shadow, etc.)

Expected results:
Authconfig should recognize and process all arguments, as per

Additional info:
I'm attaching a patch file which corrects the problem.  The patch
was created against the authconfig-4.6.8 src rpm, but the code
was very straightforward and could(should?) apply to any version.

Comment 1 Garrett Comeaux 2005-01-31 16:18:13 UTC
Created attachment 110443 [details]
Patches authinfo.c to "assemble" a line before processing it.

One function, _assemble_line, is added to authinfo.c. Then in authInfoReadPAM,
_assemble_line is called to fill a buffer with the complete rule line. So, it
pieces together the first portion of the line with all "continued" portions.
password required pam_unix.so nullok \
password required pam_unix.so nullok	   md5

Comment 2 Tomas Mraz 2005-08-23 14:00:07 UTC
Thanks for the patch, however authconfig is being rewritten in Python.

I'll fix this bug in the rewrite anyway.

Comment 3 Tomas Mraz 2005-09-08 13:11:15 UTC
Should be fixed now.

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