summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Untz <vuntz@gnome.org>2012-04-18 08:57:11 +0200
committerRay Strode <rstrode@redhat.com>2012-04-24 07:06:55 -0400
commit046998a3a5305f381e6e39bc4bf7f69f260856f4 (patch)
tree2fd3881fa7273efafc97d6434de88ae101953e85
parent52544a619102ca9f7ea4ef633271dc935f5d47fd (diff)
daemon: Exclude users with no shell
The NIS entry in /etc/passwd seems to be: +:::::: We obviously don't want a user with no shell to be visible, so use this more generic solution. https://bugs.freedesktop.org/show_bug.cgi?id=48859
-rw-r--r--src/daemon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/daemon.c b/src/daemon.c
index 72d6f16..deeb216 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -163,8 +163,8 @@ daemon_local_user_is_excluded (Daemon *daemon, const gchar *username, const gcha
char *basename, *nologin_basename, *false_basename;
int ret;
- if (shell == NULL) {
- return FALSE;
+ if (shell == NULL || shell[0] == '\0') {
+ return TRUE;
}
ret = FALSE;