Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 168205 - app-misc/beep-1.2.2-nosuid.patch: minor problems
Summary: app-misc/beep-1.2.2-nosuid.patch: minor problems
Status: RESOLVED DUPLICATE of bug 168201
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Linux bug wranglers
URL: http://dev.gentoo.org/~solar/patch_ov...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-24 01:52 UTC by Martin von Gagern
Modified: 2007-02-24 08:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***