FS#68666 - [libcap-ng] [cifs-utils] mounts.cifs fails after upgrade to libcap-ng 0.8.1-1

Attached to Project: Arch Linux
Opened by Anonymous (mycifsbroke) - Thursday, 19 November 2020, 04:46 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 17 December 2020, 09:38 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Tobias Powalowski (tpowa)
David Runge (dvzrv)
Levente Polyak (anthraxx)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 10
Private No

Details

After upgrading to libcap-ng 0.8.1-1, mount.cifs fails to mount shares with error:

"Unable to apply new capabilities"

Fixed after downgrading to libcap-ng 0.8-1

Steps to reproduce:

1. Install testing/libcap-ng-0.8.1-1
2. Attempt to mount share with mount.cifs
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Thursday, 17 December 2020, 09:38 GMT
Reason for closing:  Fixed
Additional comments about closing:  6.11-3
Comment by loqs (loqs) - Thursday, 19 November 2020, 05:16 GMT
Same cause as  FS#68664  capng_apply returning an error with libcap-ng 0.8-1:
if (capng_apply(CAPNG_SELECT_BOTH)) {
fprintf(stderr, "Unable to apply new capability set.\n");
return EX_SYSERR;
}
Comment by David Runge (dvzrv) - Thursday, 19 November 2020, 09:47 GMT
Judging from cifs-utils' upstream code also /usr/bin/cifs.upcall will be affected by this change in libcap-ng.
I haven't had the time to look into the mailing list there, but so far no fix for current libcap-ng has landed in its git repository :-/
Comment by Jonas Witschel (diabonas) - Saturday, 21 November 2020, 11:24 GMT
I have sent the attached patch series to fix the issue to the linux-cifs mailing list: https://marc.info/?l=linux-cifs&m=160595758021262
Comment by Bernhard Walle (bwalle) - Tuesday, 24 November 2020, 13:47 GMT
@Jonas: Confirmed that the patch fixes the problem here :)
Comment by Tobias Powalowski (tpowa) - Wednesday, 09 December 2020, 09:32 GMT
Patch applied. Thx
Comment by Alexander Koch (lynix) - Wednesday, 16 December 2020, 14:29 GMT
  • Field changed: Percent Complete (100% → 0%)
Even with the patch series applied `cifs.upcall` still fails for me when trying to set new caps in drop_all_capabilities().

Patching the function in a similar way to trim_capabilities() fixes the issue. I can provide a patch if desired.
Comment by Tobias Powalowski (tpowa) - Wednesday, 16 December 2020, 15:00 GMT
Please post a patch.
Comment by Alexander Koch (lynix) - Wednesday, 16 December 2020, 17:20 GMT
Here it is, along with an updated PKGBUILD.

I'm in contact with Jonas in regard of submitting the patch upstream.
Comment by Jonas Witschel (diabonas) - Wednesday, 16 December 2020, 21:57 GMT
Updated patch sent upstream to20201216214455.41251-1-diabonas@archlinux.org/"> https://lore.kernel.org/linux-cifs/20201216214455.41251-1-diabonas@archlinux.org/ also attached to this comment for completeness. This patch is intended to applied in addition to the previous patch series (https://bugs.archlinux.org/task/68666?getfile=19452). Thank you very much to Alexander for reporting the issue and helping develop and test a fix!

Loading...