Description of problem: Shadow copy is not obeying the regular expression formats. Positive Cases: When regular expression are provided to accept certain format or certain amount of character and you create a snapshot name satisfying the regular expression it still does not list out in restore to previous version option over a file in windows. Negative Cases : When a regular expression is provided and you provide a snap name beyond that rule. It is still getting listed on restore options over a file. Version-Release number of selected component (if applicable): samba-client-4.4.2-1.el7rhgs.x86_64 glusterfs-client-xlators-3.7.9-2.el7rhgs.x86_64 How reproducible: Always Steps to Reproduce: 1.Create files in windows mount with data in it. 2.In smb.conf file provide shadow:snapprefix=[a-fA-F\d]{32} 3.Restart smb services 4.Create a snapshot with name "e0d123e5f316bef78bfdf5a008837577" 5.Activate the snapshot 5.Right click on the file on windows client and client on Restore to previous version Actual results: No snapshot name is listed Expected results: Should list out the snapshot name Additional info: Few more regular expressions \b[sS]\w+ [a-z]{10}$ ^[a-z]*[0-9]*D$
These are extended regular expressions (ERE), currently we only support POSIX basic regular expression (BRE). Check the following link for more details: http://www.regular-expressions.info/refcharclass.html With BRE try the following: [a-fA-F0-9]\{32\}
THis is works as designed. We need to document it more clearly.
The feature is tested on extended regular expression (ERE) and basic regular expression(BRE). ERE cases failed as it is not supported for now. Tests are validated on BRE and it works fine. Need to be mentioned in documentation.