]> git.ipfire.org Git - thirdparty/shadow.git/commit
Plug econf memory leaks
authorTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 18 May 2023 15:25:35 +0000 (17:25 +0200)
committerSerge Hallyn <serge@hallyn.com>
Fri, 19 May 2023 13:02:24 +0000 (08:02 -0500)
commit8175b1532e4bb1951264e8a6ee5f484137e5306c
tree47bb08a4ff9493905685efecefd299a72394443c
parent7321ceaf69a7028a04056e548d861b291634c2d0
Plug econf memory leaks

You can see the memory leaks with address sanitizer if shadow is
compiled with `--enable-vendordir=/usr/etc`.

How to reproduce:

1. Prepare a custom shell file as root
```
mkdir -p /etc/shells.d
echo /bin/myshell > /etc/shells.d/custom
```

2. Run chsh as regular user
```
chsh
```

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
lib/getdef.c
src/chsh.c