Add sys_csops_audittoken

Also fix sys_csops's return code for unsupported operations
This commit is contained in:
Ariel Abreu 2021-01-04 11:52:16 -05:00
parent cba96acc90
commit 489c310885
No known key found for this signature in database
GPG Key ID: BB20848279B910AC
3 changed files with 10 additions and 2 deletions

View File

@ -22,10 +22,15 @@ long sys_csops(int pid, unsigned int ops, void* useraddr, size_t usersize) {
// all other operations are completely unsupported
default: {
ret = -1;
errno = ENOSYS;
ret = -ENOSYS;
} break;
}
return ret;
};
// also more or less a stub
long sys_csops_audittoken(int pid, unsigned int ops, void* useraddr, size_t usersize, audit_token_t* audit_token) {
// just defer to the regular csops
return sys_csops(pid, ops, useraddr, usersize);
};

View File

@ -2,7 +2,9 @@
#define LINUX_CSOPS_H
#include <stddef.h>
#include <mach/message.h>
long sys_csops(int pid, unsigned int ops, void* useraddr, size_t usersize);
long sys_csops_audittoken(int pid, unsigned int ops, void* useraddr, size_t usersize, audit_token_t* audit_token);
#endif // LINUX_CSOPS_H

View File

@ -318,6 +318,7 @@ void* __bsd_syscall_table[600] = {
[158] = sys_fstatfs,
[159] = sys_unmount,
[169] = sys_csops,
[170] = sys_csops_audittoken,
[173] = sys_waitid,
[181] = sys_setgid,
[182] = sys_setegid,