RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1201195 - autofs: MAPFMT_DEFAULT is not macro in lookup_program.c
Summary: autofs: MAPFMT_DEFAULT is not macro in lookup_program.c
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: autofs
Version: 6.7
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: XuWang
URL:
Whiteboard:
Depends On:
Blocks: 1201582
TreeView+ depends on / blocked
 
Reported: 2015-03-12 09:50 UTC by XuWang
Modified: 2015-07-22 06:51 UTC (History)
2 users (show)

Fixed In Version: autofs-5.0.5-113.el6
Doc Type: Bug Fix
Doc Text:
Cause: A programming mistake in the program map lookup module caused an incorrect map format type comparison. Consequence: The incorrect comparison only affects amd format program maps where it introduces unused macro definitions. Fix: Correct the programming mistake. Result: These macros won't be included in the environment of amd format program maps.
Clone Of:
: 1201582 (view as bug list)
Environment:
Last Closed: 2015-07-22 06:51:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch - fix macro usage in lookup_program.c (1.20 KB, patch)
2015-03-13 03:16 UTC, Ian Kent
no flags Details | Diff
Test program to show the result of the quoted macro comparison (685 bytes, text/plain)
2015-03-13 03:39 UTC, Ian Kent
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1344 0 normal SHIPPED_LIVE Moderate: autofs security and bug fix update 2015-07-20 17:59:56 UTC

Description XuWang 2015-03-12 09:50:27 UTC
Description of problem:

View the code of modules/lookup_program.c of autofs, there is a very strange line showed like 181:

181 if (ctxt->mapfmt && strcmp(ctxt->mapfmt, "MAPFMT_DEFAULT")) {
182 struct parse_context *pctxt = (struct parse_context *) ctxt->parse->context;

the MAPFMT_DEFAULT is used as macro in autofs except this line. I think maybe it's the typo, so raise a bug to track it.

If not, just set it as "NOT A BUG" status.


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

autofs-5.0.5-112

How reproducible:

always

Steps to Reproduce:
1.view the source code of autofs
2.
3.

Actual results:

use the MAPFMT_DEFAULT as a string, not a macro

Expected results:

use MAPFMT_DEFAULT as a macro

Additional info:

Comment 2 Ian Kent 2015-03-13 01:13:24 UTC
(In reply to XuWang from comment #0)
> Description of problem:
> 
> View the code of modules/lookup_program.c of autofs, there is a very strange
> line showed like 181:
> 
> 181 if (ctxt->mapfmt && strcmp(ctxt->mapfmt, "MAPFMT_DEFAULT")) {
> 182 struct parse_context *pctxt = (struct parse_context *)
> ctxt->parse->context;
> 
> the MAPFMT_DEFAULT is used as macro in autofs except this line. I think
> maybe it's the typo, so raise a bug to track it.
> 
> If not, just set it as "NOT A BUG" status.

No, that's a mistake, it needs to be fixed.
Thanks for reporting it.
Ian

Comment 3 Ian Kent 2015-03-13 03:16:52 UTC
Created attachment 1001267 [details]
Patch - fix macro usage in lookup_program.c

Comment 4 Ian Kent 2015-03-13 03:39:25 UTC
Created attachment 1001270 [details]
Test program to show the result of the quoted macro comparison

This test program can be used to show the result of the mistake
in the current code and verify the change works as expected by
comparison and inspection of the autofs source.

Comment 6 XuWang 2015-04-13 09:14:02 UTC
view source code, seems good.
run autofs test cases on RHEL-6.7-20150304.0 with autofs--5.0.5-113.el6, cover regression/bugzillas/connectathon/stress, no regressions.

so I change the status of this bug to be verified.

Comment 7 errata-xmlrpc 2015-07-22 06:51:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1344.html


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