Tim - thanks for that advice! Now I'm finally there:
git bisect good ca6fe3344554d31ac9c0f7e2e6be490c2d5d501f is the first bad commit commit ca6fe3344554d31ac9c0f7e2e6be490c2d5d501f Author: Eric W. Biederman <ebied...@xmission.com> Date: Tue Sep 6 09:32:01 2016 -0500 fs: Call d_automount with the filesystems creds BugLink: http://bugs.launchpad.net/bugs/1612135 Seth Forshee reported a mount regression in nfs autmounts with "fs: Add user namespace member to struct super_block". It turns out that the assumption that current->cred is something reasonable during mount while necessary to improve support of unprivileged mounts is wrong in the automount path. To fix the existing filesystems override current->cred with the init_cred before calling d_automount and restore current->cred after d_automount completes. To support unprivileged mounts would require a more nuanced cred selection, so fail on unprivileged mounts for the time being. As none of the filesystems that currently set FS_USERNS_MOUNT implement d_automount this check is only good for preventing future problems. Fixes: 6e4eab577a0c ("fs: Add user namespace member to struct super_block") Tested-by: Seth Forshee <seth.fors...@canonical.com> Signed-off-by: "Eric W. Biederman" <ebied...@xmission.com> (backported from commit aeaa4a79ff6a5ed912b7362f206cf8576fca538b) Signed-off-by: Seth Forshee <seth.fors...@canonical.com> Acked-by: Stefan Bader <stefan.ba...@canonical.com> Acked-by: Colin King <colin.k...@canonical.com> Acked-by: Brad Figg <brad.f...@canonical.com> Signed-off-by: Tim Gardner <tim.gard...@canonical.com> :040000 040000 3b16a342088c0cfead081f63bc7fe9bed93bcf00 2634a48c59a1c6b313be2d8406644fd9d0e18a60 M fs ** Attachment added: "Git bisect log showing leading to the first bad commit." https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1629205/+attachment/4756633/+files/git_bisect_log_final -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1629205 Title: regression: with linux-image-4.4.0-38-generic autofs tries to acess folders as root instead of the user Status in linux package in Ubuntu: Confirmed Bug description: Running with linux-image-4.4.0-38-generic autofs is not working properly anymore: when I try to access a autofs-monitored folder as normal user "joe" the environment variable $AUTOFS_USER inside the auto mounter map script is set to "root" instead of the user "joe". A little background information: in our setup the autofs master map /etc/auto.master contains a line: /mnt/cifs /etc/auto.cifs-shares --timeout=300 --verbose The script /etc/auto.cifs-shares contains for debugging purposes the lines: DEBUG=true $DEBUG && logger -p debug -- "$0: running 'env|grep AUTOFS':" $DEBUG && logger -p debug -- "$(env|grep AUTOFS)" and if test "$1" = "$AUTOFS_USER" ; then ## First generate automount map [..] else logger -p debug -- "$0: Error: User '$AUTOFS_USER' tried to access wrong directory '$1'" fi Which yields to the following errors in the logs: Sep 29 17:03:20 pcXXXXXX root[7613]: AUTOFS_SHOST=pc203re3 AUTOFS_HOME=/root AUTOFS_GID=0 AUTOFS_UID=0 AUTOFS_GROUP=root AUTOFS_USER=root Sep 29 17:03:20 pcXXXXXX root[7614]: /etc/auto.cifs-shares: Error: User 'root' tried to access wrong directory 'joe' Sep 29 17:03:20 pcXXXXXX automount[7557]: lookup(program): lookup for joe failed Sep 29 17:03:20 pcXXXXXX automount[7557]: failed to mount /mnt/cifs/joe So for some reason autofs with this kernel gets the environment variables wrong. Running an older Kernel like linux-image-4.4.0-36-generic does not show this problem and the cifs shares work as expected. other Info: lsb_release -rd Description: Ubuntu 16.04.1 LTS Release: 16.04 uname -r 4.4.0-38-generic If you need any further info or testing, please let me know. Thanks, Robert Euhus ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: linux-image-4.4.0-38-generic 4.4.0-38.57 ProcVersionSignature: Ubuntu 4.4.0-38.57-generic 4.4.19 Uname: Linux 4.4.0-38-generic x86_64 ApportVersion: 2.20.1-0ubuntu2.1 Architecture: amd64 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC0: euhus 1711 F.... pulseaudio CurrentDesktop: GNOME Date: Fri Sep 30 09:36:31 2016 HibernationDevice: RESUME=UUID=1aae5293-ed3d-4dae-a8b5-54d831262f4a IwConfig: lo no wireless extensions. enp0s31f6 no wireless extensions. MachineType: Dell Inc. OptiPlex 5040 ProcFB: 0 inteldrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-38-generic root=UUID=adae86bf-dc79-4962-aa5f-41a1a037c8ec ro quiet splash vt.handoff=7 RelatedPackageVersions: linux-restricted-modules-4.4.0-38-generic N/A linux-backports-modules-4.4.0-38-generic N/A linux-firmware 1.157.3 RfKill: 0: hci0: Bluetooth Soft blocked: no Hard blocked: no SourcePackage: linux UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 01/15/2016 dmi.bios.vendor: Dell Inc. dmi.bios.version: 1.2.7 dmi.board.name: 0R790T dmi.board.vendor: Dell Inc. dmi.board.version: A00 dmi.chassis.type: 3 dmi.chassis.vendor: Dell Inc. dmi.modalias: dmi:bvnDellInc.:bvr1.2.7:bd01/15/2016:svnDellInc.:pnOptiPlex5040:pvr:rvnDellInc.:rn0R790T:rvrA00:cvnDellInc.:ct3:cvr: dmi.product.name: OptiPlex 5040 dmi.sys.vendor: Dell Inc. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1629205/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp