[sudo-commits] sudo changeset 13664:0a789516622b

Todd C. Miller Todd.Miller at sudo.ws
Sat Nov 20 08:04:59 MST 2021


changeset:	13664:0a789516622b in /raid/repos/sudo
details:	https://www.sudo.ws/repos/sudo/rev/0a789516622b
user:		Todd C. Miller <Todd.Miller at sudo.ws>
date:		Sat Nov 20 08:01:37 2021 -0700

Log Message:
	Add reference counting to Defaults bindings.
	Previously, we checked that the previous entry's binding pointer
	was not the same while freeing.  However, to be able to merge
	Defaults records we cannot rely on Defaults entries with the same
	binding being immediately adjacent.  This removes the prev_binding
	checks in favor of a reference count which allows us to plug the
	memory leak in cvtsudoers when merging Defaults.

diffstat:

 plugins/sudoers/alias.c            |  16 +++++-----
 plugins/sudoers/cvtsudoers.c       |  38 ++++++++++++--------------
 plugins/sudoers/cvtsudoers_csv.c   |   6 ++--
 plugins/sudoers/cvtsudoers_json.c  |   6 ++--
 plugins/sudoers/cvtsudoers_merge.c |  54 +++++++++++++++++++-------------------
 plugins/sudoers/defaults.c         |   8 ++--
 plugins/sudoers/fmtsudoers_cvt.c   |   4 +-
 plugins/sudoers/gram.c             |  42 ++++++++++++++++++-----------
 plugins/sudoers/gram.y             |  42 ++++++++++++++++++-----------
 plugins/sudoers/parse.c            |  10 +++---
 plugins/sudoers/parse.h            |   9 ++++-
 plugins/sudoers/parse_ldif.c       |   3 +-
 12 files changed, 131 insertions(+), 107 deletions(-)



More information about the sudo-commits mailing list