Bug 131689 - improve sendmsg handling
Summary: improve sendmsg handling
Alias: None
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2004-09-03 09:45 UTC by Ulrich Drepper
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-06 22:08:39 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to implement printing control message in sendmsg (1.23 KB, patch)
2004-09-03 09:46 UTC, Ulrich Drepper
no flags Details | Diff
better patch (9.41 KB, patch)
2004-09-03 22:00 UTC, Ulrich Drepper
no flags Details | Diff
patch with correct cmsg length (9.44 KB, patch)
2004-09-13 06:39 UTC, Ulrich Drepper
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:131 normal SHIPPED_LIVE strace bug fix update 2005-05-19 04:00:00 UTC

Description Ulrich Drepper 2004-09-03 09:45:38 UTC
Description of problem:
The sendmsg handling does never interpret the control message.  I miss
especially the SCM_RIGHTS handling.  There was also a double comma.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.run code using SCM_RIGHTS
Actual results:
sendmsg(11, {msg_name(0)=NULL, msg_iov(0)=[], msg_controllen=16,
msg_control=0xf635b86c, , msg_flags=0}, 0) = 0

Expected results:
sendmsg(11, {msg_name(0)=NULL, msg_iov(0)=[], msg_controllen=16,
{cmsg_len=16, csmg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {7}},
msg_flags=0}, 0) = 0

Additional info:
I'll attach a patch.

Comment 1 Ulrich Drepper 2004-09-03 09:46:24 UTC
Created attachment 103425 [details]
Patch to implement printing control message in sendmsg

Comment 2 Ulrich Drepper 2004-09-03 22:00:31 UTC
Created attachment 103454 [details]
better patch

This is a better patch.  It does not hardcode the SOL_ and SCM_ values and also

I've also started adding const to a few tables which in turn required adding
const to a few function parameters, return values, and local variables.  No
code changes necessary.

Comment 3 Ulrich Drepper 2004-09-13 06:39:02 UTC
Created attachment 103780 [details]
patch with correct cmsg length

The control message length was determined incorrectly, which can lead to an
incorrect number of file descriptors being printed.

Comment 4 Roland McGrath 2004-10-06 22:08:39 UTC
That patch had some random other changes in it, which I did not
necessarily use.  File those separately with rationale if you want them.

The cmsg handling is in now.

Comment 5 Tim Powers 2005-05-19 21:09:59 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.