Your message dated Sat, 27 May 2017 02:57:01 +0200
with message-id <[email protected]>
and subject line Re: Bug#851143: systemd: doesn't use all the mount options 
from /etc/fstab when mounting on boot
has caused the Debian Bug report #851143,
regarding systemd: doesn't use all the mount options from /etc/fstab when 
mounting on boot
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
851143: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851143
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: systemd
Version: 232-8
Severity: normal

When I boot a server that mounts a filesystem via NFS it ignores the context=
mount option to set a SE Linux context of the files.

What I want is to use the type mail_spool_t for a NFS mounted mail spool
instead of the default nfsd_rw_t (a generic writable NFS filesystem label).

Script started on Thu 12 Jan 2017 22:36:40 AEDT
root@swssmtp:/tmp# ls -ldZ /mail
drwxr-xr-x. 1 vmail vmail system_u:object_r:nfsd_rw_t:s0 688 Aug 15 23:54 /mail
root@swssmtp:/tmp# umount /mail
root@swssmtp:/tmp# mount /mail
root@swssmtp:/tmp# ls -ldZ /mail
drwxr-xr-x. 1 vmail vmail system_u:object_r:mail_spool_t:s0 688 Aug 15 23:54 
/mail
root@swssmtp:/tmp# grep mail /etc/fstab
10.10.10.1:/mailstore   /mail   nfs     
context=system_u:object_r:mail_spool_t:s0 0 0
root@swssmtp:/tmp# exit

Script done on Thu 12 Jan 2017 22:37:05 AEDT

-- Package-specific info:

-- System Information:
Debian Release: stretch/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.8.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd depends on:
ii  adduser         3.115
ii  libacl1         2.2.52-3
ii  libapparmor1    2.10.95-8
ii  libaudit1       1:2.6.7-1
ii  libblkid1       2.29-1
ii  libc6           2.24-8
ii  libcap2         1:2.25-1
ii  libcryptsetup4  2:1.7.3-3
ii  libgcrypt20     1.7.5-2
ii  libgpg-error0   1.26-1
ii  libidn11        1.33-1
ii  libip4tc0       1.6.0+snapshot20161117-4
ii  libkmod2        23-2
ii  liblz4-1        0.0~r131-2
ii  liblzma5        5.2.2-1.2
ii  libmount1       2.29-1
ii  libpam0g        1.1.8-3.4
ii  libseccomp2     2.3.1-2.1
ii  libselinux1     2.6-3
ii  libsystemd0     232-8
ii  mount           2.29-1
ii  util-linux      2.29-1

Versions of packages systemd recommends:
ii  dbus            1.10.14-1
pn  libpam-systemd  <none>

Versions of packages systemd suggests:
pn  policykit-1        <none>
pn  systemd-container  <none>
pn  systemd-ui         <none>

Versions of packages systemd is related to:
pn  dracut           <none>
pn  initramfs-tools  <none>
ii  udev             232-8

-- Configuration Files:
/etc/systemd/timesyncd.conf changed [not included]

-- no debconf information

--- End Message ---
--- Begin Message ---
Am 23.05.2017 um 15:46 schrieb Michael Biebl:
> systemd simply calls the /bin/mount utility.
> 
> Russel, could you use the attached wrapper script to get a log of what
> systemd is doing
> mv /bin/mount /bin/mount.orig
> cp attached script to /bin/mount
> chmod +x /bin/mount
> 
> reboot, then attach /run/log.mount

I've just setup a test stretch VM, enabled selinux following the
instructions from [1], adding a NFS mount to /etc/fstab using
context=system_u:object_r:mail_spool_t:s0, rebooted, and the directory
has the proper selinux context as configured.

What you showed me so far also indicates that systemd has actually
passed on the proper options to the mount command. I'm thus very much
convinced that something else interferes on your system and (re)mounts
/mail with the wrong options.

I'm thus closing this bug report again as I don't see any bug from the
systemd side.

Regards,
Michael


[1] https://wiki.debian.org/SELinux/Setup

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to