Skip to content

Commit

Permalink
contrib/pam_zfs_key: fix unused, remove argsused
Browse files Browse the repository at this point in the history
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
  • Loading branch information
nabijaczleweli committed Dec 21, 2021
1 parent 235c094 commit f25ce0e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions contrib/pam_zfs_key/pam_zfs_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}

Expand Down Expand Up @@ -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.");
Expand Down Expand Up @@ -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.");
Expand Down

0 comments on commit f25ce0e

Please sign in to comment.