diff options
author | Tom Martin <slarti@gentoo.org> | 2005-08-03 22:57:06 +0000 |
---|---|---|
committer | Tom Martin <slarti@gentoo.org> | 2005-08-03 22:57:06 +0000 |
commit | f73169190ef654e549e427ea7ffa1da692743815 (patch) | |
tree | 0f235c2e6e464bf5e2cce4408c67415f6942cfdc /app-misc/beep/files | |
parent | Version bump. (diff) | |
download | gentoo-2-f73169190ef654e549e427ea7ffa1da692743815.tar.gz gentoo-2-f73169190ef654e549e427ea7ffa1da692743815.tar.bz2 gentoo-2-f73169190ef654e549e427ea7ffa1da692743815.zip |
Add in a nosuid patch from solar in a revbump.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'app-misc/beep/files')
-rw-r--r-- | app-misc/beep/files/beep-1.2.2-nosuid.patch | 33 | ||||
-rw-r--r-- | app-misc/beep/files/digest-beep-1.2.2-r1 | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/app-misc/beep/files/beep-1.2.2-nosuid.patch b/app-misc/beep/files/beep-1.2.2-nosuid.patch new file mode 100644 index 000000000000..33e6affa9ffb --- /dev/null +++ b/app-misc/beep/files/beep-1.2.2-nosuid.patch @@ -0,0 +1,33 @@ +--- beep.c.orig 2005-07-23 13:37:01.000000000 -0400 ++++ beep.c 2005-07-23 14:00:55.000000000 -0400 +@@ -218,22 +218,20 @@ + int i; /* loop counter */ + + /* try to snag the console */ +- if((console_fd = open("/dev/console", O_WRONLY)) == -1) { +- fprintf(stderr, "Could not open /dev/console for writing.\n"); +- printf("\a"); /* Output the only beep we can, in an effort to fall back on usefulness */ +- perror("open"); +- exit(1); +- } ++ console_fd = open("/dev/console", O_WRONLY); + + /* Beep */ + for (i = 0; i < parms.reps; i++) { /* start beep */ +- if(ioctl(console_fd, KIOCSOUND, (int)(CLOCK_TICK_RATE/parms.freq)) < 0) { +- printf("\a"); /* Output the only beep we can, in an effort to fall back on usefulness */ +- perror("ioctl"); ++ if (console_fd >= 0) { ++ ioctl(console_fd, KIOCSOUND, (int)(CLOCK_TICK_RATE/parms.freq)); ++ } else { ++ printf("\a"); /* Output the fall back for usefulness we don't have to be suid to work at all */ ++ fflush(stdout); + } + /* Look ma, I'm not ansi C compatible! */ + usleep(1000*parms.length); /* wait... */ +- ioctl(console_fd, KIOCSOUND, 0); /* stop beep */ ++ if (console_fd >= 0) ++ ioctl(console_fd, KIOCSOUND, 0); /* stop beep */ + if(parms.end_delay || (i+1 < parms.reps)) + usleep(1000*parms.delay); /* wait... */ + } /* repeat. */ diff --git a/app-misc/beep/files/digest-beep-1.2.2-r1 b/app-misc/beep/files/digest-beep-1.2.2-r1 new file mode 100644 index 000000000000..914c0afe4b54 --- /dev/null +++ b/app-misc/beep/files/digest-beep-1.2.2-r1 @@ -0,0 +1 @@ +MD5 d541419fd7e5642952d7b48cbb40c712 beep-1.2.2.tar.gz 18460 |