From 1f63c645596bd5f85e45bf13e592f1941f9ac8fc Mon Sep 17 00:00:00 2001 From: наб Date: Sat, 11 Dec 2021 02:32:43 +0100 Subject: contrib/pam_zfs_key: fix unused, remove argsused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia Ziemiańska Closes #12835 --- contrib/pam_zfs_key/pam_zfs_key.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'contrib/pam_zfs_key') diff --git a/contrib/pam_zfs_key/pam_zfs_key.c b/contrib/pam_zfs_key/pam_zfs_key.c index d87384cee..878e65a8e 100644 --- a/contrib/pam_zfs_key/pam_zfs_key.c +++ b/contrib/pam_zfs_key/pam_zfs_key.c @@ -219,6 +219,8 @@ pw_clear(pam_handle_t *pamh) static void destroy_pw(pam_handle_t *pamh, void *data, int errcode) { + (void) pamh, (void) errcode; + if (data != NULL) { pw_free((pw_password_t *)data); } @@ -638,6 +640,8 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv) { + (void) flags, (void) argc, (void) argv; + if (pw_fetch_lazy(pamh) == NULL) { return (PAM_AUTH_ERR); } @@ -650,6 +654,7 @@ PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh, int flags, int argc, const char **argv) { + (void) pamh, (void) flags, (void) argc, (void) argv; return (PAM_SUCCESS); } @@ -737,6 +742,8 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) { + (void) flags; + if (geteuid() != 0) { pam_syslog(pamh, LOG_ERR, "Cannot zfs_mount when not being root."); @@ -791,6 +798,8 @@ PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, const char **argv) { + (void) flags; + if (geteuid() != 0) { pam_syslog(pamh, LOG_ERR, "Cannot zfs_mount when not being root."); -- cgit v1.2.3