[LU-6950] Lustre mount throws away SELinux context options Created: 04/Aug/15  Updated: 28/Mar/17  Resolved: 24/Sep/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.8.0
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Major
Reporter: Andrew Wellington Assignee: Dmitry Eremin (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Related
is related to LU-5560 SELinux support on the client side Resolved
is related to LU-7417 Permission Denied on enforcing SElinu... Closed
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Lustre mounts do not support SELinux context options to allow applying an SELinux context across the entire mount.

Steps to Reproduce

1. Install CentOS 6 based Lustre client with default SELinux configuration
2. Attempt to mount Lustre volume with SELinux context

# mount -t lustre -o context=system_u:object_r:user_home_t:s0 mds@tcp:/testfs /mnt/

3. Error message is produced:

mount.lustre: mount mds@tcp:/testfs at /mnt failed: Invalid argument
This may have multiple causes.
Is 'testfs' the correct filesystem name?
Are the mount options correct?
Check the syslog for more info.\

Syslog messages:

LNet: Added LNI 192.168.122.120@tcp [8/256/0/180]
LNet: Accept secure, port 988
LustreError: 152-6: Unknown option 'context="system_u:object_r:user_home_t:s0"', won't mount.
Lustre: Unmounted testfs-client
LustreError: 1265:0:(obd_mount.c:1342:lustre_fill_super()) Unable to mount  (-22)


 Comments   
Comment by Gerrit Updater [ 04/Aug/15 ]

Andrew Wellington (andrew.wellington@anu.edu.au) uploaded a new patch: http://review.whamcloud.com/15840
Subject: LU-6950 utils: support SELinux context labelling
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7551ead5b7b52db38306f20d526d5f8639a380c4

Comment by Gerrit Updater [ 24/Sep/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15840/
Subject: LU-6950 utils: support SELinux context labelling
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 0e741fc858bd63d4039ac9a0ef8301baf6e6f9db

Comment by Joseph Gmitter (Inactive) [ 24/Sep/15 ]

Landed for 2.8

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