All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Paul Moore <pmoore@redhat.com>,
	Serge Hallyn <serge.hallyn@ubuntu.com>,
	selinux@tycho.nsa.gov, Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: [PATCH] file: replace 'ls -Z' with 'ls -lZ' for consistent results
Date: Fri, 29 Aug 2014 08:09:29 -0400	[thread overview]
Message-ID: <54006D79.1050409@tycho.nsa.gov> (raw)
In-Reply-To: <20140828204738.10801.34505.stgit@localhost>

On 08/28/2014 04:47 PM, Paul Moore wrote:
> I'm not sure the exact date of the change, but 'ls -Z' on Rawhide is
> a bit different than in the past; the output now looks like this:
> 
>   # /bin/ls -Z test
>   system_u:object_r:test_file_t:s0 test

That seems very wrong - who knows how many userspace scripts may rely on
the output of ls -Z having a given format?   Is this a change in
upstream coreutils or Fedora-specific?

> 
> This patch converts the testsuite to use 'ls -lZ' which appears to be
> consistent.
> 
> Signed-off-by: Paul Moore <pmoore@redhat.com>
> ---
>  tests/file/test |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/file/test b/tests/file/test
> index e6ed44d..1c8485a 100755
> --- a/tests/file/test
> +++ b/tests/file/test
> @@ -45,9 +45,9 @@ system "chcon -t fileop_exec_t $basedir/wait_io 2>&1 > /dev/null";
>  #
>  # Get the SID of the good file.
>  #
> -$output = `ls -Z $basedir/temp_file`;
> +$output = `ls -lZ $basedir/temp_file`;
>  @arr = split(' ', $output);
> -$good_file_sid = $arr[3];
> +$good_file_sid = $arr[4];
>  
>  #
>  # Attempt to access a restricted file as the 'good' domain.  The first test
> 
> _______________________________________________
> Selinux mailing list
> Selinux@tycho.nsa.gov
> To unsubscribe, send email to Selinux-leave@tycho.nsa.gov.
> To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov.
> 

  reply	other threads:[~2014-08-29 12:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 20:47 [PATCH] file: replace 'ls -Z' with 'ls -lZ' for consistent results Paul Moore
2014-08-29 12:09 ` Stephen Smalley [this message]
2014-08-29 14:37   ` Paul Moore
2014-08-29 15:12     ` Stephen Smalley
2014-08-29 15:23       ` Paul Moore
2014-08-29 18:06       ` Paul Moore

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=54006D79.1050409@tycho.nsa.gov \
    --to=sds@tycho.nsa.gov \
    --cc=dwalsh@redhat.com \
    --cc=pmoore@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    --cc=serge.hallyn@ubuntu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.