Date: Tue, 27 Dec 2011 23:35:10 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r228922 - head/lib/libc/gen Message-ID: <201112272335.pBRNZA6Q073600@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Tue Dec 27 23:35:10 2011 New Revision: 228922 URL: http://svn.freebsd.org/changeset/base/228922 Log: libc: Eliminate some relative relocations in getusershell(). Modified: head/lib/libc/gen/getusershell.c Modified: head/lib/libc/gen/getusershell.c ============================================================================== --- head/lib/libc/gen/getusershell.c Tue Dec 27 23:28:01 2011 (r228921) +++ head/lib/libc/gen/getusershell.c Tue Dec 27 23:35:10 2011 (r228922) @@ -58,12 +58,6 @@ __FBSDID("$FreeBSD$"); #endif #include "un-namespace.h" -/* - * Local shells should NOT be added here. They should be added in - * /etc/shells. - */ - -static const char *const okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL }; static const char *const *curshell; static StringList *sl; @@ -261,8 +255,13 @@ initshells() != NS_SUCCESS) { if (sl) sl_free(sl, 1); - sl = NULL; - return (okshells); + sl = sl_init(); + /* + * Local shells should NOT be added here. They should be + * added in /etc/shells. + */ + sl_add(sl, strdup(_PATH_BSHELL)); + sl_add(sl, strdup(_PATH_CSHELL)); } sl_add(sl, NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112272335.pBRNZA6Q073600>