--- amp-0.7.6.orig/audio.c +++ amp-0.7.6/audio.c @@ -46,6 +46,8 @@ typedef int bool; #endif +int rt = 0; + void statusDisplay(struct AUDIO_HEADER *header, int frameNo) { int minutes,seconds; @@ -72,18 +74,20 @@ uid_t my_uid = getuid(); #ifdef LINUX_REALTIME - set_realtime_priority(); - - setreuid(my_uid, my_uid); + if (rt) { + set_realtime_priority(); - prefetch_initial_fill(); + setreuid(my_uid, my_uid); + + prefetch_initial_fill(); + } #endif /* LINUX_REALTIME */ initialise_globals(); -#ifndef LINUX_REALTIME + //#ifndef LINUX_REALTIME if (A_FORMAT_WAVE) wav_begin(); -#endif /* LINUX_REALTIME */ + //#endif /* LINUX_REALTIME */ if ((g=gethdr(&header))!=0) { report_header_error(g); @@ -93,10 +97,17 @@ if (header.protection_bit==0) getcrc(); #ifdef LINUX_REALTIME - if (setup_fancy_audio(&header)!=0) { - warn("Cannot set up direct-to-DMA audio. Exiting\n"); - return -1; + if (rt) { + if (setup_fancy_audio(&header)!=0) { + warn("Cannot set up direct-to-DMA audio. Exiting\n"); + return -1; + } } + else + if (setup_audio(&header)!=0) { + warn("Cannot set up audio. Exiting\n"); + return -1; + } #else if (setup_audio(&header)!=0) { warn("Cannot set up audio. Exiting\n"); @@ -119,9 +130,11 @@ } #ifdef LINUX_REALTIME - if (start_fancy_audio(&header)!=0) { - warn("Cannot start direct-to-DMA audio. Exiting\n"); - return -1; + if (rt) { + if (start_fancy_audio(&header)!=0) { + warn("Cannot start direct-to-DMA audio. Exiting\n"); + return -1; + } } #endif /* LINUX_REALTIME */ @@ -136,7 +149,12 @@ if ((g=gethdr(&header))!=0) { report_header_error(g); #ifdef LINUX_REALTIME - cleanup_fancy_audio(); + if (rt) { + cleanup_fancy_audio(); + } + else { + if (g==GETHDR_EOF && A_FORMAT_WAVE) wav_end(&header); + } #else if (g==GETHDR_EOF && A_FORMAT_WAVE) wav_end(&header); #endif /* LINUX_REALTIME */ @@ -161,16 +179,20 @@ cnt++; } #ifdef LINUX_REALTIME - if (block_fancy_audio(snd_eof)!=0) { - warn("Problems with direct-to-DMA audio\n"); - return -1; + if (rt) { + if (block_fancy_audio(snd_eof)!=0) { + warn("Problems with direct-to-DMA audio\n"); + return -1; + } } #endif } #ifdef LINUX_REALTIME - if (stop_fancy_audio()!=0) { - warn("Cannot stop direct-to-DMA audio. Exiting\n"); - return -1; + if (rt) { + if (stop_fancy_audio()!=0) { + warn("Cannot stop direct-to-DMA audio. Exiting\n"); + return -1; + } } #endif return 0; @@ -179,6 +201,7 @@ int main(int argc,char **argv) { int argPos; +struct stat st; argPos=args(argc,argv); /* process command line arguments */ @@ -194,11 +217,27 @@ if (argPos, Sun Jun 13 01:19:41 MDT 1999 + + --- amp-0.7.6.orig/debian/changelog +++ amp-0.7.6/debian/changelog @@ -0,0 +1,57 @@ +amp (0.7.6-7) frozen unstable; urgency=low + + * Do not install with setuid root. (closes: #62519) + + -- Fredrik Hallenberg Mon, 17 Apr 2000 09:43:32 +0200 + +amp (0.7.6-6) unstable; urgency=low + + * Forgot to change maintainer in control. + * Updated standards version to 3.0.0. + + -- Fredrik Hallenberg Sun, 17 Oct 1999 01:15:45 +0200 + +amp (0.7.6-5) unstable; urgency=low + + * New maintainer. + * Use dh_suidregister. + * Fixed realtime stuff so it is only used when playing regular files. + (closes: #41900, #44493) + + -- Fredrik Hallenberg Sat, 16 Oct 1999 12:00:57 +0200 + +amp (0.7.6-4) unstable; urgency=low + + * Now /really/ runs suid root :) + * Removed deprecated dh_du from debian/rules + + -- Ed Boraas Mon, 14 Jun 1999 23:55:40 -0600 + + +amp (0.7.6-3) unstable; urgency=low + + * Fixed upstream realtime support bug in rtbuf.c and compiled + with realtime support enabled. (Closes: #25346) + * amp now runs suid root (required for realtime support). + * All non-wishlist bugs are now fixed. + + -- Ed Boraas Mon, 14 Jun 1999 11:31:04 -0600 + + +amp (0.7.6-2) unstable; urgency=low + + * New maintainer. + + -- Ed Boraas Sun, 13 Jun 1999 01:19:11 -0600 + + +amp (0.7.6-1) unstable; urgency=low + + * Initial release. + + -- Ben Gertzfield Sun, 25 Jan 1998 01:50:28 -0800 + +Local variables: +mode: debian-changelog +add-log-mailing-address: "hallon@debian.org" +End: --- amp-0.7.6.orig/debian/control +++ amp-0.7.6/debian/control @@ -0,0 +1,14 @@ +Source: amp +Priority: optional +Section: non-free/sound +Maintainer: Fredrik Hallenberg +Standards-Version: 3.0.0 + +Package: amp +Architecture: any +Section: non-free/sound +Depends: ${shlibs:Depends} +Description: The Audio MPEG Player + amp is an MPEG audio file player. + . + amp can play MPEG1 or MPEG2 files, layers 2 and 3. --- amp-0.7.6.orig/debian/copyright +++ amp-0.7.6/debian/copyright @@ -0,0 +1,31 @@ +This package was Debianized by Ed Boraas + +It was downloaded from ftp://ftp.rasip.fer.hr/pub/mpeg/ + +Copyright: + +This software can be used freely for any purpose. It can be distributed +freely, as long as it is not sold commercially without permission from +Tomislav Uzelac . However, including this software +on CD_ROMs containing other free software is explicitly permitted even +when a modest distribution fee is charged for the CD, as long as this +software is not a primary selling argument for the CD. + +Building derived versions of this software is permitted, as long as they +are not sold commercially without permission from Tomislav Uzelac +. Any derived versions must be clearly marked as +such, and must be called by a name other than amp. Any derived versions +must retain this copyright notice. + +/* This license is itself copied from Tatu Ylonen's ssh package. It does + * not mention being copyrighted itself :) + */ + +THERE IS NO WARRANTY FOR THIS PROGRAM - whatsoever. You use it entirely +at your risk, and neither Tomislav Uzelac, nor FER will be liable for +any damages that might occur to your computer, software, etc. in +consequence of you using this freeware program. + + +Tomislav Uzelac + --- amp-0.7.6.orig/debian/rules +++ amp-0.7.6/debian/rules @@ -0,0 +1,58 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build: build-stamp +build-stamp: + dh_testdir + + ./configure --prefix=/usr --enable-realtime + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + -$(MAKE) distclean + + dh_clean + +# Build architecture-independent files here. +binary-indep: build +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build amp + +amp: build + dh_testdir + dh_testroot + dh_clean + dh_installdirs usr/bin usr/share/man/man1 + # Add here commands to install the files into debian/tmp + cp amp debian/tmp/usr/bin + cp amp.1 debian/tmp/usr/share/man/man1 + dh_installdocs README + dh_installchangelogs + dh_strip + dh_compress + dh_fixperms +# chmod u+s debian/tmp/usr/bin/amp +# dh_suidregister + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_makeshlibs + dh_md5sums + dh_builddeb + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary