install :
cp ${EXEC_NAME} ${INSTALL_DIR}
- rm -f /usr/man/man1/beep.1.bz2
+ # rm -f /usr/man/man1/beep.1.bz2
cp ${MAN_FILE} ${MAN_DIR}
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");
+ if((console_fd = open("/dev/tty0", O_WRONLY)) == -1) {
+ fprintf(stderr, "Could not open /dev/tty0 for writing.\n");
printf("\a"); /* Output the only beep we can, in an effort to fall back on usefulness */
perror("open");
exit(1);
--- /dev/null
+beep for Debian
+---------------
+
+The code is quite short so it should be clear that it's not exploitable.
+I therefore think that "suid root with only group audio executeable" is an
+acceptable default - you are of course able to change it anytime with
+dpkg-reconfigure beep
+
+ -- Gerfried Fuchs <alfie@debian.org>, Wed, 27 Feb 2002 12:48:26 +0100
--- /dev/null
+beep (1.2.2-2.woody1) woody-proposed-updates; urgency=medium
+
+ * Installed the postrm script into the binary package (similar to #144946).
+ No other changes where made, just installing the postrm script into the
+ binary package.
+
+ -- Gerfried Fuchs <alfie@debian.org> Mon, 8 Jul 2002 12:33:12 +0200
+
+beep (1.2.2-2) unstable; urgency=medium
+
+ * Open /dev/tty0 instead of /dev/console (closes: #134015)
+
+ -- Gerfried Fuchs <alfie@debian.org> Tue, 23 Apr 2002 17:33:29 +0200
+
+beep (1.2.2-1) unstable; urgency=low
+
+ * New upstream release
+ * printf("\a") now if it can't open /dev/console (closes: #134466)
+ * Put a sane paragraph into the copyright file, not only the location of the
+ GPL on Debian Systems.
+
+ -- Gerfried Fuchs <alfie@debian.org> Tue, 02 Apr 2002 08:21:36 +0200
+
+beep (1.2.1-5) unstable; urgency=low
+
+ * Updated watchfile to uscan version=2.
+
+ -- Gerfried Fuchs <alfie@debian.org> Mon, 18 Mar 2002 11:30:31 +0100
+
+beep (1.2.1-4) unstable; urgency=medium
+
+ * Added russion templates file -- thanks to Ilgiz Kalmetev (closes: #137619)
+ * changed from char to int to make it work on systems where char is unsigned
+ -- thanks to Daniel Eisenbud (closes: #136281) --> urgency reason
+
+ -- Gerfried Fuchs <alfie@debian.org> Mon, 11 Mar 2002 12:52:08 +0100
+
+beep (1.2.1-3) unstable; urgency=low
+
+ * Rewrote the templates file with hints from JoeyH, dancer and Francesco --
+ thanks, dudes (closes: #135866, #134811)
+ * Cleaned up rules file a little bit.
+
+ -- Gerfried Fuchs <alfie@debian.org> Wed, 27 Feb 2002 12:47:54 +0100
+
+beep (1.2.1-2) unstable; urgency=low
+
+ * Un-debhepler-ized rules file.
+
+ -- Gerfried Fuchs <alfie@debian.org> Wed, 13 Feb 2002 13:15:33 +0100
+
+beep (1.2.1-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Gerfried Fuchs <alfie@debian.org> Fri, 08 Feb 2002 12:38:28 +0100
--- /dev/null
+#!/bin/sh -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+# how to suid the beep program
+db_input medium beep/suid_option || true
+db_go
+
+exit 0
--- /dev/null
+Source: beep
+Section: sound
+Priority: optional
+Maintainer: Gerfried Fuchs <alfie@debian.org>
+Standards-Version: 3.5.6
+
+Package: beep
+Architecture: any
+Depends: ${shlibs:Depends}, debconf
+Description: Advanced pc-speaker beeper
+ beep does what you'd expect: it beeps. But unlike printf "\a" beep allows
+ you to control pitch, duration, and repetitions. Its job is to live inside
+ shell/perl scripts and allow more granularity than one has otherwise. It is
+ controlled completely through command line options. It's not supposed to be
+ complex, and it isn't - but it makes system monitoring (or whatever else it
+ gets hacked into) much more informative.
--- /dev/null
+This package was debianized by Gerfried Fuchs <alfie@debian.org> on
+Thu, 18 Oct 2001 09:26:50 +0200.
+
+It was downloaded from http://www.johnath.com/beep/
+
+Upstream Author: Johnathan Nightingale <johnath@johnath.com>
+
+Copyright:
+==========
+This software is copyright (C) 2000 by Johnathan Nightingale.
+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 dated June, 1991.
+
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this package; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
--- /dev/null
+#!/bin/sh -e
+
+action="$1"
+
+# Source debconf library.
+if [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+
+if [ "$action" != configure ]; then
+ exit 0
+fi
+
+if [ -d /usr/doc -a ! -e /usr/doc/beep -a -d /usr/share/doc/beep ]; then
+ ln -sf ../share/doc/beep /usr/doc/beep
+fi
+
+suid=false
+if [ -e /usr/share/debconf/confmodule ]; then
+ db_get beep/suid_option
+ suid="$RET"
+fi
+
+# repair typo in option (see #135866)
+if [ "$suid" = "suid root with only group audio executeable" ] ; then
+ db_set beep/suid_option "suid root with only group audio executable"
+ suid="suid root with only group audio executable"
+fi
+
+if [ -x /usr/sbin/dpkg-statoverride ] ; then
+ if ! dpkg-statoverride --list /usr/bin/beep >/dev/null ; then
+ if [ "$suid" = "suid root for all" ] ; then
+ chmod 4755 /usr/bin/beep
+ elif [ "$suid" = "suid root with only group audio executable" ] ; then
+ chmod 4754 /usr/bin/beep
+ elif [ "$suid" = "not suid at all" ] ; then
+ chmod 0755 /usr/bin/beep
+ fi
+ fi
+else
+ if [ "$suid" = "suid root for all" ] ; then
+ chmod 4755 /usr/bin/beep
+ elif [ "$suid" = "suid root with only group audio executable" ] ; then
+ chmod 4754 /usr/bin/beep
+ elif [ "$suid" = "not suid at all" ] ; then
+ chmod 0755 /usr/bin/beep
+ fi
+fi
--- /dev/null
+#!/bin/sh
+set -e
+if [ "$1" = purge -a -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ db_purge
+fi
--- /dev/null
+#!/bin/sh
+set -e
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/beep ]; then
+ rm -f /usr/doc/beep
+fi
--- /dev/null
+#!/usr/bin/make -f
+
+clean:
+ $(checkdir)
+ $(checkroot)
+ -rm -rf debian/beep debian/substvars debian/files build-stamp
+ -$(MAKE) clean
+
+
+build: build-stamp
+build-stamp:
+ $(checkdir)
+ $(MAKE)
+ touch build-stamp
+
+
+install: build
+ $(checkdir)
+ $(checkroot)
+ -rm -rf debian/beep debian/substvars
+ mkdir -m755 debian/beep
+ cd debian/beep && mkdir -m755 -p usr/bin usr/share/man/man1 \
+ usr/share/doc/beep
+ $(MAKE) install INSTALL_DIR=$(CURDIR)/debian/beep/usr/bin \
+ MAN_DIR=$(CURDIR)/debian/beep/usr/share/man/man1
+ strip --remove-section=.comment --remove-section=.note \
+ debian/beep/usr/bin/beep
+ chown root.audio debian/beep/usr/bin/beep
+ install -m644 -p CREDITS README debian/beep/usr/share/doc/beep
+ install -m644 -p CHANGELOG debian/beep/usr/share/doc/beep/changelog
+ gzip -9 debian/beep/usr/share/doc/beep/changelog \
+ debian/beep/usr/share/doc/beep/README
+
+
+binary-arch: build install
+ $(checkdir)
+ $(checkroot)
+ mkdir -m755 debian/beep/DEBIAN
+ install -m644 -p debian/README.Debian debian/copyright \
+ debian/beep/usr/share/doc/beep
+ install -m644 -p debian/changelog \
+ debian/beep/usr/share/doc/beep/changelog.Debian
+ gzip -9 debian/beep/usr/share/doc/beep/changelog.Debian
+ install -m755 -p debian/postinst debian/prerm debian/postrm \
+ debian/config debian/beep/DEBIAN
+ install -m644 -p debian/templates debian/beep/DEBIAN
+ dpkg-shlibdeps -Tdebian/substvars -dDepends debian/beep/usr/bin/beep
+ dpkg-gencontrol -ldebian/changelog -isp -Tdebian/substvars -pbeep \
+ -Pdebian/beep
+ cd debian/beep && find * -type f ! -regex '^DEBIAN/.*' -print0 | \
+ xargs -r0 md5sum > DEBIAN/md5sums
+ dpkg --build debian/beep ..
+
+
+define checkdir
+ test -f debian/rules
+endef
+
+define checkroot
+ test root = "`whoami`"
+endef
+
+binary: binary-arch
+.PHONY: clean build install binary-arch binary
--- /dev/null
+Template: beep/suid_option
+Type: select
+Choices: suid root for all, suid root with only group audio executable, not suid at all
+Default: suid root with only group audio executable
+Description: How to handle suid root for beep program?
+ beep must be run as root since it needs to access the speaker hardware.
+ There are several posibilities to make the program usable: Either only
+ for root (no suid bit at all), executable only by users of the group
+ audio, or usable for all.
+ .
+ Any program that is suid root is a potential security risk so this is not
+ the default. Because each program that is suid root is security risk this
+ is not done by default. However, the program is quite small (~150 lines
+ of code) and is fairly easy to verify the safety of the code yourself, if
+ you don't trust my judgement.
--- /dev/null
+Template: beep/suid_option
+Type: select
+Choices: suid root for all, suid root with only group audio executable, not suid at all
+Choices-de: suid root für alle, suid root nur für Gruppe audio ausführbar, nicht suid gesetzt
+Default: suid root with only group audio executable
+Description: How to handle suid root for beep program?
+ beep must be run as root since it needs to access the speaker hardware.
+ There are several posibilities to make the program usable: Either only
+ for root (no suid bit at all), executable only by users of the group
+ audio, or usable for all.
+ .
+ Any program that is suid root is a potential security risk so this is not
+ the default. Because each program that is suid root is security risk this
+ is not done by default. However, the program is quite small (~150 lines
+ of code) and is fairly easy to verify the safety of the code yourself, if
+ you don't trust my judgement.
+Description-de: Wie soll beep suid root gesetzt werden?
+ beep muss als root ausgeführt werden, da es auf den Lautsprecher
+ zugreifen muss. Es gibt mehrere Möglichkeiten, das Programm benutzbar zu
+ machen: Entweder nur für root (gar kein suid), benutzbar von den
+ Mitgliedern der Gruppe audio, oder für alle benutzbar.
+ .
+ Jedes Programm, dass suid root gesetzt ist, ist ein potentielles
+ Sicherheitsproblem und daher wird es auch nicht automatisch durchgeführt.
+ Jeoch ist das Programm recht kurz (~150 Zeilen Code) und kann von Ihnen
+ recht leicht geprüft werden, falls Sie meiner Einschätzung nicht
+ vertrauen.
--- /dev/null
+Template: beep/suid_option
+Type: select
+Choices: suid root for all, suid root with only group audio executable, not suid at all
+Default: suid root with only group audio executable
+Description: How to handle suid root for beep program?
+ beep must be run as root since it needs to access the speaker hardware.
+ There are several posibilities to make the program usable: Either only
+ for root (no suid bit at all), executable only by users of the group
+ audio, or usable for all.
+ .
+ Any program that is suid root is a potential security risk so this is not
+ the default. Because each program that is suid root is security risk this
+ is not done by default. However, the program is quite small (~150 lines
+ of code) and is fairly easy to verify the safety of the code yourself, if
+ you don't trust my judgement.
+Choices-ru: suid root ÄÌÑ ×ÓÅÈ, suid root ÔÏÌØËÏ ÄÌÑ ÇÒÕÐÐÙ audio, ÎÅ ÓÔÁ×ÉÔØ suid ×ÏÏÂÝÅ
+Default-ru: suid root ÔÏÌØËÏ ÄÌÑ "Ú×ÕËÏ×ÏÊ" ÇÒÕÐÐÙ
+Description-ru: ëÁË ÏÂÒÁÂÏÔÁÔØ suid root ÄÌÑ ÐÒÏÇÒÁÍÍÙ beep?
+ beep ÄÏÌÖÅÎ ÒÁÂÏÔÁÔØ ÏÔ ÉÍÅÎÉ ÐÏÌØÚÏ×ÁÔÅÌÑ root, ÔÁË ËÁË ÅÍÕ ÎÕÖÅÎ
+ ÄÏÓÔÕÐ Ë ÄÉÎÁÍÉËÕ. åÓÔØ ÎÅÓËÏÌØËÏ ×ÏÚÍÏÖÎÏÓÔÅÊ ÉÓÐÏÌØÚÏ×ÁÔØ ÐÒÏÇÒÁÍÍÕ:
+ ÉÌÉ ÔÏÌØËÏ ÄÌÑ root (ÎÅ ÕÓÔÁÎÁ×ÌÉ×ÁÔØ ÂÉÔ suid ÎÉ ÄÌÑ ËÏÇÏ), ÉÌÉ
+ ÓÄÅÌÁÔØ ×ÙÐÏÌÎÉÍÙÍ ÔÏÌØËÏ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÅÊ ÇÒÕÐÐÙ audio, ÉÌÉ
+ ×ÙÐÏÌÎÉÍÙÍ ÄÌÑ ×ÓÅÈ.
+ .
+ ðÒÏÇÒÁÍÍÙ, Õ ËÏÔÏÒÙÈ ÕÓÔÁÎÏ×ÌÅÎ suid root, ÎÅÓÕÔ × ÓÅÂÅ ÕÇÒÏÚÕ
+ ÂÅÚÏÐÁÓÎÏÓÔÉ, ÔÁË ÞÔÏ ÐÏ ÕÍÏÌÞÁÎÉÀ ÜÔÏ ÎÅ ÕÓÔÁÎÁ×ÌÉ×ÁÅÔÓÑ. ïÄÎÁËÏ,
+ ÐÒÏÇÒÁÍÍÁ ÉÓËÌÀÞÉÔÅÌØÎÏ ÍÁÌÁ (~150 ÓÔÒÏË ËÏÄÁ), É ×Ù ×ÅÓØÍÁ ÌÅÇËÏ
+ ÍÏÖÅÔÅ ÐÒÏ×ÅÒÉÔØ ÂÅÚÏÐÁÓÎÏÓÔØ ÄÁÎÎÏÇÏ ËÏÄÁ ÓÁÍÉ, ÅÓÌÉ ÎÅ ÄÏ×ÅÒÑÅÔÅ ÍÎÅ.
+
--- /dev/null
+version=2
+# Site/Directory Pattern Version Script
+http://www.johnath.com/beep/ beep-([\d\.]*)\.tar\.gz debian uupdate