Bug 14476 - Cannot set timestamp of Minshall-French symlinks from a CIFS mount
Summary: Cannot set timestamp of Minshall-French symlinks from a CIFS mount
Status: NEW
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 3.x
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Steve French
QA Contact: cifs QA contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-01 22:00 UTC by Micah Veilleux
Modified: 2020-09-04 11:02 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Micah Veilleux 2020-09-01 22:00:24 UTC
I see that it is possible to act on a Minshall-French symlink to change the timestamp of its target:
------------------------------
mcrs3:/TCS # ls -lh test*
-rwxr-xr-x 1 root root 0 Sep  1 00:13 testfile
lrwxrwxrwx 1 root root 8 Sep  1 00:13 testlink -> testfile
mcrs3:/TCS #
mcrs3:/TCS # touch -t 01011200 testlink
mcrs3:/TCS #
mcrs3:/TCS # ls -lh test*
-rwxr-xr-x 1 root root 0 Jan  1  2020 testfile                # January expected --> ok
lrwxrwxrwx 1 root root 8 Sep  1 00:13 testlink -> testfile
------------------------------

But the "-h" option of "touch" does not work to trigger a change to the timestamp of the mfsymlink itself.  Neither the mfsymlink nor its target gets the specified timestamp:
------------------------------
mcrs3:/TCS # touch -h -t 02011200 testlink
mcrs3:/TCS #
mcrs3:/TCS # ls -lh test*
-rwxr-xr-x 1 root root 0 Jan  1  2020 testfile
lrwxrwxrwx 1 root root 8 Sep  1 00:13 testlink -> testfile    # February expected --> not ok
mcrs3:/TCS #
------------------------------

When I use the "-h" option against a regular file, it does get the specified timestamp:
------------------------------
mcrs3:/TCS # touch -h -t 02011200 testfile
mcrs3:/TCS #
mcrs3:/TCS # ls -lh test*
-rwxr-xr-x 1 root root 0 Feb  1  2020 testfile                # February expected --> ok
lrwxrwxrwx 1 root root 8 Sep  1 00:13 testlink -> testfile
mcrs3:/TCS #
------------------------------

Details of the mount, and versions:
------------------------------
mcrs3:/TCS # grep "TCS " /etc/fstab
//mcrs3/TCS /TCS cifs user=cifsuser,multiuser,domain=VPTC3,sec=krb5,mfsymlinks,vers=3.0 0 0
mcrs3:/TCS #
mcrs3:/TCS # mount.cifs --version
mount.cifs version: 6.5
mcrs3:/TCS #
mcrs3:/TCS # head -n 2 /etc/os-release
NAME="SLES"
VERSION="15"
mcrs3:/TCS #
------------------------------

Minshall-French symlinks are not "standard" symlinks, so maybe it's to be expected that standard linux utilities cannot manage them properly, but perhaps it is possible for Samba to address this.
Comment 1 Björn Jacke 2020-09-04 11:02:17 UTC
moving this to the cifsvfs product because the Minshall-French symlink are a client-only thing.