diff options
author | Reiner Herrmann <reiner@reiner-h.de> | 2020-10-06 18:34:20 +0200 |
---|---|---|
committer | Reiner Herrmann <reiner@reiner-h.de> | 2020-10-06 18:34:20 +0200 |
commit | 33aa0ae9b9e9986c660d9ff2b37e40f0e45a513d (patch) | |
tree | ddf39b1d6b0409360b37d8dc4467d6d11f1b6fde /src | |
parent | Revert "install vim files to addons directory instead of vimfiles" (diff) | |
download | firejail-33aa0ae9b9e9986c660d9ff2b37e40f0e45a513d.tar.gz firejail-33aa0ae9b9e9986c660d9ff2b37e40f0e45a513d.tar.zst firejail-33aa0ae9b9e9986c660d9ff2b37e40f0e45a513d.zip |
fix indentation
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/selinux.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/firejail/selinux.c b/src/firejail/selinux.c index 52d6788ef..c761916b7 100644 --- a/src/firejail/selinux.c +++ b/src/firejail/selinux.c | |||
@@ -35,7 +35,7 @@ static int selinux_enabled = -1; | |||
35 | void selinux_relabel_path(const char *path, const char *inside_path) | 35 | void selinux_relabel_path(const char *path, const char *inside_path) |
36 | { | 36 | { |
37 | #if HAVE_SELINUX | 37 | #if HAVE_SELINUX |
38 | char procfs_path[64]; | 38 | char procfs_path[64]; |
39 | char *fcon = NULL; | 39 | char *fcon = NULL; |
40 | int fd; | 40 | int fd; |
41 | struct stat st; | 41 | struct stat st; |
@@ -50,19 +50,19 @@ void selinux_relabel_path(const char *path, const char *inside_path) | |||
50 | label_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0); | 50 | label_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0); |
51 | 51 | ||
52 | /* Open the file as O_PATH, to pin it while we determine and adjust the label */ | 52 | /* Open the file as O_PATH, to pin it while we determine and adjust the label */ |
53 | fd = open(path, O_NOFOLLOW|O_CLOEXEC|O_PATH); | 53 | fd = open(path, O_NOFOLLOW|O_CLOEXEC|O_PATH); |
54 | if (fd < 0) | 54 | if (fd < 0) |
55 | return; | 55 | return; |
56 | if (fstat(fd, &st) < 0) | 56 | if (fstat(fd, &st) < 0) |
57 | goto close; | 57 | goto close; |
58 | 58 | ||
59 | if (selabel_lookup_raw(label_hnd, &fcon, inside_path, st.st_mode) == 0) { | 59 | if (selabel_lookup_raw(label_hnd, &fcon, inside_path, st.st_mode) == 0) { |
60 | sprintf(procfs_path, "/proc/self/fd/%i", fd); | 60 | sprintf(procfs_path, "/proc/self/fd/%i", fd); |
61 | if (arg_debug) | 61 | if (arg_debug) |
62 | printf("Relabeling %s as %s (%s)\n", path, inside_path, fcon); | 62 | printf("Relabeling %s as %s (%s)\n", path, inside_path, fcon); |
63 | 63 | ||
64 | setfilecon_raw(procfs_path, fcon); | 64 | setfilecon_raw(procfs_path, fcon); |
65 | } | 65 | } |
66 | freecon(fcon); | 66 | freecon(fcon); |
67 | close: | 67 | close: |
68 | close(fd); | 68 | close(fd); |