Index: lib/libc/powerpc/sys/Makefile.inc =================================================================== --- lib/libc/powerpc/sys/Makefile.inc (revision 184691) +++ lib/libc/powerpc/sys/Makefile.inc (working copy) @@ -3,8 +3,7 @@ MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o yield.o PSEUDO= _getlogin.o _exit.o .if !defined(WITHOUT_SYSCALL_COMPAT) Index: lib/libc/arm/sys/Makefile.inc =================================================================== --- lib/libc/arm/sys/Makefile.inc (revision 184691) +++ lib/libc/arm/sys/Makefile.inc (working copy) @@ -3,8 +3,7 @@ MDASM= Ovfork.S brk.S cerror.S pipe.S ptrace.S sbrk.S shmat.S sigreturn.S syscall.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o vfork.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o PSEUDO= _exit.o _getlogin.o .if !defined(WITHOUT_SYSCALL_COMPAT) Index: lib/libc/sparc64/sys/Makefile.inc =================================================================== --- lib/libc/sparc64/sys/Makefile.inc (revision 184691) +++ lib/libc/sparc64/sys/Makefile.inc (working copy) @@ -18,8 +18,7 @@ MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S sigaction.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o yield.o PSEUDO= _getlogin.o _exit.o .if !defined(WITHOUT_SYSCALL_COMPAT) Index: lib/libc/ia64/sys/Makefile.inc =================================================================== --- lib/libc/ia64/sys/Makefile.inc (revision 184691) +++ lib/libc/ia64/sys/Makefile.inc (working copy) @@ -4,8 +4,7 @@ sbrk.S setlogin.S sigreturn.S swapcontext.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o vfork.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o PSEUDO= _getlogin.o _exit.o .if !defined(WITHOUT_SYSCALL_COMPAT) Index: lib/libc/mips/sys/Makefile.inc =================================================================== --- lib/libc/mips/sys/Makefile.inc (revision 184691) +++ lib/libc/mips/sys/Makefile.inc (working copy) @@ -4,9 +4,8 @@ fork.S pipe.S ptrace.S sbrk.S shmat.S syscall.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o ftruncate.o getdomainname.o getlogin.o \ - lseek.o mmap.o openbsd_poll.o pread.o \ - pwrite.o setdomainname.o sstk.o truncate.o uname.o vfork.o yield.o +NOASM= break.o exit.o ftruncate.o getlogin.o lseek.o mmap.o \ + openbsd_poll.o pread.o pwrite.o sstk.o truncate.o vfork.o yield.o PSEUDO= _exit.o _getlogin.o .if !defined(WITHOUT_SYSCALL_COMPAT) Index: lib/libc/i386/sys/Makefile.inc =================================================================== --- lib/libc/i386/sys/Makefile.inc (revision 184691) +++ lib/libc/i386/sys/Makefile.inc (working copy) @@ -12,8 +12,7 @@ reboot.S sbrk.S setlogin.S sigreturn.S syscall.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o vfork.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o PSEUDO= _getlogin.o _exit.o .if !defined(WITHOUT_SYSCALL_COMPAT) Index: lib/libc/amd64/sys/Makefile.inc =================================================================== --- lib/libc/amd64/sys/Makefile.inc (revision 184691) +++ lib/libc/amd64/sys/Makefile.inc (working copy) @@ -7,8 +7,7 @@ reboot.S sbrk.S setlogin.S sigreturn.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o vfork.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o PSEUDO= _getlogin.o _exit.o .if !defined(WITHOUT_SYSCALL_COMPAT) Index: sys/kern/init_sysent.c =================================================================== --- sys/kern/init_sysent.c (revision 184691) +++ sys/kern/init_sysent.c (working copy) @@ -190,9 +190,9 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 159 = nosys */ { AS(lgetfh_args), (sy_call_t *)lgetfh, AUE_LGETFH, NULL, 0, 0 }, /* 160 = lgetfh */ { AS(getfh_args), (sy_call_t *)getfh, AUE_NFS_GETFH, NULL, 0, 0 }, /* 161 = getfh */ - { AS(getdomainname_args), (sy_call_t *)getdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 162 = getdomainname */ - { AS(setdomainname_args), (sy_call_t *)setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 163 = setdomainname */ - { AS(uname_args), (sy_call_t *)uname, AUE_NULL, NULL, 0, 0 }, /* 164 = uname */ + { compat4(AS(freebsd4_getdomainname_args),getdomainname), AUE_SYSCTL, NULL, 0, 0 }, /* 162 = old getdomainname */ + { compat4(AS(freebsd4_setdomainname_args),setdomainname), AUE_SYSCTL, NULL, 0, 0 }, /* 163 = old setdomainname */ + { compat4(AS(freebsd4_uname_args),uname), AUE_NULL, NULL, 0, 0 }, /* 164 = old uname */ { AS(sysarch_args), (sy_call_t *)sysarch, AUE_SYSARCH, NULL, 0, 0 }, /* 165 = sysarch */ { AS(rtprio_args), (sy_call_t *)rtprio, AUE_RTPRIO, NULL, 0, 0 }, /* 166 = rtprio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 167 = nosys */ Index: sys/kern/kern_xxx.c =================================================================== --- sys/kern/kern_xxx.c (revision 184691) +++ sys/kern/kern_xxx.c (working copy) @@ -148,6 +148,7 @@ } #endif /* COMPAT_43 */ +#ifdef COMPAT_FREEBSD4 /* * This is the FreeBSD-1.1 compatable uname(2) interface. These days it is * done in libc as a wrapper around a bunch of sysctl's. This must maintain @@ -163,9 +164,7 @@ #endif /* ARGSUSED */ int -uname(td, uap) - struct thread *td; - struct uname_args *uap; +freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) { int name[2], error; size_t len; @@ -242,22 +241,20 @@ #endif /* ARGSUSED */ int -getdomainname(td, uap) - struct thread *td; - struct getdomainname_args *uap; +freebsd4_getdomainname(struct thread *td, + struct freebsd4_getdomainname_args *uap) { - INIT_VPROCG(TD_TO_VPROCG(td)); - char tmpdomainname[MAXHOSTNAMELEN]; - int domainnamelen; + int name[2]; + int error; + size_t len = uap->len; - mtx_lock(&hostname_mtx); - bcopy(V_domainname, tmpdomainname, sizeof(tmpdomainname)); - mtx_unlock(&hostname_mtx); - - domainnamelen = strlen(tmpdomainname) + 1; - if ((u_int)uap->len > domainnamelen) - uap->len = domainnamelen; - return (copyout(tmpdomainname, uap->domainname, uap->len)); + name[0] = CTL_KERN; + name[1] = KERN_NISDOMAINNAME; + mtx_lock(&Giant); + error = userland_sysctl(td, name, 2, uap->domainname, &len, + 1, 0, 0, 0, 0); + mtx_unlock(&Giant); + return(error); } #ifndef _SYS_SYSPROTO_H_ @@ -268,26 +265,18 @@ #endif /* ARGSUSED */ int -setdomainname(td, uap) - struct thread *td; - struct setdomainname_args *uap; +freebsd4_setdomainname(struct thread *td, + struct freebsd4_setdomainname_args *uap) { - INIT_VPROCG(TD_TO_VPROCG(td)); - char tmpdomainname[MAXHOSTNAMELEN]; - int error, domainnamelen; + int name[2]; + int error; - error = priv_check(td, PRIV_SETDOMAINNAME); - if (error) - return (error); - if ((u_int)uap->len > sizeof(tmpdomainname) - 1) - return (EINVAL); - domainnamelen = uap->len; - error = copyin(uap->domainname, tmpdomainname, uap->len); - if (error == 0) { - tmpdomainname[domainnamelen] = 0; - mtx_lock(&hostname_mtx); - bcopy(tmpdomainname, V_domainname, sizeof(V_domainname)); - mtx_unlock(&hostname_mtx); - } + name[0] = CTL_KERN; + name[1] = KERN_NISDOMAINNAME; + mtx_lock(&Giant); + error = userland_sysctl(td, name, 2, 0, 0, 0, uap->domainname, + uap->len, 0, 0); + mtx_unlock(&Giant); return (error); } +#endif /* COMPAT_FREEBSD4 */ Index: sys/kern/syscalls.c =================================================================== --- sys/kern/syscalls.c (revision 184691) +++ sys/kern/syscalls.c (working copy) @@ -169,9 +169,9 @@ "#159", /* 159 = nosys */ "lgetfh", /* 160 = lgetfh */ "getfh", /* 161 = getfh */ - "getdomainname", /* 162 = getdomainname */ - "setdomainname", /* 163 = setdomainname */ - "uname", /* 164 = uname */ + "compat4.getdomainname", /* 162 = old getdomainname */ + "compat4.setdomainname", /* 163 = old setdomainname */ + "compat4.uname", /* 164 = old uname */ "sysarch", /* 165 = sysarch */ "rtprio", /* 166 = rtprio */ "#167", /* 167 = nosys */ Index: sys/kern/syscalls.master =================================================================== --- sys/kern/syscalls.master (revision 184691) +++ sys/kern/syscalls.master (working copy) @@ -320,11 +320,11 @@ struct fhandle *fhp); } 161 AUE_NFS_GETFH STD { int getfh(char *fname, \ struct fhandle *fhp); } -162 AUE_SYSCTL STD { int getdomainname(char *domainname, \ +162 AUE_SYSCTL COMPAT4 { int getdomainname(char *domainname, \ int len); } -163 AUE_SYSCTL STD { int setdomainname(char *domainname, \ +163 AUE_SYSCTL COMPAT4 { int setdomainname(char *domainname, \ int len); } -164 AUE_NULL STD { int uname(struct utsname *name); } +164 AUE_NULL COMPAT4 { int uname(struct utsname *name); } 165 AUE_SYSARCH STD { int sysarch(int op, char *parms); } 166 AUE_RTPRIO STD { int rtprio(int function, pid_t pid, \ struct rtprio *rtp); } Index: sys/kern/systrace_args.c =================================================================== --- sys/kern/systrace_args.c (revision 184691) +++ sys/kern/systrace_args.c (working copy) @@ -864,29 +864,6 @@ *n_args = 2; break; } - /* getdomainname */ - case 162: { - struct getdomainname_args *p = params; - uarg[0] = (intptr_t) p->domainname; /* char * */ - iarg[1] = p->len; /* int */ - *n_args = 2; - break; - } - /* setdomainname */ - case 163: { - struct setdomainname_args *p = params; - uarg[0] = (intptr_t) p->domainname; /* char * */ - iarg[1] = p->len; /* int */ - *n_args = 2; - break; - } - /* uname */ - case 164: { - struct uname_args *p = params; - uarg[0] = (intptr_t) p->name; /* struct utsname * */ - *n_args = 1; - break; - } /* sysarch */ case 165: { struct sysarch_args *p = params; @@ -4441,42 +4418,6 @@ break; }; break; - /* getdomainname */ - case 162: - switch(ndx) { - case 0: - p = "char *"; - break; - case 1: - p = "int"; - break; - default: - break; - }; - break; - /* setdomainname */ - case 163: - switch(ndx) { - case 0: - p = "char *"; - break; - case 1: - p = "int"; - break; - default: - break; - }; - break; - /* uname */ - case 164: - switch(ndx) { - case 0: - p = "struct utsname *"; - break; - default: - break; - }; - break; /* sysarch */ case 165: switch(ndx) { Index: sys/compat/freebsd32/freebsd32_syscall.h =================================================================== --- sys/compat/freebsd32/freebsd32_syscall.h (revision 184691) +++ sys/compat/freebsd32/freebsd32_syscall.h (working copy) @@ -156,9 +156,9 @@ #define FREEBSD32_SYS_freebsd4_freebsd32_statfs 157 #define FREEBSD32_SYS_freebsd4_freebsd32_fstatfs 158 #define FREEBSD32_SYS_getfh 161 -#define FREEBSD32_SYS_getdomainname 162 -#define FREEBSD32_SYS_setdomainname 163 -#define FREEBSD32_SYS_uname 164 + /* 162 is obsolete getdomainname */ + /* 163 is obsolete setdomainname */ + /* 164 is obsolete uname */ #define FREEBSD32_SYS_sysarch 165 #define FREEBSD32_SYS_rtprio 166 #define FREEBSD32_SYS_freebsd32_semsys 169 Index: sys/compat/freebsd32/freebsd32_sysent.c =================================================================== --- sys/compat/freebsd32/freebsd32_sysent.c (revision 184691) +++ sys/compat/freebsd32/freebsd32_sysent.c (working copy) @@ -200,9 +200,9 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 159 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 160 = lgetfh */ { AS(getfh_args), (sy_call_t *)getfh, AUE_NFS_GETFH, NULL, 0, 0 }, /* 161 = getfh */ - { AS(getdomainname_args), (sy_call_t *)getdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 162 = getdomainname */ - { AS(setdomainname_args), (sy_call_t *)setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 163 = setdomainname */ - { AS(uname_args), (sy_call_t *)uname, AUE_NULL, NULL, 0, 0 }, /* 164 = uname */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 162 = obsolete getdomainname */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 163 = obsolete setdomainname */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 164 = obsolete uname */ { AS(sysarch_args), (sy_call_t *)sysarch, AUE_SYSARCH, NULL, 0, 0 }, /* 165 = sysarch */ { AS(rtprio_args), (sy_call_t *)rtprio, AUE_RTPRIO, NULL, 0, 0 }, /* 166 = rtprio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 167 = nosys */ Index: sys/compat/freebsd32/syscalls.master =================================================================== --- sys/compat/freebsd32/syscalls.master (revision 184691) +++ sys/compat/freebsd32/syscalls.master (working copy) @@ -295,11 +295,9 @@ 160 AUE_LGETFH UNIMPL lgetfh 161 AUE_NFS_GETFH NOPROTO { int getfh(char *fname, \ struct fhandle *fhp); } -162 AUE_SYSCTL NOPROTO { int getdomainname(char *domainname, \ - int len); } -163 AUE_SYSCTL NOPROTO { int setdomainname(char *domainname, \ - int len); } -164 AUE_NULL NOPROTO { int uname(struct utsname *name); } +162 AUE_NULL OBSOL getdomainname +163 AUE_NULL OBSOL setdomainname +164 AUE_NULL OBSOL uname 165 AUE_SYSARCH NOPROTO { int sysarch(int op, char *parms); } 166 AUE_RTPRIO NOPROTO { int rtprio(int function, pid_t pid, \ struct rtprio *rtp); } Index: sys/compat/freebsd32/freebsd32_syscalls.c =================================================================== --- sys/compat/freebsd32/freebsd32_syscalls.c (revision 184691) +++ sys/compat/freebsd32/freebsd32_syscalls.c (working copy) @@ -169,9 +169,9 @@ "#159", /* 159 = nosys */ "#160", /* 160 = lgetfh */ "getfh", /* 161 = getfh */ - "getdomainname", /* 162 = getdomainname */ - "setdomainname", /* 163 = setdomainname */ - "uname", /* 164 = uname */ + "obs_getdomainname", /* 162 = obsolete getdomainname */ + "obs_setdomainname", /* 163 = obsolete setdomainname */ + "obs_uname", /* 164 = obsolete uname */ "sysarch", /* 165 = sysarch */ "rtprio", /* 166 = rtprio */ "#167", /* 167 = nosys */ Index: sys/compat/linux/linux_misc.c =================================================================== --- sys/compat/linux/linux_misc.c (revision 184691) +++ sys/compat/linux/linux_misc.c (working copy) @@ -1682,6 +1682,7 @@ linux_sethostname(struct thread *td, struct linux_sethostname_args *args) { int name[2]; + int error; #ifdef DEBUG if (ldebug(sethostname)) @@ -1690,11 +1691,34 @@ name[0] = CTL_KERN; name[1] = KERN_HOSTNAME; - return (userland_sysctl(td, name, 2, 0, 0, 0, args->hostname, - args->len, 0, 0)); + mtx_lock(&Giant); + error = userland_sysctl(td, name, 2, 0, 0, 0, args->hostname, + args->len, 0, 0); + mtx_unlock(&Giant); + return (error); } int +linux_setdomainname(struct thread *td, struct linux_setdomainname_args *args) +{ + int name[2]; + int error; + +#ifdef DEBUG + if (ldebug(setdomainname)) + printf(ARGS(setdomainname, "*, %i"), args->len); +#endif + + name[0] = CTL_KERN; + name[1] = KERN_NISDOMAINNAME; + mtx_lock(&Giant); + error = userland_sysctl(td, name, 2, 0, 0, 0, args->name, + args->len, 0, 0); + mtx_unlock(&Giant); + return (error); +} + +int linux_exit_group(struct thread *td, struct linux_exit_group_args *args) { struct linux_emuldata *em, *td_em, *tmp_em; Index: sys/i386/linux/linux_syscall.h =================================================================== --- sys/i386/linux/linux_syscall.h (revision 184691) +++ sys/i386/linux/linux_syscall.h (working copy) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.93 2008/05/13 20:01:27 rdivacky Exp + * created from FreeBSD: head/sys/i386/linux/syscalls.master 178976 2008-05-13 20:01:27Z rdivacky */ #define LINUX_SYS_exit 1 @@ -116,7 +116,7 @@ #define LINUX_SYS_fsync 118 #define LINUX_SYS_linux_sigreturn 119 #define LINUX_SYS_linux_clone 120 -#define LINUX_SYS_setdomainname 121 +#define LINUX_SYS_linux_setdomainname 121 #define LINUX_SYS_linux_newuname 122 #define LINUX_SYS_linux_modify_ldt 123 #define LINUX_SYS_linux_adjtimex 124 Index: sys/i386/linux/linux_sysent.c =================================================================== --- sys/i386/linux/linux_sysent.c (revision 184691) +++ sys/i386/linux/linux_sysent.c (working copy) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.93 2008/05/13 20:01:27 rdivacky Exp + * created from FreeBSD: head/sys/i386/linux/syscalls.master 178976 2008-05-13 20:01:27Z rdivacky */ #include @@ -139,7 +139,7 @@ { AS(fsync_args), (sy_call_t *)fsync, AUE_FSYNC, NULL, 0, 0 }, /* 118 = fsync */ { AS(linux_sigreturn_args), (sy_call_t *)linux_sigreturn, AUE_SIGRETURN, NULL, 0, 0 }, /* 119 = linux_sigreturn */ { AS(linux_clone_args), (sy_call_t *)linux_clone, AUE_RFORK, NULL, 0, 0 }, /* 120 = linux_clone */ - { AS(setdomainname_args), (sy_call_t *)setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 121 = setdomainname */ + { AS(linux_setdomainname_args), (sy_call_t *)linux_setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 121 = linux_setdomainname */ { AS(linux_newuname_args), (sy_call_t *)linux_newuname, AUE_NULL, NULL, 0, 0 }, /* 122 = linux_newuname */ { AS(linux_modify_ldt_args), (sy_call_t *)linux_modify_ldt, AUE_NULL, NULL, 0, 0 }, /* 123 = linux_modify_ldt */ { 0, (sy_call_t *)linux_adjtimex, AUE_ADJTIME, NULL, 0, 0 }, /* 124 = linux_adjtimex */ Index: sys/i386/linux/syscalls.master =================================================================== --- sys/i386/linux/syscalls.master (revision 184691) +++ sys/i386/linux/syscalls.master (working copy) @@ -217,7 +217,7 @@ ; linux uses some strange calling convention here so we have to use the dummy arg 120 AUE_RFORK STD { int linux_clone(l_int flags, void *stack, \ void *parent_tidptr, int dummy, void * child_tidptr); } -121 AUE_SYSCTL NOPROTO { int setdomainname(char *name, \ +121 AUE_SYSCTL STD { int linux_setdomainname(char *name, \ int len); } 122 AUE_NULL STD { int linux_newuname( \ struct l_new_utsname *buf); } Index: sys/i386/linux/linux_proto.h =================================================================== --- sys/i386/linux/linux_proto.h (revision 184691) +++ sys/i386/linux/linux_proto.h (working copy) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.93 2008/05/13 20:01:27 rdivacky Exp + * created from FreeBSD: head/sys/i386/linux/syscalls.master 178976 2008-05-13 20:01:27Z rdivacky */ #ifndef _LINUX_SYSPROTO_H_ @@ -381,6 +381,10 @@ char dummy_l_[PADL_(int)]; int dummy; char dummy_r_[PADR_(int)]; char child_tidptr_l_[PADL_(void *)]; void * child_tidptr; char child_tidptr_r_[PADR_(void *)]; }; +struct linux_setdomainname_args { + char name_l_[PADL_(char *)]; char * name; char name_r_[PADR_(char *)]; + char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; +}; struct linux_newuname_args { char buf_l_[PADL_(struct l_new_utsname *)]; struct l_new_utsname * buf; char buf_r_[PADR_(struct l_new_utsname *)]; }; @@ -1097,6 +1101,7 @@ int linux_ipc(struct thread *, struct linux_ipc_args *); int linux_sigreturn(struct thread *, struct linux_sigreturn_args *); int linux_clone(struct thread *, struct linux_clone_args *); +int linux_setdomainname(struct thread *, struct linux_setdomainname_args *); int linux_newuname(struct thread *, struct linux_newuname_args *); int linux_modify_ldt(struct thread *, struct linux_modify_ldt_args *); int linux_adjtimex(struct thread *, struct linux_adjtimex_args *); @@ -1360,6 +1365,7 @@ #define LINUX_SYS_AUE_linux_ipc AUE_NULL #define LINUX_SYS_AUE_linux_sigreturn AUE_SIGRETURN #define LINUX_SYS_AUE_linux_clone AUE_RFORK +#define LINUX_SYS_AUE_linux_setdomainname AUE_SYSCTL #define LINUX_SYS_AUE_linux_newuname AUE_NULL #define LINUX_SYS_AUE_linux_modify_ldt AUE_NULL #define LINUX_SYS_AUE_linux_adjtimex AUE_ADJTIME Index: sys/amd64/linux32/linux32_syscall.h =================================================================== --- sys/amd64/linux32/linux32_syscall.h (revision 184691) +++ sys/amd64/linux32/linux32_syscall.h (working copy) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.34 2008/05/13 20:01:26 rdivacky Exp + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 178976 2008-05-13 20:01:27Z rdivacky */ #define LINUX_SYS_exit 1 @@ -112,7 +112,7 @@ #define LINUX_SYS_fsync 118 #define LINUX_SYS_linux_sigreturn 119 #define LINUX_SYS_linux_clone 120 -#define LINUX_SYS_setdomainname 121 +#define LINUX_SYS_linux_setdomainname 121 #define LINUX_SYS_linux_newuname 122 #define LINUX_SYS_linux_adjtimex 124 #define LINUX_SYS_linux_mprotect 125 Index: sys/amd64/linux32/syscalls.master =================================================================== --- sys/amd64/linux32/syscalls.master (revision 184691) +++ sys/amd64/linux32/syscalls.master (working copy) @@ -216,7 +216,7 @@ ; linux uses some strange calling convention here so we have to use the dummy arg 120 AUE_RFORK STD { int linux_clone(l_int flags, void *stack, \ void *parent_tidptr, int dummy, void * child_tidptr); } -121 AUE_SYSCTL NOPROTO { int setdomainname(char *name, \ +121 AUE_SYSCTL STD { int linux_setdomainname(char *name, \ int len); } 122 AUE_NULL STD { int linux_newuname( \ struct l_new_utsname *buf); } Index: sys/amd64/linux32/linux32_sysent.c =================================================================== --- sys/amd64/linux32/linux32_sysent.c (revision 184691) +++ sys/amd64/linux32/linux32_sysent.c (working copy) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.34 2008/05/13 20:01:26 rdivacky Exp + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 178976 2008-05-13 20:01:27Z rdivacky */ #include "opt_compat.h" @@ -140,7 +140,7 @@ { AS(fsync_args), (sy_call_t *)fsync, AUE_FSYNC, NULL, 0, 0 }, /* 118 = fsync */ { AS(linux_sigreturn_args), (sy_call_t *)linux_sigreturn, AUE_SIGRETURN, NULL, 0, 0 }, /* 119 = linux_sigreturn */ { AS(linux_clone_args), (sy_call_t *)linux_clone, AUE_RFORK, NULL, 0, 0 }, /* 120 = linux_clone */ - { AS(setdomainname_args), (sy_call_t *)setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 121 = setdomainname */ + { AS(linux_setdomainname_args), (sy_call_t *)linux_setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 121 = linux_setdomainname */ { AS(linux_newuname_args), (sy_call_t *)linux_newuname, AUE_NULL, NULL, 0, 0 }, /* 122 = linux_newuname */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 123 = modify_ldt */ { 0, (sy_call_t *)linux_adjtimex, AUE_ADJTIME, NULL, 0, 0 }, /* 124 = linux_adjtimex */ Index: sys/amd64/linux32/linux32_proto.h =================================================================== --- sys/amd64/linux32/linux32_proto.h (revision 184691) +++ sys/amd64/linux32/linux32_proto.h (working copy) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.34 2008/05/13 20:01:26 rdivacky Exp + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 178976 2008-05-13 20:01:27Z rdivacky */ #ifndef _LINUX_SYSPROTO_H_ @@ -378,6 +378,10 @@ char dummy_l_[PADL_(int)]; int dummy; char dummy_r_[PADR_(int)]; char child_tidptr_l_[PADL_(void *)]; void * child_tidptr; char child_tidptr_r_[PADR_(void *)]; }; +struct linux_setdomainname_args { + char name_l_[PADL_(char *)]; char * name; char name_r_[PADR_(char *)]; + char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; +}; struct linux_newuname_args { char buf_l_[PADL_(struct l_new_utsname *)]; struct l_new_utsname * buf; char buf_r_[PADR_(struct l_new_utsname *)]; }; @@ -1077,6 +1081,7 @@ int linux_ipc(struct thread *, struct linux_ipc_args *); int linux_sigreturn(struct thread *, struct linux_sigreturn_args *); int linux_clone(struct thread *, struct linux_clone_args *); +int linux_setdomainname(struct thread *, struct linux_setdomainname_args *); int linux_newuname(struct thread *, struct linux_newuname_args *); int linux_adjtimex(struct thread *, struct linux_adjtimex_args *); int linux_mprotect(struct thread *, struct linux_mprotect_args *); @@ -1339,6 +1344,7 @@ #define LINUX_SYS_AUE_linux_ipc AUE_NULL #define LINUX_SYS_AUE_linux_sigreturn AUE_SIGRETURN #define LINUX_SYS_AUE_linux_clone AUE_RFORK +#define LINUX_SYS_AUE_linux_setdomainname AUE_SYSCTL #define LINUX_SYS_AUE_linux_newuname AUE_NULL #define LINUX_SYS_AUE_linux_adjtimex AUE_ADJTIME #define LINUX_SYS_AUE_linux_mprotect AUE_MPROTECT Index: sys/sys/syscall.h =================================================================== --- sys/sys/syscall.h (revision 184691) +++ sys/sys/syscall.h (working copy) @@ -161,9 +161,9 @@ #define SYS_freebsd4_fstatfs 158 #define SYS_lgetfh 160 #define SYS_getfh 161 -#define SYS_getdomainname 162 -#define SYS_setdomainname 163 -#define SYS_uname 164 +#define SYS_freebsd4_getdomainname 162 +#define SYS_freebsd4_setdomainname 163 +#define SYS_freebsd4_uname 164 #define SYS_sysarch 165 #define SYS_rtprio 166 #define SYS_semsys 169 Index: sys/sys/syscall.mk =================================================================== --- sys/sys/syscall.mk (revision 184691) +++ sys/sys/syscall.mk (working copy) @@ -113,9 +113,9 @@ freebsd4_fstatfs.o \ lgetfh.o \ getfh.o \ - getdomainname.o \ - setdomainname.o \ - uname.o \ + freebsd4_getdomainname.o \ + freebsd4_setdomainname.o \ + freebsd4_uname.o \ sysarch.o \ rtprio.o \ semsys.o \ Index: sys/sys/sysproto.h =================================================================== --- sys/sys/sysproto.h (revision 184691) +++ sys/sys/sysproto.h (working copy) @@ -500,17 +500,6 @@ char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)]; char fhp_l_[PADL_(struct fhandle *)]; struct fhandle * fhp; char fhp_r_[PADR_(struct fhandle *)]; }; -struct getdomainname_args { - char domainname_l_[PADL_(char *)]; char * domainname; char domainname_r_[PADR_(char *)]; - char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; -}; -struct setdomainname_args { - char domainname_l_[PADL_(char *)]; char * domainname; char domainname_r_[PADR_(char *)]; - char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; -}; -struct uname_args { - char name_l_[PADL_(struct utsname *)]; struct utsname * name; char name_r_[PADR_(struct utsname *)]; -}; struct sysarch_args { char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; char parms_l_[PADL_(char *)]; char * parms; char parms_r_[PADR_(char *)]; @@ -1743,9 +1732,6 @@ int nfssvc(struct thread *, struct nfssvc_args *); int lgetfh(struct thread *, struct lgetfh_args *); int getfh(struct thread *, struct getfh_args *); -int getdomainname(struct thread *, struct getdomainname_args *); -int setdomainname(struct thread *, struct setdomainname_args *); -int uname(struct thread *, struct uname_args *); int sysarch(struct thread *, struct sysarch_args *); int rtprio(struct thread *, struct rtprio_args *); int semsys(struct thread *, struct semsys_args *); @@ -2181,6 +2167,17 @@ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(struct ostatfs *)]; struct ostatfs * buf; char buf_r_[PADR_(struct ostatfs *)]; }; +struct freebsd4_getdomainname_args { + char domainname_l_[PADL_(char *)]; char * domainname; char domainname_r_[PADR_(char *)]; + char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; +}; +struct freebsd4_setdomainname_args { + char domainname_l_[PADL_(char *)]; char * domainname; char domainname_r_[PADR_(char *)]; + char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; +}; +struct freebsd4_uname_args { + char name_l_[PADL_(struct utsname *)]; struct utsname * name; char name_r_[PADR_(struct utsname *)]; +}; struct freebsd4_fhstatfs_args { char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; char buf_l_[PADL_(struct ostatfs *)]; struct ostatfs * buf; char buf_r_[PADR_(struct ostatfs *)]; @@ -2205,6 +2202,9 @@ int freebsd4_getfsstat(struct thread *, struct freebsd4_getfsstat_args *); int freebsd4_statfs(struct thread *, struct freebsd4_statfs_args *); int freebsd4_fstatfs(struct thread *, struct freebsd4_fstatfs_args *); +int freebsd4_getdomainname(struct thread *, struct freebsd4_getdomainname_args *); +int freebsd4_setdomainname(struct thread *, struct freebsd4_setdomainname_args *); +int freebsd4_uname(struct thread *, struct freebsd4_uname_args *); int freebsd4_fhstatfs(struct thread *, struct freebsd4_fhstatfs_args *); int freebsd4_sendfile(struct thread *, struct freebsd4_sendfile_args *); int freebsd4_sigaction(struct thread *, struct freebsd4_sigaction_args *); @@ -2325,9 +2325,6 @@ #define SYS_AUE_nfssvc AUE_NFS_SVC #define SYS_AUE_lgetfh AUE_LGETFH #define SYS_AUE_getfh AUE_NFS_GETFH -#define SYS_AUE_getdomainname AUE_SYSCTL -#define SYS_AUE_setdomainname AUE_SYSCTL -#define SYS_AUE_uname AUE_NULL #define SYS_AUE_sysarch AUE_SYSARCH #define SYS_AUE_rtprio AUE_RTPRIO #define SYS_AUE_semsys AUE_SEMSYS Index: sys/sys/priv.h =================================================================== --- sys/sys/priv.h (revision 184691) +++ sys/sys/priv.h (working copy) @@ -84,7 +84,6 @@ #define PRIV_CLOCK_SETTIME 17 /* Can call clock_settime. */ #define PRIV_SETTIMEOFDAY 18 /* Can call settimeofday. */ #define PRIV_SETHOSTID 19 /* Can call sethostid. */ -#define PRIV_SETDOMAINNAME 20 /* Can call setdomainname. */ /* * Audit subsystem privileges.