Merge pull request #29763 from yuwata/vconsole-conf

locale,firstboot: add comments to vconsole.conf
This commit is contained in:
Lennart Poettering
2023-10-31 14:37:47 +01:00
committed by GitHub
10 changed files with 46 additions and 17 deletions
+16 -2
View File
@@ -6,14 +6,28 @@
#include "env-file.h"
#include "selinux-util.h"
int write_env_file_label(const char *fname, char **l) {
int write_env_file_label(int dir_fd, const char *fname, char **headers, char **l) {
int r;
r = mac_selinux_create_file_prepare(fname, S_IFREG);
if (r < 0)
return r;
r = write_env_file(fname, l);
r = write_env_file(dir_fd, fname, headers, l);
mac_selinux_create_file_clear();
return r;
}
int write_vconsole_conf_label(char **l) {
int r;
r = mac_selinux_create_file_prepare("/etc/vconsole.conf", S_IFREG);
if (r < 0)
return r;
r = write_vconsole_conf(AT_FDCWD, "/etc/vconsole.conf", l);
mac_selinux_create_file_clear();
+3 -1
View File
@@ -5,4 +5,6 @@
* optimize linking: This way, -lselinux is needed only for the callers of these functions that need selinux, but not
* for all */
int write_env_file_label(const char *fname, char **l);
int write_env_file_label(int dir_fd, const char *fname, char **headers, char **l);
int write_vconsole_conf_label(char **l);
+1 -1
View File
@@ -208,7 +208,7 @@ int locale_context_save(LocaleContext *c, char ***ret_set, char ***ret_unset) {
return 0;
}
r = write_env_file_label("/etc/locale.conf", set);
r = write_env_file_label(AT_FDCWD, "/etc/locale.conf", NULL, set);
if (r < 0)
return r;