I saw somewhere mentioned that one can "emulate" execve (primarily with open and mmap) in order to load some other binary (without actual "execve" syscall).
Are there any already implemented examples for it?
Can we load both static and dynamic binaries?
Can it be done portably?
Such feature may be useful for delegating work to arbitrary binaries ignoring filesystem bits or with seccomp policy
I have two (Ubuntu Linux) bash scripts which take input arguments. They need to be run simultaneously. I tried execve with arguments e.g.
char *argv[10] = { "/mnt/hgfs/F/working/script.sh", "file1", "file2", NULL };
execve(argv[0], argv, NULL)
but the bash script can't seem to find any arguments at e.g. $0, $1, $2.
What's missing?
How do I get a forked, execve() child process that can run 'vi', etc and redirect all IO to the parent process?
I'm trying to pass shells through from an embedded Linux process to the PC software interface connected over the network.
The IO for the shell process is packaged into app-specific messages for network transport over our existing protocol.
First, I was just redirecting IO using simply
I want to make system be usable without setuid, file "+p" capabilities and in general things are disabled when I set PR_SET_NO_NEW_PRIVS.
With this approach (init sets PR_SET_NO_NEW_PRIVS and no filesystem-based capability elevation longer possible) you cannot "refill" your capabilities and only need to watch not to "splatter" them.
How to execve into some other process without "splattering" any
I am trying to run two processes on separate CPUs using openMP. In this case each CPU has 6 cores with hyper-threading (so 12 hardware threads). They need to do some synchronization which seems some what easier if they know each other's PID. So I am starting a process sigC from sigS using a fork() and execve() called with a different value for the GOMP_CPU_AFFINITY environment variable.
git has a very nice feature for many of its commands: The output on an interactive terminal is passed to a pager by default, in such a way that it only keeps the pager open if there's more than one screenful of output, and it leaves the output on the terminal instead of clearing it when you exit. Is there some way to configure this to be the default for Bash in GNOME Terminal?
I am trying to create a simple .deb package by following a wonderful tutorial,
and my problem is that when I try to get the dependencies of the package by executing this command:
dpkg-depcheck -d ./configure
I get this error:
strace: ./configure: command not found
Running strace failed (command line:
strace -e trace=open,execve -f -q -o /tmp/depchqCdeiv ./configure
which I don't understand.
Hello friends,
I am working currently in C programming. For some reasons, in the code, i have to give a path to the binary(executable), which can be directly used instead of any code.
For eg :-
if(condition_satisfied){
execve'absolute_path_to_executable_file'
}
With this, it should execute this binary file. Is this possible? If yes, Kindly let me know.
I am using info command, and when I press m, the keyboard prompt goes into a menu item: mode and I don't know how to quit from this mode. I tried q and ESC, but it didn't work.
Finally, I used Ctrl+C to quit. Is there any decent way to quit the menu item: prompt mode in the "info" command?