[LU-13580] sanity-selinux test_5: sec context seen from 1st mount point is not correct Created: 18/May/20  Updated: 01/Sep/20  Resolved: 16/Jun/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.14.0, Lustre 2.12.6

Type: Bug Priority: Minor
Reporter: Maloo Assignee: Sebastien Buisson
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

This issue was created by maloo for S Buisson <sbuisson@ddn.com>

This issue relates to the following test suite run: https://testing.whamcloud.com/test_sets/759a0bee-28af-4ea7-8e73-4d6253abbf7c

test_5 failed with the following error:

sec context seen from 1st mount point is not correct

In fact, the way the test retrieves SELinux security context is broken.
On CentOS 7, output of ls -lZ is made of 5 fields, and sec context is the 4th one, like in this example:

-rw-r--r--. root root unconfined_u:object_r:user_tmp_t:s0 /tmp/sanity-selinux.log

However, on CentOS 8, output of ls -lZ is made of 10 fields, and sec context is the 5th one:

-rw-r--r--. 1 root root unconfined_u:object_r:nfs_t:s0 0 May 16 03:36 /mnt/lustre/df5

Not only test_5 is impacted, but also test_10 and test_20a.

VVVVVVV DO NOT REMOVE LINES BELOW, Added by Maloo for auto-association VVVVVVV
sanity-selinux test_5 - sec context seen from 1st mount point is not correct



 Comments   
Comment by Gerrit Updater [ 18/May/20 ]

Sebastien Buisson (sbuisson@ddn.com) uploaded a new patch: https://review.whamcloud.com/38648
Subject: LU-13580 tests: fix retrieval of SELinux context
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: d35fd153560668974b5c8a35e05aea6f502fa562

Comment by Gerrit Updater [ 16/Jun/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38648/
Subject: LU-13580 tests: fix retrieval of SELinux context
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: ca09fda138b6d72588f40e4cf79c5f2de832d2dd

Comment by Peter Jones [ 16/Jun/20 ]

Landed for 2.14

Comment by Gerrit Updater [ 24/Aug/20 ]

Sebastien Buisson (sbuisson@ddn.com) uploaded a new patch: https://review.whamcloud.com/39713
Subject: LU-13580 tests: fix retrieval of SELinux context
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: a0f188313d896376382b9c816c34f3be9534fd41

Comment by Gerrit Updater [ 01/Sep/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39713/
Subject: LU-13580 tests: fix retrieval of SELinux context
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: 42fc0bd1fc80c43babbda76110a227a52a9b81d3

Generated at Sat Feb 10 03:02:28 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.