Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "private-etc: big profile changes" #5645

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
installing etc-cleanup tool in /usr/lib/firejail directory
(cherry picked from commit e6f2374)
  • Loading branch information
netblue30 authored and kmk3 committed Feb 7, 2023
commit 8011b7a47d2cdccca894201d177e5694d774e894
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif

COMPLETIONDIRS = src/zsh_completion src/bash_completion

APPS = src/firecfg/firecfg src/firejail/firejail src/firemon/firemon src/profstats/profstats src/jailcheck/jailcheck
APPS = src/firecfg/firecfg src/firejail/firejail src/firemon/firemon src/profstats/profstats src/jailcheck/jailcheck src/etc-cleanup/etc-cleanup
SBOX_APPS = src/fbuilder/fbuilder src/ftee/ftee src/fids/fids
SBOX_APPS_NON_DUMPABLE = src/fcopy/fcopy src/fldd/fldd src/fnet/fnet src/fnetfilter/fnetfilter src/fzenity/fzenity
SBOX_APPS_NON_DUMPABLE += src/fsec-optimize/fsec-optimize src/fsec-print/fsec-print src/fseccomp/fseccomp
Expand Down Expand Up @@ -200,6 +200,7 @@ endif
install -m 0644 -t $(DESTDIR)$(libdir)/firejail $(MYLIBS) $(SECCOMP_FILTERS)
install -m 0755 -t $(DESTDIR)$(libdir)/firejail $(SBOX_APPS)
install -m 0755 -t $(DESTDIR)$(libdir)/firejail src/profstats/profstats
install -m 0755 -t $(DESTDIR)$(libdir)/firejail src/etc-cleanup/etc-cleanup
# plugins w/o read permission (non-dumpable)
install -m 0711 -t $(DESTDIR)$(libdir)/firejail $(SBOX_APPS_NON_DUMPABLE)
install -m 0711 -t $(DESTDIR)$(libdir)/firejail src/fshaper/fshaper.sh
Expand Down
12 changes: 3 additions & 9 deletions src/tools/cleanup_etc.c → src/etc-cleanup/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <assert.h>
#include "../include/etc_groups.h"
#define errExit(msg) do { char msgout[500]; sprintf(msgout, "Error %s:%s(%d)", msg, __FUNCTION__, __LINE__); perror(msgout); exit(1);} while (0)


#include "../include/common.h"
#include <stdarg.h>

#define MAX_BUF 4098
#define MAX_ARR 1024
Expand Down Expand Up @@ -223,7 +217,7 @@ static void usage(void) {
printf("Group and clean private-etc entries in one or more profile files.\n");
printf("Options:\n");
printf(" --debug - print debug messages\n");
printf(" --help - this help screen\n");
printf(" -h, -?, --help - this help screen\n");
printf(" --replace - replace profile file\n");
}

Expand Down
1 change: 1 addition & 0 deletions src/include/etc_groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#ifndef ETC_GROUPS_H
#define ETC_GROUPS_H
#include <stddef.h>

#define ETC_MAX 256

Expand Down