Date: Thu, 14 May 2015 20:14:35 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 192528] pwd_mkdb fails if /etc/shells contains duplicates Message-ID: <bug-192528-8-4STY5SS47o@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-192528-8@https.bugs.freebsd.org/bugzilla/> References: <bug-192528-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192528 --- Comment #3 from tmwalaszek@gmail.com --- Hi, Problem is in function _local_initshells in file lib/libc/gen/getusershell.c Function is reading /etc/shells and put every shell path to line[MAXPATHLEN + 1] It looks like this '/bin/csh\0/usr/local/bin/zsh\0/usr/local/bin/bash', it does not clean this array (and not set pointer at the beggining) on every iteration so if we have many lines in /etc/shells it will overflow. Simple patch is in the attachment. Works for me ;) -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-192528-8-4STY5SS47o>