Handle the sethostname system call. BZ#311922.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13458
This commit is contained in:
Tom Hughes 2013-07-17 12:43:30 +00:00
parent 3abde5b717
commit a9453e4bce
4 changed files with 10 additions and 2 deletions

View File

@ -149,6 +149,7 @@ DECL_TEMPLATE(generic, sys_chown);
DECL_TEMPLATE(generic, sys_setuid);
DECL_TEMPLATE(generic, sys_gettimeofday);
DECL_TEMPLATE(generic, sys_madvise);
DECL_TEMPLATE(generic, sys_sethostname);
// These ones aren't POSIX, but are in some standard and look reasonably
// generic, and are the same for all architectures under Linux.

View File

@ -912,7 +912,7 @@ static SyscallTableEntry syscall_table[] = {
// (__NR_swapoff, sys_swapoff), // 168
// (__NR_reboot, sys_reboot), // 169
// (__NR_sethostname, sys_sethostname), // 170
GENX_(__NR_sethostname, sys_sethostname), // 170
// (__NR_setdomainname, sys_setdomainname), // 171
GENX_(__NR_iopl, sys_iopl), // 172
LINX_(__NR_ioperm, sys_ioperm), // 173

View File

@ -4230,6 +4230,13 @@ POST(sys_sigaltstack)
POST_MEM_WRITE( ARG2, sizeof(vki_stack_t));
}
PRE(sys_sethostname)
{
PRINT("sys_sethostname ( %#lx, %ld )", ARG1,ARG2);
PRE_REG_READ2(long, "sethostname", char *, name, int, len);
PRE_MEM_READ( "sethostname(name)", ARG1, ARG2 );
}
#undef PRE
#undef POST

View File

@ -1501,7 +1501,7 @@ static SyscallTableEntry syscall_table[] = {
LINX_(__NR_setregid, sys_setregid16), // 71
PLAX_(__NR_sigsuspend, sys_sigsuspend), // 72
LINXY(__NR_sigpending, sys_sigpending), // 73
//zz // (__NR_sethostname, sys_sethostname), // 74 */*
GENX_(__NR_sethostname, sys_sethostname), // 74
//zz
GENX_(__NR_setrlimit, sys_setrlimit), // 75
GENXY(__NR_getrlimit, sys_old_getrlimit), // 76