Re: [patch] fix segfault when using 'userdel -r' and homedir is /dev/null
Tomasz Kłoczko <[email protected]> Mon, 10 Jul 2006 06:36:43 +0200 (CEST)
| Newsgroups | gmane.linux.pld.shadow.general |
|---|---|
| Message-ID | <[email protected]> |
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-671819631-1152506203=:10018 Content-Type: TEXT/PLAIN; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8BIT On Tue, 4 Jul 2006, Mike Frysinger wrote: > when userdel is called with -r, the function remove_dir() is called on the > user's homedir ... well if the user's homedir is /dev/null, the code > segfaults > > this is because remove_dir() calls opendir() on the homedir but never checks > the return value ... so it continues on to calling readdir(NULL) and then > promptly segfaults > > patch attached to address the issue ... Gentoo bug report in case anyone cares > is at http://bugs.gentoo.org/139148 Looks like usermod also is affected by this bug. Committed. Thank you. kloczek -- ----------------------------------------------------------- *Ludzie nie maj± problemów, tylko sobie sami je stwarzaj±* ----------------------------------------------------------- Tomasz K³oczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]* --0-671819631-1152506203=:10018 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline