2 * Copyright (c) 2004 Todd C. Miller <Todd.Miller@courtesan.com>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 static const char rcsid[] = "$Sudo: sudo_noexec.c,v 1.5 2004/02/13 21:36:43 millert Exp $";
26 * Dummy versions of the execve() family of syscalls. We don't need
27 * to stub out all of them, just the ones that correspond to actual
28 * system calls (which varies by OS). Note that it is still possible
29 * to access the real syscalls via the syscall() interface but very
30 * few programs actually do that.
37 #define DUMMY(fn, args, atypes) \
46 DUMMY(execve, (path, argv, envp),
47 const char *path; char *const argv[]; char *const envp[];)
48 DUMMY(_execve, (path, argv, envp),
49 const char *path; char *const argv[]; char *const envp[];)
50 DUMMY(execv, (path, argv, envp),
51 const char *path; char *const argv[];)
52 DUMMY(_execv, (path, argv, envp),
53 const char *path; char *const argv[];)
54 DUMMY(fexecve, (fd, argv, envp),
55 int fd; char *const argv[]; char *const envp[];)
56 DUMMY(_fexecve, (fd, argv, envp),
57 int fd; char *const argv[]; char *const envp[];)