Bug 196025

Summary: [dtrace] [patch] failed to compile script cddl/contrib/dtracetoolkit/User/setuids.d
Product: Base System Reporter: presto <altusensix>
Component: miscAssignee: George V. Neville-Neil <gnn>
Status: In Progress ---    
Severity: Affects Some People CC: gnn, skreuzer
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
patch for cddl/contrib/dtracetoolkit/User/setuids.d none

Description presto 2014-12-16 11:55:34 UTC
Created attachment 150643 [details]
patch for cddl/contrib/dtracetoolkit/User/setuids.d

While trying to run cddl/contrib/dtracetoolkit/User/setuids.d i got error:
dtrace: failed to compile script cddl/contrib/dtracetoolkit/User/setuids.d: line 70: t_procp is not a member of struct thread

Script is snooping setuid calls and as part of output trying to print parent process name for process that call setuid. As error says t_procp is not a member of struct thread, so i change script to access right structure.

* before patch
# cddl/contrib/dtracetoolkit/User/setuids.d
dtrace: failed to compile script cddl/contrib/dtracetoolkit/User/setuids.d: line 70: t_procp is not a member of struct thread

* after patch
# cddl/contrib/dtracetoolkit/User/setuids.d
  UID  SUID  PPID   PID PCMD         CMD
    0     0 49420 49726 bash         sudo -s\0
Comment 1 Pedro F. Giffuni freebsd_committer 2017-11-04 20:08:55 UTC
The Dtrace Toolkit is maintained in ports. gnn@ might be interested as well.
Comment 2 Steven Kreuzer freebsd_committer 2017-11-22 19:56:38 UTC
(In reply to Pedro F. Giffuni from comment #1)

I just marked this port as DEPRECATED now that dtracetoolkit is available as part of the base system under contrib/