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 1255870 - Patch for bugzilla 858164 replaced incorrect lines
Summary: Patch for bugzilla 858164 replaced incorrect lines
Keywords:
Status: CLOSED DUPLICATE of bug 1248820
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.7
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: Filesystem QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-21 18:16 UTC by Frank Sorenson
Modified: 2019-08-15 05:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-22 00:32:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch to correct broken uid/gid and fix pid/tgid lines (940 bytes, text/plain)
2015-08-21 18:16 UTC, Frank Sorenson
no flags Details

Description Frank Sorenson 2015-08-21 18:16:44 UTC
Created attachment 1065676 [details]
patch to correct broken uid/gid and fix pid/tgid lines

Description of problem:

commit 52e9e2ef9fcf667da3b09de834fd4b7566c773d8 for bugzilla 858164 broke autofs uid and gid, and did not solve bugzilla 858164 correctly.

In addition, Customer experienced autofs mount failures when mounting cifs volumes using krb authentication


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

kernels 2.6.32-505.el6-7-g52e9e2e and more recent


How reproducible:

always

Steps to Reproduce:

 Code review

 Automount failure was reproduced by customer, but not provided.


Actual results:

 mount is attempted with uid=0 and gid=0


Expected results:

 mount is attempted with uid/gid of the user making the call 


Additional info:

 This is a regression from the RHEL 6.6 kernel.

 Verbose automount debugging from 2.6.32-504.30.3.el6 kernel shows correct uid/gid in mount attempt:

2015-08-13T14:38:02.950816+02:00 server1 automount[2864]: mount_mount: mount(generic): calling mount -t cifs -s -o sec=krb5,uid=500,gid=100,file_mode=0700,dir_mode=0700,nobrl //server2/scanner /mnt/server2_scanner

 in 2.6.32-573.3.1.el6 kernel, uid/gid 0 are used in mount attempt:
2015-08-13T14:23:31.750570+02:00 server1 automount[5128]: mount_mount: mount(generic): calling mount -t cifs -s -o sec=krb5,uid=0,gid=0,file_mode=0700,dir_mode=0700,nobrl //server2/scanner /mnt/server2_scanner


The broken commit replaced the 'wq->uid' and 'wq->gid' lines, rather than the 'wq->pid' and 'wq->tgid' lines:

diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index 150826b..ded41e6 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -410,8 +422,8 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
                memcpy(&wq->name, &qstr, sizeof(struct qstr));
                wq->dev = autofs4_get_dev(sbi);
                wq->ino = autofs4_get_ino(sbi);
-               wq->uid = current_uid();
-               wq->gid = current_gid();
+               wq->pid = pid;
+               wq->tgid = tgid;
                wq->pid = current->pid;
                wq->tgid = current->tgid;
                wq->status = -EINTR; /* Status return if interrupted */


patch to correct this is attached

Comment 2 Ian Kent 2015-08-22 00:32:21 UTC
Thanks Frank but I beat you to it.

*** This bug has been marked as a duplicate of bug 1248820 ***


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