diff options
author | Jorgen Lundman <[email protected]> | 2020-06-08 03:42:12 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-07 11:42:12 -0700 |
commit | c9e319faae9677aa0dddfbf9973b9e8fc3feb06c (patch) | |
tree | 3d6677913e5f26d91b7f35bcb62b9b354287db61 /include/sys/zfs_fuid.h | |
parent | 60265072e02049be708f74cf0865eba2434a2d85 (diff) |
Replace sprintf()->snprintf() and strcpy()->strlcpy()
The strcpy() and sprintf() functions are deprecated on some platforms.
Care is needed to ensure correct size is used. If some platforms
miss snprintf, we can add a #define to sprintf, likewise strlcpy().
The biggest change is adding a size parameter to zfs_id_to_fuidstr().
The various *_impl_get() functions are only used on linux and have
not yet been updated.
Reviewed by: Sean Eric Fagan <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Jorgen Lundman <[email protected]>
Closes #10400
Diffstat (limited to 'include/sys/zfs_fuid.h')
-rw-r--r-- | include/sys/zfs_fuid.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/zfs_fuid.h b/include/sys/zfs_fuid.h index fa399f115..b5b37db29 100644 --- a/include/sys/zfs_fuid.h +++ b/include/sys/zfs_fuid.h @@ -117,7 +117,7 @@ extern int zfs_fuid_find_by_domain(zfsvfs_t *, const char *domain, extern const char *zfs_fuid_find_by_idx(zfsvfs_t *zfsvfs, uint32_t idx); extern void zfs_fuid_txhold(zfsvfs_t *zfsvfs, dmu_tx_t *tx); extern int zfs_id_to_fuidstr(zfsvfs_t *zfsvfs, const char *domain, uid_t rid, - char *buf, boolean_t addok); + char *buf, size_t len, boolean_t addok); #endif char *zfs_fuid_idx_domain(avl_tree_t *, uint32_t); |