Bug 146659 - [PATCH] line continuation character handling
[PATCH] line continuation character handling
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: authconfig (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Brian Brock
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-31 11:12 EST by Garrett Comeaux
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: authconfig-5.0.0-1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-08 09:11:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 11:18 EST, Garrett Comeaux
no flags Details | Diff

  None (edit)
Description Garrett Comeaux 2005-01-31 11:12:55 EST
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):
All

How reproducible:
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
PAM(8).

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 11:18:13 EST
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 \
			      md5
	    becomes
password required pam_unix.so nullok	   md5
Comment 2 Tomas Mraz 2005-08-23 10:00:07 EDT
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 09:11:15 EDT
Should be fixed now.

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