aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-02-06 09:34:47 -0500
committerLibravatar netblue30 <netblue30@protonmail.com>2023-02-06 09:34:47 -0500
commite6f2374d557c94616b9b9db0bcebe0bbd5d78d88 (patch)
tree2f785e62fc87323c7fbe1c0ffc40f218d045d37c /src
parentMerge pull request #5634 from acatton/master (diff)
downloadfirejail-e6f2374d557c94616b9b9db0bcebe0bbd5d78d88.tar.gz
firejail-e6f2374d557c94616b9b9db0bcebe0bbd5d78d88.tar.zst
firejail-e6f2374d557c94616b9b9db0bcebe0bbd5d78d88.zip
installing etc-cleanup tool in /usr/lib/firejail directory
Diffstat (limited to 'src')
-rw-r--r--src/etc-cleanup/main.c (renamed from src/tools/cleanup_etc.c)12
-rw-r--r--src/include/etc_groups.h1
2 files changed, 4 insertions, 9 deletions
diff --git a/src/tools/cleanup_etc.c b/src/etc-cleanup/main.c
index f57a1ddb1..47fe1556b 100644
--- a/src/tools/cleanup_etc.c
+++ b/src/etc-cleanup/main.c
@@ -18,15 +18,9 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20 20
21#include <stdio.h>
22#include <stdlib.h>
23#include <string.h>
24#include <stdarg.h>
25#include <assert.h>
26#include "../include/etc_groups.h" 21#include "../include/etc_groups.h"
27#define errExit(msg) do { char msgout[500]; sprintf(msgout, "Error %s:%s(%d)", msg, __FUNCTION__, __LINE__); perror(msgout); exit(1);} while (0) 22#include "../include/common.h"
28 23#include <stdarg.h>
29
30 24
31#define MAX_BUF 4098 25#define MAX_BUF 4098
32#define MAX_ARR 1024 26#define MAX_ARR 1024
@@ -223,7 +217,7 @@ static void usage(void) {
223 printf("Group and clean private-etc entries in one or more profile files.\n"); 217 printf("Group and clean private-etc entries in one or more profile files.\n");
224 printf("Options:\n"); 218 printf("Options:\n");
225 printf(" --debug - print debug messages\n"); 219 printf(" --debug - print debug messages\n");
226 printf(" --help - this help screen\n"); 220 printf(" -h, -?, --help - this help screen\n");
227 printf(" --replace - replace profile file\n"); 221 printf(" --replace - replace profile file\n");
228} 222}
229 223
diff --git a/src/include/etc_groups.h b/src/include/etc_groups.h
index 61ac8ac69..dd9d94ffd 100644
--- a/src/include/etc_groups.h
+++ b/src/include/etc_groups.h
@@ -20,6 +20,7 @@
20 20
21#ifndef ETC_GROUPS_H 21#ifndef ETC_GROUPS_H
22#define ETC_GROUPS_H 22#define ETC_GROUPS_H
23#include <stddef.h>
23 24
24#define ETC_MAX 256 25#define ETC_MAX 256
25 26