[Pkg-samba-maint] Bug#701422: Bug#701422: cifs-utils: ftbfs with eglibc-2.17

Steve Langasek vorlon at debian.org
Sat Feb 23 22:13:38 UTC 2013


Hi Matthias,

On Sat, Feb 23, 2013 at 11:35:23AM +0000, Matthias Klose wrote:
> The package fails to build in a test rebuild on at least amd64 with
> eglibc-2.17, but succeeds to build with eglibc-2.13. The
> severity of this report may be raised before the jessie release.

> The test rebuild was done together with GCC-4.8, so some issues
> might be caused by the updated GCC as well.

>   mount.cifs.c:1863:11: error: ignoring return value of 'setfsuid', declared with attribute warn_unused_result [-Werror=unused-result]

This sounds to me like a bug in eglibc 2.17.  From setfsuid(2):

RETURN VALUE
       On success, the previous value of fsuid is returned.  On error,
       the current value of fsuid is returned.

BUGS
       No error messages of any kind are returned to the caller.  At the very
       least, EPERM should be returned when the call fails (because the caller
       lacks the CAP_SETUID capability).

So the return value of setfsuid() doesn't tell you anything about whether
the call succeeded.  If the return value matches the argument, there's no
way to tell if this is because that was *already* the value of the fsuid, or
if the setfsuid() call failed.  Furthermore, in many cases a failed
setfsuid() has no impact on what the caller should do.  (In the case of
cifs-utils, the call is 'setfsuid(oldfsuid)'... so a failure here means a
*second* setfsuid call has failed after the first has already succeeded, and
if that happens, <shrug> there's nothing we can/should do differently, but
try to proceed and hope nothing else fails due to file permissions.)

I think this is a case of eglibc upstream being too aggressive in their use
of __warn_unused_result__.  Do you agree?  Should I reassign the bug to
eglibc?

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20130223/0375b2ba/attachment.pgp>


More information about the Pkg-samba-maint mailing list