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 1455923 - Static IP mapping does not allow to map groups with white space such as 'domain users'
Summary: Static IP mapping does not allow to map groups with white space such as 'doma...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libnfsidmap
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks: 1420851 1469559
TreeView+ depends on / blocked
 
Reported: 2017-05-26 12:49 UTC by Stefan Walter
Modified: 2021-06-10 12:22 UTC (History)
13 users (show)

Fixed In Version: libnfsidmap-0.25-19.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 18:51:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Alternative patch with minimal rewrite (3.63 KB, patch)
2017-11-15 18:27 UTC, Alice Mitchell
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1349235 0 unspecified CLOSED The domain id cannot translate to the corresponding domain name which contains a space in it 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2018:1016 0 None None None 2018-04-10 18:51:50 UTC

Internal Links: 1349235

Description Stefan Walter 2017-05-26 12:49:17 UTC
Description of problem:

The INI parsing of libnfsidmap is buggy. Looking at lines 261 to 270 of

http://git.linux-nfs.org/?p=steved/libnfsidmap.git;a=blob;f=cfg.c;h=e0ab839a494ee9186089d9d2ba8d4ba39ed05c8c;hb=HEAD

one can see that the first white space (even a leading one - lines 267 to 270 are useless) terminates the key. Mapping 'domain users' does not work which really hurts our deployment:

[Static]
domain users@example.com = others


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

libnfsidmap-0.25-15.el7.x86_64


How reproducible:

Always.

Comment 7 Alice Mitchell 2017-10-12 17:05:22 UTC
Patch series which merges libnfsidmap into nfs-utils, thus fixing the white space parsing issue.

http://www.spinics.net/lists/linux-nfs/msg65539.html

Comment 8 Steve Whitehouse 2017-10-24 09:23:17 UTC
Can you check with Steve D how to get this fixed, since we are running out of time for doing larger changes in 7.5 now. Since this is on the RPL we need to move this bug on, or agree to defer to 7.6 at this stage.

Comment 9 Steve Dickson 2017-10-24 18:53:03 UTC
(In reply to Justin Mitchell from comment #7)
> Patch series which merges libnfsidmap into nfs-utils, thus fixing the white
> space parsing issue.
> 
> http://www.spinics.net/lists/linux-nfs/msg65539.html

I was just thinking about this... I don't think
we can put these patches in to merge libnfsidmap
into nfs-utils because it changes the RHEL ABI.

Packages that are now dependent on libnfsidmap will 
have to change to nfs-utils which I don't think 
is legal in a RHEL update release.

So I'm thinking this merge will have to be a RHEL8 thing.
The merge should probably start in Fedora.

Comment 10 Steve Dickson 2017-10-24 18:53:54 UTC
Wit that said... I guess we just need to pull in the patches that fix this bug.

Comment 11 Alice Mitchell 2017-10-24 21:32:33 UTC
These patches only need to merge the two SRPMS into one, it can still output two separate binary RPMS with the existing names. If libnfsidmap is listed as a subpackage within the nfs-utils spec file but with a non-derivate (-n) %package name.

The ABI stays exactly the same, the RPM filenames stay the same, even the dependencies would stay the same, only difference is the SRPM they came from.

If you can point me at where you keep the spec file for nfs-utils I am happy to make the changes for you to test.

Comment 12 Steve Dickson 2017-10-25 12:47:05 UTC
(In reply to Justin Mitchell from comment #11)
> These patches only need to merge the two SRPMS into one, it can still output
> two separate binary RPMS with the existing names. If libnfsidmap is listed
> as a subpackage within the nfs-utils spec file but with a non-derivate (-n)
> %package name.
> 
> The ABI stays exactly the same, the RPM filenames stay the same, even the
> dependencies would stay the same, only difference is the SRPM they came from.
> 
> If you can point me at where you keep the spec file for nfs-utils I am happy
> to make the changes for you to test.

fedpkg clone nfs-utils for fedora 
rhpkg clone nfs-utils for rhel

Comment 20 Steve Dickson 2017-11-15 14:31:17 UTC
*** Bug 1498210 has been marked as a duplicate of this bug. ***

Comment 21 Alice Mitchell 2017-11-15 18:27:43 UTC
Created attachment 1352845 [details]
Alternative patch with minimal rewrite

This is a minimal rewrite of the config parser code which should fix the whitespace issue without adding in any of the newer features that the nfs-utils version contains, like quoted strings or section arguments.

Comment 22 Steve Dickson 2017-11-15 19:22:34 UTC
(In reply to Justin Mitchell from comment #21)
> Created attachment 1352845 [details]
> Alternative patch with minimal rewrite
> 
> This is a minimal rewrite of the config parser code which should fix the
> whitespace issue without adding in any of the newer features that the
> nfs-utils version contains, like quoted strings or section arguments.

Unfortunately does not apply to the latest version in libnfsidmap
Will take a quick look...

Comment 23 Steve Dickson 2017-11-15 19:43:08 UTC
Under http://people.redhat.com/steved/.bz1455923/

I put an rpm that has Justin backported patch which
I believe takes care of the problem... would it be
possible to verify this?

Comment 24 Alice Mitchell 2017-11-16 09:21:04 UTC
(In reply to Steve Dickson from comment #22)
> (In reply to Justin Mitchell from comment #21)
> > Created attachment 1352845 [details]
> > Alternative patch with minimal rewrite
> > 
> > This is a minimal rewrite of the config parser code which should fix the
> > whitespace issue without adding in any of the newer features that the
> > nfs-utils version contains, like quoted strings or section arguments.
> 
> Unfortunately does not apply to the latest version in libnfsidmap
> Will take a quick look...

Odd, I based it on my checkout of the libnfsidmap git tree, head of which was ba7daeb, which i couldnt update as you have now removed/locked the origin.

Comment 26 Stefan Walter 2017-11-28 10:40:23 UTC
I tried the libnfsidmap-0.25-18.el7 RPM with the following idmapd.conf

[Translation]
Method = static, nsswitch

[Static]
domain users = users
domain users = users
domain users.ch = users

Didn't work and I found the following log entry:

Nov 28 11:31:01 muster nfsidmap[1674]: static_getpwnam: localname 'users' for 'domain' not found
Nov 28 11:31:01 muster nfsidmap[1674]: key: 0x2a5369b0 type: gid value: domain users.ch timeout 600
Nov 28 11:31:01 muster nfsidmap[1674]: nfs4_name_to_gid: calling static->name_to_gid
Nov 28 11:31:01 muster nfsidmap[1674]: nfs4_name_to_gid: static->name_to_gid returned -2
Nov 28 11:31:01 muster nfsidmap[1674]: nfs4_name_to_gid: calling regex->name_to_gid

The '... static_getpwnam: localname 'users' ...' looks strange to me in the context of a group lookup. Can I have the SRPM for ibnfsidmap-0.25-18.el7 to debug?

Comment 27 Alice Mitchell 2017-11-28 11:01:37 UTC
For the SRPMs that I can find, -18 had the patch file but it was empty, -19 contains the fix properly.

Comment 28 Yongcheng Yang 2017-11-29 05:07:33 UTC
Thank Justin for the clarification.

Hi Steve, would you please help to share libnfsidmap-0.25-19.el7 out?

Comment 29 Steve Dickson 2017-11-29 12:20:07 UTC
(In reply to Stefan Walter from comment #26)
> 
> The '... static_getpwnam: localname 'users' ...' looks strange to me in the
> context of a group lookup. Can I have the SRPM for ibnfsidmap-0.25-18.el7 to
> debug?
I just updated the rpms under http://people.redhat.com/steved/.bz1455923/
Please give them another try... Thank you!

Comment 30 Stefan Walter 2017-12-11 13:12:02 UTC
Just tried libnfsidmap-0.25-19.el7 and with the following sections I get 'domain users' mapped to the local 'users' group:

[Static]
D\domain users = users

[Translation]
Method = static, nsswitch

Seems to work!

Comment 31 Steve Dickson 2018-01-03 17:04:15 UTC
(In reply to Stefan Walter from comment #30)
> Just tried libnfsidmap-0.25-19.el7 and with the following sections I get
> 'domain users' mapped to the local 'users' group:
> 
> [Static]
> D\domain users = users
> 
> [Translation]
> Method = static, nsswitch
> 
> Seems to work!

Thank you!

Comment 32 Yongcheng Yang 2018-02-26 02:23:19 UTC
Moving to VERIFIED according to comment #30. Thanks for your help!

Comment 35 errata-xmlrpc 2018-04-10 18:51:32 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://access.redhat.com/errata/RHBA-2018:1016


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