This repository has been archived by the owner on Apr 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibc-wrapper.c
88 lines (78 loc) · 1.73 KB
/
libc-wrapper.c
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
*This file is part of CD-MOJ.
*
*CD-MOJ is free software: you can redistribute it and/or modify
*it under the terms of the GNU General Public License as published by
*the Free Software Foundation, either version 3 of the License, or
*(at your option) any later version.
*
*Foobar is distributed in the hope that it will be useful,
*but WITHOUT ANY WARRANTY; without even the implied warranty of
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*GNU General Public License for more details.
*
*You should have received a copy of the GNU General Public License
*along with CD-MOJ. If not, see <http://www.gnu.org/licenses/>.
*/
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
#include <errno.h>
#include <sched.h>
pid_t fork(void)
{
exit(EACCES);
}
FILE * fopen(const char *filename, const char *mode)
{
exit(EACCES);
}
FILE * fdopen(int fildes, const char *mode)
{
exit(EACCES);
}
FILE * freopen(const char *filename, const char *mode, FILE *stream)
{
exit(EACCES);
}
int system(const char *command)
{
exit(EACCES);
}
FILE * popen(const char *command, const char *mode)
{
exit(EACCES);
}
int pipe(int fildes[2])
{
exit(EACCES);
}
int open(const char *path, int oflag, ...)
{
exit(EACCES);
}
int execl(const char *path, const char *arg, ...)
{
exit(EACCES);
}
int execlp(const char *file, const char *arg, ...)
{
exit(EACCES);
}
int execv(const char *path, char *const argv[])
{
exit(EACCES);
}
int execvp(const char *file, char *const argv[])
{
exit(EACCES);
}
int execvpe(const char *file, char *const argv[], char *const envp[])
{
exit(EACCES);
}
long clone(unsigned long flags, void *child_stack, void *ptid, void *ctid, struct pt_regs *regs)
{
exit(EACCES);
}