File: swrap_fake_uid_wrapper.c

package info (click to toggle)
socket-wrapper 1.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 788 kB
  • sloc: ansic: 13,079; sh: 65; python: 16; makefile: 13
file content (29 lines) | stat: -rw-r--r-- 487 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "config.h"

#include <errno.h>
#include <stdarg.h>

#include "swrap_fake_uid_wrapper.h"

/* simulate uid_wrapper hooks */
bool uid_wrapper_syscall_valid(long int sysno)
{
	if (sysno >= __FAKE_UID_WRAPPER_SYSCALL_NO) {
		return true;
	}

	return false;
}

long int uid_wrapper_syscall_va(long int sysno, va_list va)
{
	(void) va; /* unused */

	if (sysno == __FAKE_UID_WRAPPER_SYSCALL_NO) {
		errno = 0;
		return __FAKE_UID_WRAPPER_SYSCALL_RC;
	}

	errno = ENOSYS;
	return -1;
}