[sudo-commits] sudo changeset 12887:6a920646d7d1
Todd C. Miller
Todd.Miller at sudo.ws
Wed Feb 3 14:18:29 MST 2021
changeset: 12887:6a920646d7d1 in /raid/repos/sudo
details: https://www.sudo.ws/repos/sudo/rev/6a920646d7d1
user: Todd C. Miller <Todd.Miller at sudo.ws>
date: Wed Feb 03 14:17:37 2021 -0700
Log Message:
Don't free the alias name in alias_add() if the alias already exists.
We need to be able to display it using alias_error().
Only free what we actually allocated in alias_add() on error and
let the caller handle cleanup. Note that we cannot completely fill
in the alias until it is inserted. Otherwise, we will have modified
the file and members parameters even if there was an error.
As a result, we have to remove those from the leak list after
alias_add(), not before.
diffstat:
plugins/sudoers/alias.c | 25 ++++++++++++++++---------
plugins/sudoers/gram.c | 16 ++++++++--------
plugins/sudoers/gram.y | 16 ++++++++--------
3 files changed, 32 insertions(+), 25 deletions(-)
More information about the sudo-commits
mailing list