SELinux Security Module development
 help / color / mirror / Atom feed
From: Daniel Burgener <dburgener@linux.microsoft.com>
To: Petr Lautrbach <plautrba@redhat.com>, selinux@vger.kernel.org
Subject: Re: [PATCH] libselinux: Add missing '\n' to avc_log() messages
Date: Tue, 11 Oct 2022 09:16:46 -0400	[thread overview]
Message-ID: <aad3cf91-53ed-e4aa-8009-2e7e6ea5ca89@linux.microsoft.com> (raw)
In-Reply-To: <20221011112733.194079-1-plautrba@redhat.com>

On 10/11/2022 7:27 AM, Petr Lautrbach wrote:
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Reviewed-by: Daniel Burgener <dburgener@linux.microsoft.com>

> ---
>   libselinux/src/avc.c          | 2 +-
>   libselinux/src/avc_internal.c | 4 ++--
>   libselinux/src/checkAccess.c  | 4 ++--
>   3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/libselinux/src/avc.c b/libselinux/src/avc.c
> index 8d5983a2fe0c..98a3fcae41c8 100644
> --- a/libselinux/src/avc.c
> +++ b/libselinux/src/avc.c
> @@ -725,7 +725,7 @@ void avc_audit(security_id_t ssid, security_id_t tsid,
>   	if (denied)
>   		log_append(avc_audit_buf, " permissive=%u", result ? 0 : 1);
>   
> -	avc_log(SELINUX_AVC, "%s", avc_audit_buf);
> +	avc_log(SELINUX_AVC, "%s\n", avc_audit_buf);
>   
>   	avc_release_lock(avc_log_lock);
>   }
> diff --git a/libselinux/src/avc_internal.c b/libselinux/src/avc_internal.c
> index 71a1357bc564..c550e5788527 100644
> --- a/libselinux/src/avc_internal.c
> +++ b/libselinux/src/avc_internal.c
> @@ -59,7 +59,7 @@ int avc_process_setenforce(int enforcing)
>   	int rc = 0;
>   
>   	avc_log(SELINUX_SETENFORCE,
> -		"%s:  op=setenforce lsm=selinux enforcing=%d res=1",
> +		"%s:  op=setenforce lsm=selinux enforcing=%d res=1\n",
>   		avc_prefix, enforcing);
>   	if (avc_setenforce)
>   		goto out;
> @@ -81,7 +81,7 @@ int avc_process_policyload(uint32_t seqno)
>   	int rc = 0;
>   
>   	avc_log(SELINUX_POLICYLOAD,
> -		"%s:  op=load_policy lsm=selinux seqno=%u res=1",
> +		"%s:  op=load_policy lsm=selinux seqno=%u res=1\n",
>   		avc_prefix, seqno);
>   	rc = avc_ss_reset(seqno);
>   	if (rc < 0) {
> diff --git a/libselinux/src/checkAccess.c b/libselinux/src/checkAccess.c
> index 022cd6b5ecab..319af267c6a7 100644
> --- a/libselinux/src/checkAccess.c
> +++ b/libselinux/src/checkAccess.c
> @@ -44,7 +44,7 @@ int selinux_check_access(const char *scon, const char *tcon, const char *class,
>          sclass = string_to_security_class(class);
>          if (sclass == 0) {
>   	       rc = errno;
> -	       avc_log(SELINUX_ERROR, "Unknown class %s", class);
> +	       avc_log(SELINUX_ERROR, "Unknown class %s\n", class);
>   	       if (security_deny_unknown() == 0)
>   		       return 0;
>   	       errno = rc;
> @@ -54,7 +54,7 @@ int selinux_check_access(const char *scon, const char *tcon, const char *class,
>          av = string_to_av_perm(sclass, perm);
>          if (av == 0) {
>   	       rc = errno;
> -	       avc_log(SELINUX_ERROR, "Unknown permission %s for class %s", perm, class);
> +	       avc_log(SELINUX_ERROR, "Unknown permission %s for class %s\n", perm, class);
>   	       if (security_deny_unknown() == 0)
>   		       return 0;
>   	       errno = rc;


  reply	other threads:[~2022-10-11 13:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 11:27 [PATCH] libselinux: Add missing '\n' to avc_log() messages Petr Lautrbach
2022-10-11 13:16 ` Daniel Burgener [this message]
2022-10-14 10:41 ` Petr Lautrbach
2022-10-14 14:25   ` Daniel Burgener
2022-10-14 14:37     ` Petr Lautrbach
2022-10-15 15:12       ` Christian Göttsche
2022-10-17 11:59         ` Petr Lautrbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aad3cf91-53ed-e4aa-8009-2e7e6ea5ca89@linux.microsoft.com \
    --to=dburgener@linux.microsoft.com \
    --cc=plautrba@redhat.com \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox