]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
login: we only allow opening character devices
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Tue, 6 Mar 2018 16:16:00 +0000 (16:16 +0000)
committerAlan Jenkins <alan.christopher.jenkins@gmail.com>
Thu, 8 Mar 2018 15:03:48 +0000 (15:03 +0000)
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.

src/login/logind.c

index 5220861c1d384b42120289b261076a020cf1ea3c..373e43e1f79bd42212700d8fd0f0b6553b331683 100644 (file)
@@ -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;
                 }