mirror_zfs/tests/zfs-tests/cmd
Brian Behlendorf 8005ca4f74
Move strlcat, strlcpy, and strnlen
Move strlcat() and strlcpy() from .c source files in to the libspl
string.h header.  By changing these compatibility functions to static
inline functions they can included as needed without requiring linking
with the libspl.so library.

Remove strnlen() which is barely used in the source, and has been
provided by glibc since v2.10.

Finally, convert four instances of strncpy() to strlcpy() in
libzfs_input_check.c which were causing build warnings when compiling
with gcc 8.2.1.  For example:

  libzfs_input_check.c: In function ‘zfs_destroy’:
  libzfs_input_check.c:651:9: error: ‘strncpy’ specified bound \
      4096 equals destination size [-Werror=stringop-truncation]
    (void) strncpy(zc.zc_name, dataset, sizeof (zc.zc_name));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8116
2018-11-20 10:37:49 -08:00
..
chg_usr_exec Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
devname2devid Fedora 28: Fix misc bounds check compiler warnings 2018-04-04 10:16:47 -07:00
dir_rd_update Use cstyle -cpP in make cstyle check 2016-12-12 10:46:26 -08:00
file_check Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
file_trunc Enable remaining tests 2017-05-22 12:34:32 -04:00
file_write OpenZFS 4185 - add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R 2016-10-03 14:51:15 -07:00
largest_file Enable remaining tests 2017-05-22 12:34:32 -04:00
libzfs_input_check Move strlcat, strlcpy, and strnlen 2018-11-20 10:37:49 -08:00
mkbusy Fedora 28: Fix misc bounds check compiler warnings 2018-04-04 10:16:47 -07:00
mkfile Fix calloc(3) arguments order 2018-04-12 10:50:39 -07:00
mkfiles Add support for user/group dnode accounting & quota 2016-10-07 09:45:13 -07:00
mktree Fedora 28: Fix misc bounds check compiler warnings 2018-04-04 10:16:47 -07:00
mmap_exec Enable remaining tests 2017-05-22 12:34:32 -04:00
mmap_libaio Fix mmap / libaio deadlock 2018-03-28 10:19:22 -07:00
mmapwrite deadlock between mm_sem and tx assign in zfs_write() and page fault 2018-10-16 11:11:24 -07:00
nvlist_to_lua OpenZFS 7431 - ZFS Channel Programs 2018-02-08 15:28:18 -08:00
randfree_file Fix coverity defects: CID 147692, 147693, 147694 2016-10-13 14:38:59 -07:00
randwritecomp OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
readmmap Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
rename_dir Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
rm_lnkcnt_zero_file Fix file permissions 2016-10-08 14:57:56 -07:00
threadsappend Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
user_ns_exec Take user namespaces into account in policy checks 2018-03-07 15:40:42 -08:00
xattrtest Fedora 28: Fix misc bounds check compiler warnings 2018-04-04 10:16:47 -07:00
file_common.h Enable remaining tests 2017-05-22 12:34:32 -04:00
Makefile.am Add basic zfs ioc input nvpair validation 2018-09-02 12:14:01 -07:00