}
static int
-do_accept(struct tcb *tcp, int flags_arg)
+do_sockname(struct tcb *tcp, int flags_arg)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
int
sys_accept(struct tcb *tcp)
{
- return do_accept(tcp, -1);
+ do_sockname(tcp, -1);
+ return RVAL_FD;
}
int
sys_accept4(struct tcb *tcp)
{
- return do_accept(tcp, 3);
+ do_sockname(tcp, 3);
+ return RVAL_FD;
}
int
int
sys_getsockname(struct tcb *tcp)
{
- return sys_accept(tcp);
+ return do_sockname(tcp, -1);
}
int
sys_getpeername(struct tcb *tcp)
{
- return sys_accept(tcp);
+ return do_sockname(tcp, -1);
}
static int
grep_log bind '\(0<socket:\[[0-9]+\]>, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0'
grep_log listen '\(0<socket:\[[0-9]+\]>, 5\) += 0'
grep_log getsockname '\(0<socket:\[[0-9]+\]>, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, \[15\]\) += 0'
-grep_log accept '\(0<socket:\[[0-9]+\]>, \{sa_family=AF_(LOCAL|UNIX|FILE), NULL\}, \[2\]\) += 1'
+grep_log accept '\(0<socket:\[[0-9]+\]>, \{sa_family=AF_(LOCAL|UNIX|FILE), NULL\}, \[2\]\) += 1<socket:\[[0-9]+\]>'
grep_log connect '\(1<socket:\[[0-9]+\]>, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0'
exit 0