Bug 146659

Summary: [PATCH] line continuation character handling
Product: [Fedora] Fedora Reporter: Garrett Comeaux <gcomeaux>
Component: authconfigAssignee: Tomas Mraz <tmraz>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideKeywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: authconfig-5.0.0-1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-08 13:11:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patches authinfo.c to "assemble" a line before processing it. none

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):
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 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 \
			      md5
	    becomes
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.