Ralf Weber
2009-Jan-30 15:27 UTC
[dtrace-discuss] How to find from privileges sets to privileges names
Moin!
I am trying to debug a problem with privileges inside zones and
therefore have created the following small d script:
#!/usr/sbin/dtrace -s
syscall::privsys:entry
/arg2 == 2 && arg1 == 2/
{
pa = (priv_set_t *)copyin (arg3, arg4);
printf ("%x%x%x\n", pa->pbits[0], pa->pbits[1],
pa->pbits[2]);
}
syscall::privsys:return
{
printf ("Exit: %s:%d %d\n", execname, pid, arg0);
}
Now that works perfect an gives me the following output (some lines
deleted):
0 45952 privsys:entry 40163880080000
0 45953 privsys:return Exit: svc.startd:15859 0
1 45952 privsys:entry 40123884040000
1 45953 privsys:return Exit: zebra:15684 -1
Which shows me that zebra can''t set the privilege set 40123884040000.
Now my question is how do I get from that hexadecimal number to the
privilege names? Which bit means which privilege. The only result I
found was that it should be in sys/priv_const.h, but that doesn''t
exist in the source browser, only the awk script that generates it.
Can I found it on a system somewhere?
TIA and so long
-Ralf
---
Ralf Weber
Chip Bennett
2009-Jan-30 16:15 UTC
[dtrace-discuss] How to find from privileges sets to privilegesnames
Ralf, The header file is in /usr/include/sys on your Solaris 10 system. Chip> -----Original Message----- > From: dtrace-discuss-bounces at opensolaris.org [mailto:dtrace-discuss- > bounces at opensolaris.org] On Behalf Of Ralf Weber > Sent: Friday, January 30, 2009 9:28 AM > To: dtrace-discuss at opensolaris.org > Cc: Vladislav Vishnyakov - Sun Microsystems - Camberley United Kingdom > Subject: [dtrace-discuss] How to find from privileges sets to > privilegesnames > > Moin! > > I am trying to debug a problem with privileges inside zones and > therefore have created the following small d script: > > #!/usr/sbin/dtrace -s > > syscall::privsys:entry > /arg2 == 2 && arg1 == 2/ > { > pa = (priv_set_t *)copyin (arg3, arg4); > printf ("%x%x%x\n", pa->pbits[0], pa->pbits[1],pa->pbits[2]);> } > > syscall::privsys:return > { > printf ("Exit: %s:%d %d\n", execname, pid, arg0); > } > > > Now that works perfect an gives me the following output (some lines > deleted): > 0 45952 privsys:entry 40163880080000 > 0 45953 privsys:return Exit: svc.startd:15859 0 > 1 45952 privsys:entry 40123884040000 > 1 45953 privsys:return Exit: zebra:15684 -1 > Which shows me that zebra can''t set the privilege set 40123884040000. > > Now my question is how do I get from that hexadecimal number to the > privilege names? Which bit means which privilege. The only result I > found was that it should be in sys/priv_const.h, but that doesn''t > exist in the source browser, only the awk script that generates it. > Can I found it on a system somewhere? > > TIA and so long > -Ralf > --- > Ralf Weber > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
Ralf Weber
2009-Jan-30 16:38 UTC
[dtrace-discuss] How to find from privileges sets to privilegesnames
Moin! On 30.01.2009, at 17:15, Chip Bennett wrote:> The header file is in /usr/include/sys on your Solaris 10 system.Ouch PEBKAC, sorry for that - the machine didn''t have SUNWhea installed, that''s why my find didn''t succeed. Thanks for the hint I installed the package now and will dig further. So long -Ralf --- Ralf Weber