chiark / gitweb /
disorder
8 years agocgi/actions.c, lib/client*.[ch]: Don't use priv connection to check passwd.
Mark Wooding [Thu, 31 Dec 2015 21:02:28 +0000 (21:02 +0000)]
cgi/actions.c, lib/client*.[ch]: Don't use priv connection to check passwd.

If the CGI runs as the main `jukebox' user, then it can connect using
the special `.../private/socket', and the `find_server' function
arranges to do this if it can and no network address has been assigned
in the configuration.

The server doesn't bother to check passwords from clients on privileged
connections.  The result is that if the CGI program runs as the
`jukebox' user, its attempt to check the end-user's password through the
usual login machinery is stymied, since the library automatically sets
up a privileged connection and then the server ignores the password
entirely.  The end result is that, if you set things up in this way,
anyone can log into the CGI program with any known user and any password
at all, at which point they're given a cookie which can be used in
direct communication with the server.

Fix this as follows.

  * Introduce a new version (in the correct namespace for a change) of
    `find_server' which accepts some flags to guide the choice of server
    addresses.

  * Add a flag for the new `disorder_find_server' function to prevent
    trying the privileged socket.

  * Add a function to the client interface (and a bit of state to the
    client structure) to instruct the connection functions not to use a
    privileged connection even if they can.

  * Get the CGI program to use this new function when logging in with a
    password, so that it will always be checked.

Cookies are checked properly, even from privileged clients, so there's
nothing to fix there.

8 years agoscripts/sedfiles.make, doc/disorder.cgi.8.in: Say where the file is.
Mark Wooding [Thu, 31 Dec 2015 20:52:00 +0000 (20:52 +0000)]
scripts/sedfiles.make, doc/disorder.cgi.8.in: Say where the file is.

The manpage used to say that the Makefile doesn't install the CGI
program anywhere, which hasn't been true for a while.  Remove the old
lies and just say where it was put.

8 years agoconfigure.ac, lib/mem.c: Compatibility with older versions of libgc.
Mark Wooding [Thu, 31 Dec 2015 20:49:02 +0000 (20:49 +0000)]
configure.ac, lib/mem.c: Compatibility with older versions of libgc.

The `GC_get_all_interior_pointers()' function and its friends were
introduced after the libgc in Debian wheezy (which is quite impressive
seeing as they were added in 2009).  Make sure it's there; use the old
now-deprecated variable directly if it isn't.

8 years agoRespond to libgc deprecation warning
Richard Kettlewell [Sat, 24 Oct 2015 09:10:13 +0000 (10:10 +0100)]
Respond to libgc deprecation warning

8 years agoAdd nonnull attribute to a few function args.
Richard Kettlewell [Sun, 13 Sep 2015 11:06:31 +0000 (12:06 +0100)]
Add nonnull attribute to a few function args.

8 years agoTinker with loop bounding to placate GCC 5.2.1
Richard Kettlewell [Sun, 13 Sep 2015 11:06:02 +0000 (12:06 +0100)]
Tinker with loop bounding to placate GCC 5.2.1

9 years agogzip -n in aid of reproducible builds
Richard Kettlewell [Sat, 14 Feb 2015 10:24:45 +0000 (10:24 +0000)]
gzip -n in aid of reproducible builds

9 years agoWarning tidy-up for FreeBSD.
Richard Kettlewell [Sun, 1 Jun 2014 13:04:08 +0000 (14:04 +0100)]
Warning tidy-up for FreeBSD.

- if dlfunc is available use that. Allows -Werror to be re-enabled.
- use modern struct member initializers
- cope with FD_SETSIZE being explicitly unsigned
- remove stray brackets
- remove unused objects
- use %ju to print sig_atomic_t, it might be bigger than int

9 years agoAssign default http/cgi directories
Richard Kettlewell [Fri, 30 May 2014 19:20:23 +0000 (20:20 +0100)]
Assign default http/cgi directories

9 years agoFreeBSD doesn't have IFF_DYNAMIC
Richard Kettlewell [Fri, 30 May 2014 17:41:35 +0000 (18:41 +0100)]
FreeBSD doesn't have IFF_DYNAMIC

9 years agoFreeBSD fixes
Richard Kettlewell [Fri, 30 May 2014 17:39:43 +0000 (18:39 +0100)]
FreeBSD fixes

Update list of libdb versions.
Bodge in -liconv.

9 years agoPlacate gcc -flto
Richard Kettlewell [Sun, 25 May 2014 13:40:10 +0000 (14:40 +0100)]
Placate gcc -flto

I don't think either of these are real bugs, but it keeps the compiler
happy.

10 years agoinit: source lsb init functions
Richard Kettlewell [Mon, 27 Jan 2014 19:54:47 +0000 (19:54 +0000)]
init: source lsb init functions

Placates lintian a bit.

10 years agoSuppress bogus doc-base registration warnings from lintian.
Richard Kettlewell [Sun, 26 Jan 2014 14:26:41 +0000 (14:26 +0000)]
Suppress bogus doc-base registration warnings from lintian.

10 years agoRemove redundant entry from .desktop file
Richard Kettlewell [Sat, 25 Jan 2014 23:25:12 +0000 (23:25 +0000)]
Remove redundant entry from .desktop file

10 years agoEnable hardening flags harder.
Richard Kettlewell [Sat, 18 Jan 2014 19:47:21 +0000 (19:47 +0000)]
Enable hardening flags harder.

Now with a workaround for broken GCC diagnostic.

10 years agodebian: use debian compiler flags
Richard Kettlewell [Tue, 14 Jan 2014 18:51:36 +0000 (18:51 +0000)]
debian: use debian compiler flags

10 years agodebian: don't depend on essential packages
Richard Kettlewell [Tue, 14 Jan 2014 18:51:28 +0000 (18:51 +0000)]
debian: don't depend on essential packages

10 years agodisorder.h: more consistent approach to function attributes
Richard Kettlewell [Sun, 22 Dec 2013 11:17:42 +0000 (11:17 +0000)]
disorder.h: more consistent approach to function attributes

10 years agogitignore
Richard Kettlewell [Sat, 23 Nov 2013 11:21:51 +0000 (11:21 +0000)]
gitignore

10 years agotests: python unbuffered revisited
Richard Kettlewell [Sat, 23 Nov 2013 11:21:45 +0000 (11:21 +0000)]
tests: python unbuffered revisited

10 years agoSet AUTOMAKE_OPTIONS=subdir-objects where necessary.
Richard Kettlewell [Sat, 23 Nov 2013 11:11:38 +0000 (11:11 +0000)]
Set AUTOMAKE_OPTIONS=subdir-objects where necessary.

10 years agoWindows support for command line client
Richard Kettlewell [Sun, 17 Nov 2013 11:38:02 +0000 (11:38 +0000)]
Windows support for command line client

Non-ASCII characters not properly supported.

10 years agoProvide for a network initialization step
Richard Kettlewell [Sun, 17 Nov 2013 11:34:52 +0000 (11:34 +0000)]
Provide for a network initialization step

10 years agotable search: cope without typeof
Richard Kettlewell [Sun, 17 Nov 2013 11:34:18 +0000 (11:34 +0000)]
table search: cope without typeof

10 years agoRemove some redundant includes.
Richard Kettlewell [Sun, 17 Nov 2013 11:33:42 +0000 (11:33 +0000)]
Remove some redundant includes.

10 years agoAdd uint16_t if missing.
Richard Kettlewell [Sun, 17 Nov 2013 11:32:44 +0000 (11:32 +0000)]
Add uint16_t if missing.

10 years agoMove up file inclusion.
Richard Kettlewell [Sun, 17 Nov 2013 11:31:52 +0000 (11:31 +0000)]
Move up file inclusion.

10 years agoUTF-16 support
Richard Kettlewell [Sun, 17 Nov 2013 11:31:33 +0000 (11:31 +0000)]
UTF-16 support

10 years agoSynchronous client now uses socketio sources and sinks instead of stdio
Richard Kettlewell [Sun, 17 Nov 2013 11:25:50 +0000 (11:25 +0000)]
Synchronous client now uses socketio sources and sinks instead of stdio

10 years agoinputline variant which uses a source
Richard Kettlewell [Sun, 17 Nov 2013 11:24:51 +0000 (11:24 +0000)]
inputline variant which uses a source

10 years agoSources, by analogy with sinks
Richard Kettlewell [Sun, 17 Nov 2013 11:22:55 +0000 (11:22 +0000)]
Sources, by analogy with sinks

10 years agosocketio sink
Richard Kettlewell [Sun, 17 Nov 2013 11:22:33 +0000 (11:22 +0000)]
socketio sink

10 years agoMore general error handling for sinks
Richard Kettlewell [Sun, 17 Nov 2013 11:21:47 +0000 (11:21 +0000)]
More general error handling for sinks

10 years agoBuffered socket IO wrappers
Richard Kettlewell [Sun, 17 Nov 2013 11:19:08 +0000 (11:19 +0000)]
Buffered socket IO wrappers

Includes a nod to win32 API.

10 years agoMore error string formatting.
Richard Kettlewell [Sun, 17 Nov 2013 11:01:05 +0000 (11:01 +0000)]
More error string formatting.

10 years agoMore conditional header inclusion.
Richard Kettlewell [Sun, 17 Nov 2013 11:00:41 +0000 (11:00 +0000)]
More conditional header inclusion.

10 years agoTypos.
Richard Kettlewell [Sun, 17 Nov 2013 11:00:21 +0000 (11:00 +0000)]
Typos.

10 years agoCommit version string files.
Richard Kettlewell [Sun, 17 Nov 2013 10:57:23 +0000 (10:57 +0000)]
Commit version string files.

Allows for platforms with a rubbish build system.

10 years agoUse private *printf functions a bit more widely.
Richard Kettlewell [Sun, 17 Nov 2013 10:55:40 +0000 (10:55 +0000)]
Use private *printf functions a bit more widely.

10 years agoC89 friendly declarations
Richard Kettlewell [Sun, 17 Nov 2013 10:52:17 +0000 (10:52 +0000)]
C89 friendly declarations

Again, not a complete sweep.

10 years agolog: more general error message formatting
Richard Kettlewell [Sun, 17 Nov 2013 10:47:42 +0000 (10:47 +0000)]
log: more general error message formatting

10 years agoCope with various header files being missing.
Richard Kettlewell [Sun, 17 Nov 2013 10:36:38 +0000 (10:36 +0000)]
Cope with various header files being missing.

Not a complete sweep - only things that will work on Windows have been
updated.

10 years agodoxygen: remove obsolete config file entries
Richard Kettlewell [Sun, 17 Nov 2013 10:12:17 +0000 (10:12 +0000)]
doxygen: remove obsolete config file entries

10 years agoCHANGES
Richard Kettlewell [Sun, 10 Nov 2013 14:14:50 +0000 (14:14 +0000)]
CHANGES

10 years agouaudio: newer compiler spotted a short memcpy
Richard Kettlewell [Sun, 10 Nov 2013 14:04:01 +0000 (14:04 +0000)]
uaudio: newer compiler spotted a short memcpy

Bah

10 years agoplayrtp: support multiple unicast mode
Richard Kettlewell [Sun, 10 Nov 2013 14:00:16 +0000 (14:00 +0000)]
playrtp: support multiple unicast mode

10 years agoserver: implement multiple-unicast RTP
Richard Kettlewell [Sun, 10 Nov 2013 14:00:02 +0000 (14:00 +0000)]
server: implement multiple-unicast RTP

Updates the protocol definition and implementation and
exposes the uaudio-rtp rtp_mode variable in the config.

10 years agospeaker: new comments to add/remove RTP recipients
Richard Kettlewell [Sun, 10 Nov 2013 13:58:33 +0000 (13:58 +0000)]
speaker: new comments to add/remove RTP recipients

10 years agoclient.c: new disorder_client_af reveals connectivity type
Richard Kettlewell [Sun, 10 Nov 2013 13:57:26 +0000 (13:57 +0000)]
client.c: new disorder_client_af reveals connectivity type

10 years agouaudio: RTP multiple unicast mode
Richard Kettlewell [Sun, 10 Nov 2013 13:56:42 +0000 (13:56 +0000)]
uaudio: RTP multiple unicast mode

10 years agospeaker: protocol structure now has a union for different arg types
Richard Kettlewell [Sun, 10 Nov 2013 13:53:25 +0000 (13:53 +0000)]
speaker: protocol structure now has a union for different arg types

10 years agogitignore
Richard Kettlewell [Sun, 10 Nov 2013 12:33:23 +0000 (12:33 +0000)]
gitignore

10 years agoCHANGES
Richard Kettlewell [Thu, 7 Nov 2013 17:04:55 +0000 (17:04 +0000)]
CHANGES

10 years agouaudio: pulseaudio support
Richard Kettlewell [Thu, 7 Nov 2013 17:03:32 +0000 (17:03 +0000)]
uaudio: pulseaudio support

Playback only, no volume setting.

10 years agodisobedience: menu item to select network playback API
Richard Kettlewell [Thu, 7 Nov 2013 17:02:16 +0000 (17:02 +0000)]
disobedience: menu item to select network playback API

10 years agodisobedience: more sensible naming in menu setup
Richard Kettlewell [Thu, 7 Nov 2013 16:58:02 +0000 (16:58 +0000)]
disobedience: more sensible naming in menu setup

10 years agoplayrtp: --api option instead of a new option for every audio API
Richard Kettlewell [Thu, 7 Nov 2013 16:56:46 +0000 (16:56 +0000)]
playrtp: --api option instead of a new option for every audio API

10 years agouaudio: more sophisticated choice of default playback API
Richard Kettlewell [Thu, 7 Nov 2013 16:53:00 +0000 (16:53 +0000)]
uaudio: more sophisticated choice of default playback API

10 years agoautogen.sh: use /bin/sh
Richard Kettlewell [Sat, 2 Nov 2013 09:43:14 +0000 (09:43 +0000)]
autogen.sh: use /bin/sh

10 years agodoc: correct & move description of raw format players
Richard Kettlewell [Mon, 28 Oct 2013 20:10:00 +0000 (20:10 +0000)]
doc: correct & move description of raw format players

10 years agoRemove now-redundant libao dependency.
Richard Kettlewell [Mon, 28 Oct 2013 19:47:14 +0000 (19:47 +0000)]
Remove now-redundant libao dependency.

10 years agogitignore
Richard Kettlewell [Mon, 28 Oct 2013 19:35:34 +0000 (19:35 +0000)]
gitignore

10 years agodisobedience needs -lm
Richard Kettlewell [Mon, 28 Oct 2013 19:35:04 +0000 (19:35 +0000)]
disobedience needs -lm

Explicit requirement only emerges in recent platform though.

10 years agoInclude version string in background program logs
Richard Kettlewell [Sun, 27 Oct 2013 16:53:59 +0000 (16:53 +0000)]
Include version string in background program logs

10 years agono drag + drop
Richard Kettlewell [Sun, 22 Mar 2009 20:49:01 +0000 (20:49 +0000)]
no drag + drop

10 years agoDisOrder 5.1.1 5.1.1
Richard Kettlewell [Sun, 27 Oct 2013 15:04:09 +0000 (15:04 +0000)]
DisOrder 5.1.1

10 years agodist: wheezy
Richard Kettlewell [Sun, 27 Oct 2013 14:46:21 +0000 (14:46 +0000)]
dist: wheezy

10 years agodebian: always run configure
Richard Kettlewell [Sun, 27 Oct 2013 14:32:37 +0000 (14:32 +0000)]
debian: always run configure

Prevents trouble if configure has been run but with non-Debiany
arguments.

10 years agoautogen: use autoreconf -si
Richard Kettlewell [Sun, 27 Oct 2013 14:30:57 +0000 (14:30 +0000)]
autogen: use autoreconf -si

10 years agoMerge tag 'branchpoint-5.1' into release
Richard Kettlewell [Sun, 17 Feb 2013 16:25:28 +0000 (16:25 +0000)]
Merge tag 'branchpoint-5.1' into release

Branch point for 5.1 release.

Conflicts:
configure.ac
debian/changelog

10 years agoCHANGES: reflect 'recent' bug fixes
Richard Kettlewell [Sun, 27 Oct 2013 14:08:54 +0000 (14:08 +0000)]
CHANGES: reflect 'recent' bug fixes

10 years agodebian/control: db4.8 is obsolete in wheezy.
Mark Wooding [Sat, 25 May 2013 13:18:53 +0000 (14:18 +0100)]
debian/control: db4.8 is obsolete in wheezy.

The current version is 5.1, and that seems to work OK.

10 years agoserver/speaker.c: Only copy whole frames into collection buffers.
Mark Wooding [Sun, 19 May 2013 02:48:25 +0000 (03:48 +0100)]
server/speaker.c: Only copy whole frames into collection buffers.

At least the ALSA playback function gets into a real mess if a buffer
contains a partial frame: it leaves the partial frame behind, but is
called again until the buffer is empty, resulting in an infinite loop.

Thanks for Joe Birr-Pixton for helping diagnose this bug and coming up
with the right fix.

10 years agolib/resample.c: Quieten some warnings better.
Mark Wooding [Tue, 7 May 2013 14:16:01 +0000 (15:16 +0100)]
lib/resample.c: Quieten some warnings better.

Newer GCC isn't fooled by `mumble = 0;' any more.  Apparently `if
(mumble) {}' works.

10 years agoserver/rescan.c: Remove tracks which no longer have a player.
Mark Wooding [Sun, 5 May 2013 14:39:29 +0000 (15:39 +0100)]
server/rescan.c: Remove tracks which no longer have a player.

If you ever add a player with an overly broad pattern, and it matches a
file which isn't actually an audio file but is legitimately part of the
directory tree, then there's no way of getting it out of DisOrder's
database short of hacking the files directly.

10 years agolib/configuration.c: Allow resetting `player' and `tracklength' lists.
Mark Wooding [Sun, 5 May 2013 13:51:05 +0000 (14:51 +0100)]
lib/configuration.c: Allow resetting `player' and `tracklength' lists.

Saith the manual

| If player is used without arguments, the list of players is cleared.

but the code disallows such requests.  So it's impossible to override
the player lists.

11 years agodisobedience: tinker with About... box upstream/master branchpoint-5.1
Richard Kettlewell [Sun, 17 Feb 2013 16:14:06 +0000 (16:14 +0000)]
disobedience: tinker with About... box

11 years agodisobedience: add a disobedience.desktop file
Richard Kettlewell [Sun, 17 Feb 2013 16:10:24 +0000 (16:10 +0000)]
disobedience: add a disobedience.desktop file

11 years agoA batch of copyright date updates.
Richard Kettlewell [Sun, 3 Feb 2013 14:21:04 +0000 (14:21 +0000)]
A batch of copyright date updates.

11 years agouaudio: fake blocking for play callbacks
Richard Kettlewell [Sat, 19 Jan 2013 18:40:11 +0000 (18:40 +0000)]
uaudio: fake blocking for play callbacks

This satisfies timing expectations in the face of very large downstream
buffers.

11 years agoalsa: bump start threshold
Richard Kettlewell [Sat, 19 Jan 2013 18:39:24 +0000 (18:39 +0000)]
alsa: bump start threshold

With the default (1) PulseAudio plays a little bit, runs out, and sulks.

11 years agoalsa: set volume via Master rather than PCM.
Richard Kettlewell [Sat, 19 Jan 2013 18:37:45 +0000 (18:37 +0000)]
alsa: set volume via Master rather than PCM.

PulseAudio only has Master.  AFAICS none of this stuff is documented
so who knows what you're supposed to do?

11 years agoCHANGES
Richard Kettlewell [Sat, 1 Dec 2012 13:29:13 +0000 (13:29 +0000)]
CHANGES

11 years agoclient: use privileged socket if possible
Richard Kettlewell [Sat, 1 Dec 2012 13:28:21 +0000 (13:28 +0000)]
client: use privileged socket if possible

This allows the removal of the client dependency on libdb.

11 years agoserver: add a private socket for root
Richard Kettlewell [Sat, 1 Dec 2012 12:48:23 +0000 (12:48 +0000)]
server: add a private socket for root

root will try and use it if possible; anything connecting on it
is allowed through without knowing a password.

The jukebox user will be able to use it too although it doesn't
actually try.

Both these users have RW access to the database so they aren't
being given any privilege they don't have already here.

The speaker socket moves to the same private directory.

11 years agoMove --wait-for-root to disorderd.
Richard Kettlewell [Sat, 1 Dec 2012 12:08:24 +0000 (12:08 +0000)]
Move --wait-for-root to disorderd.

This (undocumented) option is only used in testing and is
one of the things that causes the client package to depend
on the server's version of libdb.

11 years agobuild: distcheck-clean
Richard Kettlewell [Sat, 1 Dec 2012 11:38:12 +0000 (11:38 +0000)]
build: distcheck-clean

11 years agogitignore
Richard Kettlewell [Sat, 1 Dec 2012 11:22:24 +0000 (11:22 +0000)]
gitignore

11 years agobuild: various fixes for ubuntu 12.10/gcc 4.7
Richard Kettlewell [Sat, 1 Dec 2012 11:20:14 +0000 (11:20 +0000)]
build: various fixes for ubuntu 12.10/gcc 4.7

- One_old_user() is obsolete and uses nonexistent functions;
  I guess earlier GCC removed it before checking for errors.
- Remove or use various unused objects that GCC is now better
  at spotting.
- Makefile -l ordering fixes.

11 years agobuild: fix test for ancient GCC bug
Richard Kettlewell [Sat, 1 Dec 2012 11:09:03 +0000 (11:09 +0000)]
build: fix test for ancient GCC bug

12 years agobuild: create config.aux in autogen.sh
Richard Kettlewell [Mon, 22 Aug 2011 19:38:24 +0000 (20:38 +0100)]
build: create config.aux in autogen.sh

Required on lenny.  Presumably the later autotools create it automatically.

12 years agodocs: rework protocol documentation a bit.
Richard Kettlewell [Sun, 14 Aug 2011 22:00:47 +0000 (23:00 +0100)]
docs: rework protocol documentation a bit.

It is now a bit more precise and self-contained.
It could really do with some BNF though.

12 years agoserver: don't report wstat for processes killed by the server
Richard Kettlewell [Sun, 14 Aug 2011 17:22:49 +0000 (18:22 +0100)]
server: don't report wstat for processes killed by the server

12 years agodocs: update CHANGES for Disobedience user management fix.
Richard Kettlewell [Sun, 14 Aug 2011 17:10:15 +0000 (18:10 +0100)]
docs: update CHANGES for Disobedience user management fix.

12 years agodisobedience: grey out user management if it won't work.
Richard Kettlewell [Sun, 14 Aug 2011 17:08:06 +0000 (18:08 +0100)]
disobedience: grey out user management if it won't work.

This already worked for users without the 'admin' right but failed on
remote connections if the server had remote_userman set to 'no' (which
is the default).  The result was pretty ugly, the user management
window opened but would repeatedly cause protocol error popups.

The implementation depends on the server change in
b60ceb3caecce2c86c484e6173fb1428b71d456a.

It will still go wrong if remote_userman is changed during the
server's lifetime, presumably a fairly rare event.

12 years agodisobedience: improve eclient error strings
Richard Kettlewell [Sun, 14 Aug 2011 17:04:29 +0000 (18:04 +0100)]
disobedience: improve eclient error strings

The remote server details are now pushed to the end and the status
code is no longer repeated.

12 years agoserver: tidy up error codes
Richard Kettlewell [Sun, 14 Aug 2011 16:41:42 +0000 (17:41 +0100)]
server: tidy up error codes

Send 510 in a variety of authentication-failed cases.

12 years agoserver: docs: remove deprecated configuration and user upgrade.
Richard Kettlewell [Sun, 7 Aug 2011 17:26:34 +0000 (18:26 +0100)]
server: docs: remove deprecated configuration and user upgrade.

User upgrade code has been removed.

allow, restrict and trust only affected the user upgrade code.  They
are now removed completely.

prefsync and lock have been non-functional for years.

--wait-for-device and gap, both ugly hacks, were still functional but
long-since deprecated.

12 years agoMerge branch 'protogen'
Richard Kettlewell [Sun, 7 Aug 2011 16:45:36 +0000 (17:45 +0100)]
Merge branch 'protogen'