From ee0e86cfb560506f65b16659195b156c74f17969 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 19 Oct 2025 13:18:12 +1100 Subject: [PATCH] libzpool: remove unused userspace ioctl policy functions Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #17861 --- include/sys/zfs_context.h | 6 ------ lib/libzpool/kernel.c | 28 ---------------------------- 2 files changed, 34 deletions(-) diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index d8c544663..1d5d6e45a 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -228,12 +228,6 @@ struct bootstat { uint64_t st_size; }; -extern int zfs_secpolicy_snapshot_perms(const char *name, cred_t *cr); -extern int zfs_secpolicy_rename_perms(const char *from, const char *to, - cred_t *cr); -extern int zfs_secpolicy_destroy_perms(const char *name, cred_t *cr); -extern int secpolicy_zfs(const cred_t *cr); - #define DDI_SLEEP KM_SLEEP #define ddi_log_sysevent(_a, _b, _c, _d, _e, _f, _g) \ sysevent_post_event(_c, _d, _b, "libzpool", _e, _f) diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c index 8fd9157f4..7e3ffec3b 100644 --- a/lib/libzpool/kernel.c +++ b/lib/libzpool/kernel.c @@ -482,34 +482,6 @@ kernel_fini(void) libspl_fini(); } -int -zfs_secpolicy_snapshot_perms(const char *name, cred_t *cr) -{ - (void) name, (void) cr; - return (0); -} - -int -zfs_secpolicy_rename_perms(const char *from, const char *to, cred_t *cr) -{ - (void) from, (void) to, (void) cr; - return (0); -} - -int -zfs_secpolicy_destroy_perms(const char *name, cred_t *cr) -{ - (void) name, (void) cr; - return (0); -} - -int -secpolicy_zfs(const cred_t *cr) -{ - (void) cr; - return (0); -} - zfs_file_t * zfs_onexit_fd_hold(int fd, minor_t *minorp) {