Bug 1255870 - Patch for bugzilla 858164 replaced incorrect lines
Patch for bugzilla 858164 replaced incorrect lines
Status: CLOSED DUPLICATE of bug 1248820
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
unspecified Severity medium
: rc
: ---
Assigned To: Ian Kent
Filesystem QE
Depends On:
  Show dependency treegraph
Reported: 2015-08-21 14:16 EDT by Frank Sorenson
Modified: 2015-08-21 20:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-08-21 20:32:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Frank Sorenson 2015-08-21 14:16:44 EDT
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:


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-21 20:32:21 EDT
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.