aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/firejail/profile.c')
-rw-r--r--src/firejail/profile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/firejail/profile.c b/src/firejail/profile.c
index 0c28eefd8..518fdf194 100644
--- a/src/firejail/profile.c
+++ b/src/firejail/profile.c
@@ -66,6 +66,8 @@ int profile_find(const char *name, const char *dir) {
66// return 1 if the command is to be added to the linked list of profile commands 66// return 1 if the command is to be added to the linked list of profile commands
67// return 0 if the command was already executed inside the function 67// return 0 if the command was already executed inside the function
68int profile_check_line(char *ptr, int lineno, const char *fname) { 68int profile_check_line(char *ptr, int lineno, const char *fname) {
69 EUID_ASSERT();
70
69 // check ignore list 71 // check ignore list
70 int i; 72 int i;
71 for (i = 0; i < MAX_PROFILE_IGNORE; i++) { 73 for (i = 0; i < MAX_PROFILE_IGNORE; i++) {
@@ -458,6 +460,8 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
458 460
459// add a profile entry in cfg.profile list; use str to populate the list 461// add a profile entry in cfg.profile list; use str to populate the list
460void profile_add(char *str) { 462void profile_add(char *str) {
463 EUID_ASSERT();
464
461 ProfileEntry *prf = malloc(sizeof(ProfileEntry)); 465 ProfileEntry *prf = malloc(sizeof(ProfileEntry));
462 if (!prf) 466 if (!prf)
463 errExit("malloc"); 467 errExit("malloc");
@@ -479,6 +483,8 @@ void profile_add(char *str) {
479// read a profile file 483// read a profile file
480static int include_level = 0; 484static int include_level = 0;
481void profile_read(const char *fname) { 485void profile_read(const char *fname) {
486 EUID_ASSERT();
487
482 // exit program if maximum include level was reached 488 // exit program if maximum include level was reached
483 if (include_level > MAX_INCLUDE_LEVEL) { 489 if (include_level > MAX_INCLUDE_LEVEL) {
484 fprintf(stderr, "Error: maximum profile include level was reached\n"); 490 fprintf(stderr, "Error: maximum profile include level was reached\n");