Skip to content

Commit

Permalink
squash w/ startup/shutdown? Cast nullptr to char* for execl.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Nov 9, 2024
1 parent 3ef5ff4 commit ad3f140
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/auth/src/pam_password.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ namespace
// The list of arguments must be terminated by a NULL pointer, and, since these are
// variadic functions, this pointer must be cast (char *) NULL.
const auto binary = irods::get_irods_sbin_directory() / "irodsPamAuthCheck";
execl(binary.c_str(), binary.c_str(), _username.c_str(), nullptr); // NOLINT(cppcoreguidelines-pro-type-vararg)
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
execl(binary.c_str(), binary.c_str(), _username.c_str(), static_cast<char*>(nullptr));

irods::experimental::log::authentication::error("{}: Returning default value [SYS_FORK_ERROR]", __func__);
THROW(SYS_FORK_ERROR, fmt::format("execl failed [errno:{}]", errno));
Expand Down

0 comments on commit ad3f140

Please sign in to comment.