Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 168205

Summary: app-misc/beep-1.2.2-nosuid.patch: minor problems
Product: Gentoo Linux Reporter: Martin von Gagern <Martin.vGagern>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: trivial    
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
URL: http://dev.gentoo.org/~solar/patch_overlay/app-misc/beep/beep-1.2.2-nosuid.patch
Whiteboard:
Package list:
Runtime testing required: ---

Description Martin von Gagern 2007-02-24 01:52:19 UTC
The patch beep-1.2.2-nosuid.patch which is applied for app-misc/beep-1.2.2-r1 has two problems:

  close(console_fd); does not check console_fd is valid.
This causes close to result in EBADF for users without access to /dev/console. Should be no problem, but it's the same situation as with the ioctl for stopping the beep. In both cases the call will fail with EBADF if executed, unchecked, and in both cases a check before the execution is cleaner. The stop ioctl does check, so I believe close should be preceded by an "if (console_fd >= 0)" as well.

  bell printed to stdout, not stderr.
This can cause problems in scripts that use bell, expecting no sideeffects, and redirecting their standard output. Or put differently, using stderr instead would allow the fallback to work even when stdout is redirected. The upstream release has the same problem here, I'll report this upstream as well.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-02-24 08:50:15 UTC
Really don't need two bugs for the same thing.


*** This bug has been marked as a duplicate of bug 168201 ***