Thanks Jonathan.

# /usr/sbin/dtrace -32 -s d3_2.d -c /var/tmp/getspnam.o

dtrace: script 'd3_2.d' matched 1 probe
dtrace: pid 12352 has exited
dtrace: error on enabled probe ID 1 (ID 77377: 
pid12352:libc.so.1:getspnam:return): invalid address (0x6e322000) in action #2 
at DIF offset 20

here is the complete script

typedef struct spwd {
        char *sp_namp;  /* user name */
        char *sp_pwdp;  /* user password */
        int sp_lstchg;  /* password lastchanged date */
        int sp_min;     /* minimum number of days between password changes */
        int sp_max;     /* number of days password is valid */
        int sp_warn;    /* number of days to warn user to change passwd */
        int sp_inact;   /* number of days the login may be inactive */
        int sp_expire;  /* date when the login is no longer valid */
        unsigned int sp_flag;   /* currently not being used */
} spwd_t;


pid$target::getspnam:return
   /arg1 != NULL/ {
   self->spwd = (spwd_t *)copyin(arg1, sizeof(spwd_t));
   printf("name: %s", copyinstr((uintptr_t)(uint32_t)self->spwd->sp_namp));
}
-- 
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to