[s390x] DEP8 authenticated smb test failure

Bug #1955851 reported by Andreas Hasenack
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autofs (Ubuntu)
Fix Released
Undecided
Andreas Hasenack
samba (Ubuntu)
Fix Released
Undecided
Andreas Hasenack

Bug Description

The DEP8 authenticated cifs test is currently failing. The reason is an incorrect (but that seemed to work previously) smb user creation:

    echo "${password}\n${password}" | smbpasswd -s -a ${username}

This is missing an "-e" at least, so that \n is correctly interpreted:

    echo -e "${password}\n${password}" | smbpasswd -s -a ${username}

I'm at a loss to explain why only s390x was/is affected. In fact, I reproduced the test failure in a plain amd64 VM.

I also don't understand why in the failed s390x logs the smb user was created, apparently:

Setting samba password for the smbtest2765 user
+ echo Setting samba password for the smbtest2765 user
+ smbpasswd -s -a smbtest2765
+ echo 2765\n2765
Added user smbtest2765.

When I reproduced it in both a s390x vm, and amd64, I got:
+ echo 'Setting samba password for the smbtest24990 user'
Setting samba password for the smbtest24990 user
+ smbpasswd -s -a smbtest24990
+ echo '24990\n24990'
Unable to get new password.

Anyway, the bug seems obvious, and also affects the samba DEP8 tests (which, also for unknown reasons, haven't failed (yet?)).

Related branches

summary: - DEP8 authenticatied smb test failure
+ DEP8 authenticated smb test failure
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Re: DEP8 authenticated smb test failure

This definitely also affects the samba package:
$ sudo bash debian/tests/smbclient-authenticated-share-list
+ set -e
+ . debian/tests/util
+ username=smbtest2116
+ password=2116
+ add_user smbtest2116 2116
+ local username=smbtest2116
+ local password=2116
+ echo 'Creating a local and samba user called smbtest2116'
Creating a local and samba user called smbtest2116
+ useradd -m smbtest2116
+ echo 'Setting samba password for the smbtest2116 user'
Setting samba password for the smbtest2116 user
+ smbpasswd -s -a smbtest2116
+ echo '2116\n2116'
Unable to get new password.

Changed in samba (Ubuntu):
status: New → In Progress
assignee: nobody → Andreas Hasenack (ahasenack)
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Even though the smbpasswd usage is a bit wonky/unclear, there is a real bug with autofs 5.1.8 in s390x. dmesg is full of messages like these when the problem happens:

[ 435.375028] autofs4:pid:9655:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)
[ 435.375116] autofs4:pid:9655:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)
[ 435.375163] autofs4:pid:9655:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)
[ 435.375211] autofs4:pid:9655:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)
[ 435.375215] autofs4:pid:9655:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)
[ 435.375217] autofs4:pid:9655:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)

summary: - DEP8 authenticated smb test failure
+ [s390x] DEP8 authenticated smb test failure
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

With 5.1.8, when I do this:
root@j-s390x:~# l /cifs/localhost
ls: cannot access '/cifs/localhost': No such file or directory

I get this in dmesg:
[Tue Jan 4 12:23:46 2022] autofs4:pid:1026:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)
[Tue Jan 4 12:23:46 2022] autofs4:pid:1026:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)
[Tue Jan 4 12:23:46 2022] autofs4:pid:1026:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)
[Tue Jan 4 12:23:46 2022] autofs4:pid:1026:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)
[Tue Jan 4 12:23:46 2022] autofs4:pid:1026:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)
[Tue Jan 4 12:23:46 2022] autofs4:pid:1026:validate_dev_ioctl: invalid path supplied for cmd(0xc018937e)

With 5.1.7, it works.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
tags: added: server-todo
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Upstream posted several patches against 5.1.8. I'm trying them, and I think one of them fixes this issue. Just confirming in bileto, and then cleaning the packaging up (remove all my debugging).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autofs - 5.1.8-1ubuntu1

---------------
autofs (5.1.8-1ubuntu1) jammy; urgency=medium

  * Fix authenticated cifs mount failure caught by DEP8 (LP: #1955851):
    - d/t/smb-mount: fix setting the password of the smb test user
    - d/p/fix-loop-under-run-in-cache_get_offset_parent.patch: fix crash
      on s390x

 -- Andreas Hasenack <email address hidden> Thu, 20 Jan 2022 15:16:09 -0300

Changed in autofs (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba - 2:4.15.5~dfsg-0ubuntu1

---------------
samba (2:4.15.5~dfsg-0ubuntu1) jammy; urgency=medium

  * d/{gpb.conf,watch,README.source}: update for 4.15
  * New upstream release: 4.15.5 (LP: #1946839)
  * d/p/Rename-mdfind-to-mdsearch.patch: removed, applied usptream
  * d/rules: remove --with-dnsupdate, it was merged with
    --with-ads in samba 4.15.0
  * d/control: bump required build-depends
  * d/rules: drop removal of ctdb tests, they are no longer installed
  * Remove findsmb, no longer installed:
    - d/smbclient.install: remove findsmb
    - d/rules: drop fixing of findsmb shebang
  * d/ctdb.install: remove ctdb_local_daemons, part of ctdb tests,
    no longer installed
  * d/samba-libs.install: update list of installed libraries and
    modules/plugins
  * d/ctdb.install: add tdb_mutex_check
  * d/winbind.install: add async_dns_krb5_locator
  * d/samba.install: install samba-bgqd and its manpage
  * d/{libsmbclient,libwbclient0}.symbols: symbols updates
  * d/control: add python3-markdown to build-depends
  * d/watch: updated to handle ~dfsg versioning, thanks to
    Sergio Durigan Junior <email address hidden>

 -- Andreas Hasenack <email address hidden> Tue, 22 Feb 2022 17:59:22 -0300

Changed in samba (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.