Bug 131689

Summary: improve sendmsg handling
Product: [Fedora] Fedora Reporter: Ulrich Drepper <drepper>
Component: straceAssignee: Roland McGrath <roland>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ldv
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-06 22:08:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to implement printing control message in sendmsg
none
better patch
none
patch with correct cmsg length none

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