plymouth calls `grantpt()` when setting up the pseudoterminal it uses
for boot logging and console broadcasting. `grantpt()` traditionally
sets up the access permissions and file mode of the created slave
pseudoterminal device node.
That call is unnecessary for two reasons:
1. The kernel automatically sets up the correct permissions at open
time on modern Linux.
2. plymouthd runs as root anyway
Furthermore, it seems like, for some unknown reason, the call may be
interfering with the shutdown process.
This commit drops the call, since it's unnecessary, and potentially
even problematic.
ply_trace (" opened device '/dev/ptmx'");
- ply_trace ("creating pseudoterminal");
- if (grantpt (session->pseudoterminal_master_fd) < 0) {
- ply_save_errno ();
- ply_trace ("could not create psuedoterminal: %m");
- close_pseudoterminal (session);
- ply_restore_errno ();
- return false;
- }
- ply_trace ("done creating pseudoterminal");
-
ply_trace ("unlocking pseudoterminal");
if (unlockpt (session->pseudoterminal_master_fd) < 0) {
ply_save_errno ();