@@ -607,27 +607,6 @@ int vt_disallocate(const char *name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void warn_melody(void) {
|
||||
_cleanup_close_ int fd = -1;
|
||||
|
||||
fd = open("/dev/console", O_WRONLY|O_CLOEXEC|O_NOCTTY);
|
||||
if (fd < 0)
|
||||
return;
|
||||
|
||||
/* Yeah, this is synchronous. Kinda sucks. But well... */
|
||||
|
||||
(void) ioctl(fd, KIOCSOUND, (int)(1193180/440));
|
||||
usleep(125*USEC_PER_MSEC);
|
||||
|
||||
(void) ioctl(fd, KIOCSOUND, (int)(1193180/220));
|
||||
usleep(125*USEC_PER_MSEC);
|
||||
|
||||
(void) ioctl(fd, KIOCSOUND, (int)(1193180/220));
|
||||
usleep(125*USEC_PER_MSEC);
|
||||
|
||||
(void) ioctl(fd, KIOCSOUND, 0);
|
||||
}
|
||||
|
||||
int make_console_stdio(void) {
|
||||
int fd, r;
|
||||
|
||||
|
||||
@@ -67,8 +67,6 @@ bool tty_is_console(const char *tty) _pure_;
|
||||
int vtnr_from_tty(const char *tty);
|
||||
const char *default_term_for_tty(const char *tty);
|
||||
|
||||
void warn_melody(void);
|
||||
|
||||
int make_stdio(int fd);
|
||||
int make_null_stdio(void);
|
||||
int make_console_stdio(void);
|
||||
|
||||
@@ -147,7 +147,6 @@ int manager_handle_action(
|
||||
offending->uid, strna(u),
|
||||
offending->pid, strna(comm));
|
||||
|
||||
warn_melody();
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user