mirror of
https://github.com/systemd/systemd.git
synced 2026-07-25 00:35:55 +00:00
smack: allow comments on smack rules (#7438)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
3a26bc1dd5
commit
459aafc6d8
@@ -103,7 +103,7 @@ static int write_access2_rules(const char* srcdir) {
|
||||
|
||||
_cleanup_free_ char *sbj = NULL, *obj = NULL, *acc1 = NULL, *acc2 = NULL;
|
||||
|
||||
if (isempty(truncate_nl(buf)))
|
||||
if (isempty(truncate_nl(buf)) || strchr(COMMENTS, *buf))
|
||||
continue;
|
||||
|
||||
/* if 3 args -> load rule : subject object access1 */
|
||||
@@ -180,7 +180,7 @@ static int write_cipso2_rules(const char* srcdir) {
|
||||
log_error_errno(errno, "Failed to read line from '%s': %m",
|
||||
entry->d_name)) {
|
||||
|
||||
if (isempty(truncate_nl(buf)))
|
||||
if (isempty(truncate_nl(buf)) || strchr(COMMENTS, *buf))
|
||||
continue;
|
||||
|
||||
if (write(cipso2_fd, buf, strlen(buf)) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user