diff --git a/CREDITS b/CREDITS index a560f9e..7dd4356 100644 --- a/CREDITS +++ b/CREDITS @@ -45,6 +45,7 @@ ideas: Mikko Työläjärvi Nick Hibma Patrick Bihan-Faou + Robert Morris Robert Watson Ruslan Ermilov Sebastian Krahmer diff --git a/HISTORY b/HISTORY index 234604e..ac30f4c 100644 --- a/HISTORY +++ b/HISTORY @@ -2,6 +2,9 @@ OpenPAM ??? 2020-07-?? - BUGFIX: Fix race condition in openpam_ttyconv(3) when used with expect scripts. + + - BUGFIX: In openpam_set_option(3), when removing an option, properly + decrement the option count. ============================================================================ OpenPAM Tabebuia 2019-02-24 diff --git a/LICENSE b/LICENSE index 879b34b..8c7e425 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Copyright (c) 2002-2003 Networks Associates Technology, Inc. -Copyright (c) 2004-2019 Dag-Erling Smørgrav +Copyright (c) 2004-2023 Dag-Erling Smørgrav All rights reserved. This software was developed for the FreeBSD Project by ThinkSec AS and diff --git a/lib/libpam/openpam_set_option.c b/lib/libpam/openpam_set_option.c index 1aa5585..4d84771 100644 --- a/lib/libpam/openpam_set_option.c +++ b/lib/libpam/openpam_set_option.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. - * Copyright (c) 2004-2011 Dag-Erling Smørgrav + * Copyright (c) 2004-2023 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -83,6 +83,7 @@ openpam_set_option(pam_handle_t *pamh, for (free(cur->optv[i]); i < cur->optc; ++i) cur->optv[i] = cur->optv[i + 1]; cur->optv[i] = NULL; + --cur->optc; RETURNC(PAM_SUCCESS); } if (asprintf(&opt, "%.*s=%s", (int)len, option, value) < 0)