Bug 131689 - improve sendmsg handling
Summary: improve sendmsg handling
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: strace
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2004-10-06 22:08:39 UTC
Type: ---
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:131 0 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):
strace-4.5.7-2

How reproducible:
always

Steps to Reproduce:
1.run code using SCM_RIGHTS
2.
3.
  
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
handles SCM_CREDENTIALS.

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.

http://rhn.redhat.com/errata/RHBA-2005-131.html



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