shadow_copy_get_shadow_copy_data: fix GCC snprintf warning
commitad1f95356b88202eeaf0ebd5be59afb3af247c8d
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 9 Feb 2017 00:02:52 +0000 (9 13:02 +1300)
committerKarolin Seeger <kseeger@samba.org>
Thu, 8 Jun 2017 15:04:34 +0000 (8 17:04 +0200)
tree303c2afe4d4671c87f1c79b510653f91971b4139
parente550c8ae7dfb09cd1503a75083b25e5458d27b68
shadow_copy_get_shadow_copy_data: fix GCC snprintf warning

GCC 7 warns about snprintf truncating a dirent d_name (potentially 255 bytes) to 25 bytes,
even though we have checked that it is 25 long in shadow_copy_match_name().

Using strlcpy instead of snprintf lets us check it again, JUST TO BE SURE.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit a091a30a5bd50bc02df3e9c01b11f70c94dbd053)

Autobuild-User(v4-6-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-6-test): Thu Jun  8 17:04:34 CEST 2017 on sn-devel-144
source3/include/ntioctl.h
source3/modules/vfs_shadow_copy.c