diff --git a/ChangeLog b/ChangeLog index 9ad939a6..c7139c38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-09-18 Nicolas François + + * src/chsh.c: No needto remove lines tarting with '#' from + /etc/shells. This is already done by getusershell() and these + shell would fail the access(X_OK) test. + 2011-09-18 Nicolas François * man/generate_mans.mak: Fix the generation of translated man diff --git a/src/chsh.c b/src/chsh.c index 553fe5c3..a2e8fe7f 100644 --- a/src/chsh.c +++ b/src/chsh.c @@ -2,7 +2,7 @@ * Copyright (c) 1989 - 1994, Julianne Frances Haugh * Copyright (c) 1996 - 2000, Marek Michałkiewicz * Copyright (c) 2001 - 2006, Tomasz Kłoczko - * Copyright (c) 2007 - 2008, Nicolas François + * Copyright (c) 2007 - 2011, Nicolas François * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -161,10 +161,6 @@ static bool shell_is_listed (const char *sh) #ifdef HAVE_GETUSERSHELL setusershell (); while ((cp = getusershell ())) { - if (*cp == '#') { - continue; - } - if (strcmp (cp, sh) == 0) { found = true; break;