forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syscalls: add selftest for execveat(2)
Signed-off-by: David Drysdale <[email protected]> Cc: Meredydd Luff <[email protected]> Cc: Shuah Khan <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Kees Cook <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Rich Felker <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
1 parent
27d6ec7
commit c9b26b8
Showing
4 changed files
with
432 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
subdir* | ||
script* | ||
execveat | ||
execveat.symlink | ||
execveat.moved | ||
execveat.path.ephemeral | ||
execveat.ephemeral | ||
execveat.denatured | ||
xxxxxxxx* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
CC = $(CROSS_COMPILE)gcc | ||
CFLAGS = -Wall | ||
BINARIES = execveat | ||
DEPS = execveat.symlink execveat.denatured script subdir | ||
all: $(BINARIES) $(DEPS) | ||
|
||
subdir: | ||
mkdir -p $@ | ||
script: | ||
echo '#!/bin/sh' > $@ | ||
echo 'exit $$*' >> $@ | ||
chmod +x $@ | ||
execveat.symlink: execveat | ||
ln -s -f $< $@ | ||
execveat.denatured: execveat | ||
cp $< $@ | ||
chmod -x $@ | ||
%: %.c | ||
$(CC) $(CFLAGS) -o $@ $^ | ||
|
||
run_tests: all | ||
./execveat | ||
|
||
clean: | ||
rm -rf $(BINARIES) $(DEPS) subdir.moved execveat.moved xxxxx* |
Oops, something went wrong.