summaryrefslogtreecommitdiffstats
path: root/term-utils
diff options
context:
space:
mode:
Diffstat (limited to 'term-utils')
-rw-r--r--term-utils/wall.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/term-utils/wall.c b/term-utils/wall.c
index c606e6347..c3e89bab9 100644
--- a/term-utils/wall.c
+++ b/term-utils/wall.c
@@ -250,10 +250,12 @@ int main(int argc, char **argv)
if (utmpptr->ut_type != USER_PROCESS)
continue;
#endif
- /* Joey Hess reports that use-sessreg in /etc/X11/wdm/
- produces ut_line entries like :0, and a write
- to /dev/:0 fails. */
- if (utmpptr->ut_line[0] == ':')
+ /* Joey Hess reports that use-sessreg in /etc/X11/wdm/ produces
+ * ut_line entries like :0, and a write to /dev/:0 fails.
+ *
+ * It also seems that some login manager may produce empty ut_line.
+ */
+ if (!*utmpptr->ut_line || *utmpptr->ut_line == ':')
continue;
if (group_buf && !is_gr_member(utmpptr->ut_user, group_buf))