diff options
author | kmacy <kmacy@FreeBSD.org> | 2011-09-16 13:58:51 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2011-09-16 13:58:51 +0000 |
commit | 99851f359e6f006b3223bb37dbc49e751ca8c13a (patch) | |
tree | 2ed8c1cfa9e408c1c66c2cde0823123897e0306e /sys/security | |
parent | bf8fedabcd023c90bb2ee4ce0e5d6d8c2b927714 (diff) | |
download | FreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.zip FreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.tar.gz |
In order to maximize the re-usability of kernel code in user space this
patch modifies makesyscalls.sh to prefix all of the non-compatibility
calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel
entry points and all places in the code that use them. It also
fixes an additional name space collision between the kernel function
psignal and the libc function of the same name by renaming the kernel
psignal kern_psignal(). By introducing this change now we will ease future
MFCs that change syscalls.
Reviewed by: rwatson
Approved by: re (bz)
Diffstat (limited to 'sys/security')
-rw-r--r-- | sys/security/audit/audit_syscalls.c | 36 | ||||
-rw-r--r-- | sys/security/mac/mac_syscalls.c | 40 |
2 files changed, 38 insertions, 38 deletions
diff --git a/sys/security/audit/audit_syscalls.c b/sys/security/audit/audit_syscalls.c index 075aac5..bf60874 100644 --- a/sys/security/audit/audit_syscalls.c +++ b/sys/security/audit/audit_syscalls.c @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); */ /* ARGSUSED */ int -audit(struct thread *td, struct audit_args *uap) +sys_audit(struct thread *td, struct audit_args *uap) { int error; void * rec; @@ -154,7 +154,7 @@ free_out: */ /* ARGSUSED */ int -auditon(struct thread *td, struct auditon_args *uap) +sys_auditon(struct thread *td, struct auditon_args *uap) { struct ucred *cred, *newcred, *oldcred; int error; @@ -560,7 +560,7 @@ auditon(struct thread *td, struct auditon_args *uap) */ /* ARGSUSED */ int -getauid(struct thread *td, struct getauid_args *uap) +sys_getauid(struct thread *td, struct getauid_args *uap) { int error; @@ -575,7 +575,7 @@ getauid(struct thread *td, struct getauid_args *uap) /* ARGSUSED */ int -setauid(struct thread *td, struct setauid_args *uap) +sys_setauid(struct thread *td, struct setauid_args *uap) { struct ucred *newcred, *oldcred; au_id_t id; @@ -615,7 +615,7 @@ fail: */ /* ARGSUSED */ int -getaudit(struct thread *td, struct getaudit_args *uap) +sys_getaudit(struct thread *td, struct getaudit_args *uap) { struct auditinfo ai; struct ucred *cred; @@ -640,7 +640,7 @@ getaudit(struct thread *td, struct getaudit_args *uap) /* ARGSUSED */ int -setaudit(struct thread *td, struct setaudit_args *uap) +sys_setaudit(struct thread *td, struct setaudit_args *uap) { struct ucred *newcred, *oldcred; struct auditinfo ai; @@ -683,7 +683,7 @@ fail: /* ARGSUSED */ int -getaudit_addr(struct thread *td, struct getaudit_addr_args *uap) +sys_getaudit_addr(struct thread *td, struct getaudit_addr_args *uap) { int error; @@ -700,7 +700,7 @@ getaudit_addr(struct thread *td, struct getaudit_addr_args *uap) /* ARGSUSED */ int -setaudit_addr(struct thread *td, struct setaudit_addr_args *uap) +sys_setaudit_addr(struct thread *td, struct setaudit_addr_args *uap) { struct ucred *newcred, *oldcred; struct auditinfo_addr aia; @@ -743,7 +743,7 @@ fail: */ /* ARGSUSED */ int -auditctl(struct thread *td, struct auditctl_args *uap) +sys_auditctl(struct thread *td, struct auditctl_args *uap) { struct nameidata nd; struct ucred *cred; @@ -813,63 +813,63 @@ auditctl(struct thread *td, struct auditctl_args *uap) #else /* !AUDIT */ int -audit(struct thread *td, struct audit_args *uap) +sys_audit(struct thread *td, struct audit_args *uap) { return (ENOSYS); } int -auditon(struct thread *td, struct auditon_args *uap) +sys_auditon(struct thread *td, struct auditon_args *uap) { return (ENOSYS); } int -getauid(struct thread *td, struct getauid_args *uap) +sys_getauid(struct thread *td, struct getauid_args *uap) { return (ENOSYS); } int -setauid(struct thread *td, struct setauid_args *uap) +sys_setauid(struct thread *td, struct setauid_args *uap) { return (ENOSYS); } int -getaudit(struct thread *td, struct getaudit_args *uap) +sys_getaudit(struct thread *td, struct getaudit_args *uap) { return (ENOSYS); } int -setaudit(struct thread *td, struct setaudit_args *uap) +sys_setaudit(struct thread *td, struct setaudit_args *uap) { return (ENOSYS); } int -getaudit_addr(struct thread *td, struct getaudit_addr_args *uap) +sys_getaudit_addr(struct thread *td, struct getaudit_addr_args *uap) { return (ENOSYS); } int -setaudit_addr(struct thread *td, struct setaudit_addr_args *uap) +sys_setaudit_addr(struct thread *td, struct setaudit_addr_args *uap) { return (ENOSYS); } int -auditctl(struct thread *td, struct auditctl_args *uap) +sys_auditctl(struct thread *td, struct auditctl_args *uap) { return (ENOSYS); diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index dc27547..51392d7 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.c @@ -77,7 +77,7 @@ __FBSDID("$FreeBSD$"); FEATURE(security_mac, "Mandatory Access Control Framework support"); int -__mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap) +sys___mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap) { char *elements, *buffer; struct mac mac; @@ -126,7 +126,7 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap) } int -__mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap) +sys___mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap) { char *elements, *buffer; struct mac mac; @@ -159,7 +159,7 @@ __mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap) } int -__mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap) +sys___mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap) { struct ucred *newcred, *oldcred; struct label *intlabel; @@ -220,7 +220,7 @@ out: } int -__mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap) +sys___mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap) { char *elements, *buffer; struct label *intlabel; @@ -310,7 +310,7 @@ out: } int -__mac_get_file(struct thread *td, struct __mac_get_file_args *uap) +sys___mac_get_file(struct thread *td, struct __mac_get_file_args *uap) { char *elements, *buffer; struct nameidata nd; @@ -363,7 +363,7 @@ out: } int -__mac_get_link(struct thread *td, struct __mac_get_link_args *uap) +sys___mac_get_link(struct thread *td, struct __mac_get_link_args *uap) { char *elements, *buffer; struct nameidata nd; @@ -416,7 +416,7 @@ out: } int -__mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap) +sys___mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap) { struct label *intlabel; struct pipe *pipe; @@ -512,7 +512,7 @@ out: } int -__mac_set_file(struct thread *td, struct __mac_set_file_args *uap) +sys___mac_set_file(struct thread *td, struct __mac_set_file_args *uap) { struct label *intlabel; struct nameidata nd; @@ -566,7 +566,7 @@ out: } int -__mac_set_link(struct thread *td, struct __mac_set_link_args *uap) +sys___mac_set_link(struct thread *td, struct __mac_set_link_args *uap) { struct label *intlabel; struct nameidata nd; @@ -620,7 +620,7 @@ out: } int -mac_syscall(struct thread *td, struct mac_syscall_args *uap) +sys_mac_syscall(struct thread *td, struct mac_syscall_args *uap) { struct mac_policy_conf *mpc; char target[MAC_MAX_POLICY_NAME]; @@ -659,70 +659,70 @@ out: #else /* !MAC */ int -__mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap) +sys___mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap) { return (ENOSYS); } int -__mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap) +sys___mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap) { return (ENOSYS); } int -__mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap) +sys___mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap) { return (ENOSYS); } int -__mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap) +sys___mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap) { return (ENOSYS); } int -__mac_get_file(struct thread *td, struct __mac_get_file_args *uap) +sys___mac_get_file(struct thread *td, struct __mac_get_file_args *uap) { return (ENOSYS); } int -__mac_get_link(struct thread *td, struct __mac_get_link_args *uap) +sys___mac_get_link(struct thread *td, struct __mac_get_link_args *uap) { return (ENOSYS); } int -__mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap) +sys___mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap) { return (ENOSYS); } int -__mac_set_file(struct thread *td, struct __mac_set_file_args *uap) +sys___mac_set_file(struct thread *td, struct __mac_set_file_args *uap) { return (ENOSYS); } int -__mac_set_link(struct thread *td, struct __mac_set_link_args *uap) +sys___mac_set_link(struct thread *td, struct __mac_set_link_args *uap) { return (ENOSYS); } int -mac_syscall(struct thread *td, struct mac_syscall_args *uap) +sys_mac_syscall(struct thread *td, struct mac_syscall_args *uap) { return (ENOSYS); |