diff options
author | наб <[email protected]> | 2021-12-11 02:32:43 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-12-21 12:05:12 -0800 |
commit | 1f63c645596bd5f85e45bf13e592f1941f9ac8fc (patch) | |
tree | 6ca3c032efd2edda74b78b50051077e9ebf05fc4 /contrib/pam_zfs_key | |
parent | cf8d708b7a17d301b09dc9513ad5e2741083895d (diff) |
contrib/pam_zfs_key: fix unused, remove argsused
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #12835
Diffstat (limited to 'contrib/pam_zfs_key')
-rw-r--r-- | contrib/pam_zfs_key/pam_zfs_key.c | 9 |
1 files changed, 9 insertions, 0 deletions
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."); |