From: Alan Jenkins Date: Tue, 6 Mar 2018 16:16:00 +0000 (+0000) Subject: login: we only allow opening character devices X-Git-Tag: v239~555^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b983cc74a85bda4d662fd822b433327fc568d40;p=thirdparty%2Fsystemd.git login: we only allow opening character devices We already don't allow directly opening block devices attached to the seat. They are handled by udisks instead. Clarify the code used when restarting logind. --- diff --git a/src/login/logind.c b/src/login/logind.c index 5220861c1d3..373e43e1f79 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -453,8 +453,8 @@ static int manager_attach_fds(Manager *m) { continue; } - if (!S_ISCHR(st.st_mode) && !S_ISBLK(st.st_mode)) { - log_debug("Device fd doesn't actually point to device node: %m"); + if (!S_ISCHR(st.st_mode)) { + log_debug("Device fd doesn't point to a character device node"); close_nointr(fd); continue; }