bwrap replacement - part2

This commit is contained in:
netblue30 2025-12-18 11:28:58 -05:00
parent 33d07c2320
commit 890b578bfd
2 changed files with 9 additions and 2 deletions

1
.gitignore vendored
View file

@ -47,6 +47,7 @@ src/jailcheck/jailcheck
src/fnettrace/fnettrace
src/fnetlock/fnetlock
src/fzenity/fzenity
src/fbwrap/fbwrap
uids.h
seccomp
seccomp.debug

View file

@ -24,6 +24,7 @@
#include <string.h>
#include <sys/stat.h>
// enable debug messages
//#define DEBUG
// checking the file is in the regular executable path or in /usr/lib*
@ -48,7 +49,7 @@ static int check_env_path(const char *fname) {
while (ptr) {
if (strncmp(fname, ptr, strlen(ptr)) == 0) {
free(path2);
printf("INFO: full path provided for %s\n", fname);
printf("Info: full path provided for %s\n", fname);
return 0;
}
ptr = strtok(NULL, ":");
@ -93,7 +94,12 @@ int main(int argc, char **argv) {
#ifdef DEBUG
printf("%s:%s():%d\n", __FILE__, __PRETTY_FUNCTION__, __LINE__);
#endif
if (argc == 1) {
fprintf(stderr, "Error: bwrap program arguments are required.\n");
usage();
return 1;
}
if (strcmp(argv[1], "-h") == 0 ||
strcmp(argv[1], "-?") == 0 ||
strcmp(argv[1], "-v") == 0 ||