Bug 131689 - improve sendmsg handling
improve sendmsg handling
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-03 05:45 EDT by Ulrich Drepper
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-06 18:08:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 05:46 EDT, Ulrich Drepper
no flags Details | Diff
better patch (9.41 KB, patch)
2004-09-03 18:00 EDT, Ulrich Drepper
no flags Details | Diff
patch with correct cmsg length (9.44 KB, patch)
2004-09-13 02:39 EDT, Ulrich Drepper
no flags Details | Diff

  None (edit)
Description Ulrich Drepper 2004-09-03 05:45:38 EDT
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 05:46:24 EDT
Created attachment 103425 [details]
Patch to implement printing control message in sendmsg
Comment 2 Ulrich Drepper 2004-09-03 18:00:31 EDT
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 02:39:02 EDT
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 18:08:39 EDT
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 17:09:59 EDT
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.