chiark / gitweb /
Merge remote-tracking branch 'origin/branch-5.0'
authorRichard Kettlewell <rjk@terraraq.org.uk>
Sun, 31 Jul 2011 16:16:46 +0000 (17:16 +0100)
committerRichard Kettlewell <rjk@terraraq.org.uk>
Sun, 31 Jul 2011 16:16:46 +0000 (17:16 +0100)
Conflicts:
CHANGES.html

1  2 
CHANGES.html
server/server.c

diff --combined CHANGES.html
index 65f10ae9576bcc877088f4d340d9f9a5116c9136,008cc8757806d62a9d756d37ce2be0aa6ee5eb19..75a9ef48d3d2dd6f0beac5ea0269820ddf0dfc47
@@@ -1,8 -1,65 +1,8 @@@
 -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
  <html>
  <head>
  <title>DisOrder Change History</title>
 -<style type="text/css">
 -body {
 -  color: black;
 -  background-color: white;
 -  font-family: times,serif;
 -  font-weight: normal;
 -  font-size: 12pt;
 -  font-variant: normal
 -}
 -
 -div.section {
 -  margin-left:1em
 -}
 -
 -h1 {
 -  background-color: #e0ffe0;
 -  font-family: helvetica,sans-serif;
 -  padding: 0.2em
 -}
 -
 -h2 {
 -  background-color: #e0ffe0;
 -  font-family: helvetica,sans-serif;
 -  padding: 0.2em
 -}
 -
 -h3 {
 -  background-color: #f0f0f0;
 -  font-family: helvetica,sans-serif;
 -  padding: 0.2em
 -}
 -
 -h4 {
 -  font-family: helvetica,sans-serif
 -}
 -
 -table.bugs {
 -  width: 100%;
 -  font-size: 12pt;
 -  border-collapse: collapse;
 -  border:1px
 -}
 -
 -table.bugs th {
 -  text-align: left;
 -  border: 1px solid black;
 -  background-color: black;
 -  color: white
 -}
 -
 -table.bugs td {
 -  border: 1px solid
 -}
 -
 -span.command {
 -  font-family: monospace
 -}
 -</style>
 +<link rel=StyleSheet type="text/css" href="docs.css">
  </head>
  
  <body>
  <p>This file documents recent user-visible changes to <a
   href="http://www.greenend.org.uk/rjk/disorder/">DisOrder</a>.</p>
  
 +<p><b>IMPORTANT</b>: you should read <a
 +href="README.upgrades.html">README.upgrades</a> before upgrading.</p>
 +
 +<h2>Changes up to version 5.1</h2>
 +
 +<div class=section>
 +
 +  <h3>Removable Device Support</h3>
 +
 +  <div class=section>
 +
 +    <p>The server will now automatically initiate a rescan when a filesystem is
 +    mounted or unmounted.  (Use the <tt>mount_rescan</tt> option if you want to
 +    suppress this behavior.)</p>
 +
 +    <p>The server takes care not to hold audio files open unnecessarily, so
 +    that devices can be unmounted even if tracks from them are currently being
 +    buffered.</p>
 +
 +  </div>
 +
 +  <h3>Disobedience</h3>
 +
 +  <div class=section>
 +
 +    <p>You can now edit the <tt>required-tags</tt> and <tt>prohibited-tags</tt>
 +    global preferences in Disobedience
 +    (<a href="http://code.google.com/p/disorder/issues/detail?id=29">issue
 +    #29</a>).</p>
 +
 +  </div>
 +
 +  <h3>Backups</h3>
 +
 +  <div class=section>
 +
 +    <p>The Debian package now includes a cronjob that backs up the database
 +    daily.  See <tt>/etc/cron.d/disorder</tt>.  You can put settings
 +    in <tt>/etc/default/disorder</tt> to turn this off or to control how long
 +    the backups are kept for.</p>
 +
 +    <p>The <tt>disorder-dump -r</tt> option was broken.</p>
 +
 +    <p><tt>disorder-dump</tt> now gets permissions right automatically (<a
 +    href="http://code.google.com/p/disorder/issues/detail?id=56">issue
 +    #56</a>).</p>
 +
 +  </div>
 +
 +  <h3>General</h3>
 +
 +  <div class=section>
 +
 +    <p>Unicode support has been upgraded to <a
 +    href="http://www.unicode.org/versions/Unicode6.0.0/">Unicode
 +    6.0.0</a>.</p>
 +    
 +    <p>Various minor bug fixes.</p>
 +
 +  </div>
 +
 +</div>
 +
+ <h2>Changes up to version 5.0.3</h2>
+ <div class=section>
+ <p><b>Security</b>: Local connections can no longer create and delete users
+ unless they are properly authorized.</p>
+ </div>
  <h2>Changes up to version 5.0.2</h2>
  
  <div class=section>
  
        <p>Confirmation URLs should be cleaner (and in particular not end
        with punctuation).  (Please see <a
 -      href="README.upgrades">README.upgrades</a> for more about this.)</p>
 +      href="README.upgrades.html">README.upgrades</a> for more about this.)</p>
  
      </div>
        
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=30">#30</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=30">#30</a></td>
            <td>mini disobedience interface</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=32">#32</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=32">#32</a></td>
            <td>Excessively verbose log chatter on shutdown</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=33">#33</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=33">#33</a></td>
            <td>(Some) plugins need -lm.</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=39">#39</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=39">#39</a></td>
            <td>Double bind() non-multicast AF_INET</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=40">#40</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=40">#40</a></td>
            <td>Missing stub function</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=41">#41</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=41">#41</a></td>
            <td>Missing includes for timeval</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=42">#42</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=42">#42</a></td>
            <td>syntax error in empeg_host section</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=43">#43</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=43">#43</a></td>
            <td>decoder segfault with FLAC 1.2.1</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=44">#44</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=44">#44</a></td>
            <td>gcc 4.3.2-1ubuntu12 SUYB patch</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=45">#45</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=45">#45</a></td>
            <td>disobedience doesn't configure its back end</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=46">#46</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=46">#46</a></td>
            <td>Sort search results in web interface</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=48">#48</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=48">#48</a></td>
            <td>build-time dependency on <tt>oggdec</tt> removed</td>
          </tr>
  
          <tr>
 -          <td><a href="http://code.google.com/p/disorder/issues/detail?id=49">#49</a></d>
 +          <td><a href="http://code.google.com/p/disorder/issues/detail?id=49">#49</a></td>
            <td>Disobedience's 'When' column gets out of date</td>
          </tr>
  
  <div class=section>
    
    <p><b>Important</b>!  See <a
 -  href="README.upgrades">README.upgrades</a> when upgrading.</p>
 +  href="README.upgrades.html">README.upgrades</a> when upgrading.</p>
    
    <h3>Platforms And Installation</h3>
    
diff --combined server/server.c
index c09b0445f128abffebd949b44173fc8930ea8bfe,0ebfb4f0782fb8c4d5d8f91184928a4eb6606c5b..53a351bc455c181981f6150ba9ff557a95eb134a
@@@ -201,9 -201,9 +201,9 @@@ static int reader_error(ev_source attri
  
  static int c_disable(struct conn *c, char **vec, int nvec) {
    if(nvec == 0)
 -    disable_playing(c->who);
 +    disable_playing(c->who, c->ev);
    else if(nvec == 1 && !strcmp(vec[0], "now"))
 -    disable_playing(c->who);
 +    disable_playing(c->who, c->ev);
    else {
      sink_writes(ev_writer_sink(c->w), "550 invalid argument\n");
      return 1;                 /* completed */
@@@ -866,7 -866,7 +866,7 @@@ static int c_random_enable(struct conn 
  static int c_random_disable(struct conn *c,
                            char attribute((unused)) **vec,
                            int attribute((unused)) nvec) {
 -  disable_random(c->who);
 +  disable_random(c->who, c->ev);
    sink_writes(ev_writer_sink(c->w), "250 OK\n");
    return 1;                   /* completed */
  }
@@@ -1150,19 -1150,8 +1150,19 @@@ static int c_set_global(struct conn *c
      sink_writes(ev_writer_sink(c->w), "550 cannot set internal global preferences\n");
      return 1;
    }
 -  trackdb_set_global(vec[0], vec[1], c->who);
 -  sink_printf(ev_writer_sink(c->w), "250 OK\n");
 +  /* We special-case the 'magic' preferences here. */
 +  if(!strcmp(vec[0], "playing")) {
 +    (flag_enabled(vec[1]) ? enable_playing : disable_playing)(c->who, c->ev);
 +    sink_printf(ev_writer_sink(c->w), "250 OK\n");
 +  } else if(!strcmp(vec[0], "random-play")) {
 +    (flag_enabled(vec[1]) ? enable_random : disable_random)(c->who, c->ev);
 +    sink_printf(ev_writer_sink(c->w), "250 OK\n");
 +  } else {
 +    if(trackdb_set_global(vec[0], vec[1], c->who))
 +      sink_printf(ev_writer_sink(c->w), "250 OK\n");
 +    else
 +      sink_writes(ev_writer_sink(c->w), "550 not found\n");
 +  }
    return 1;
  }
  
@@@ -1188,7 -1177,7 +1188,7 @@@ static int c_nop(struct conn *c
  static int c_new(struct conn *c,
                 char **vec,
                 int nvec) {
 -  int max, n;
 +  int max;
    char **tracks;
  
    if(nvec > 0)
      max = config->new_max;
    tracks = trackdb_new(0, max);
    sink_printf(ev_writer_sink(c->w), "253 New track list follows\n");
 -  n = 0;
    while(*tracks) {
      sink_printf(ev_writer_sink(c->w), "%s%s\n",
                **tracks == '.' ? "." : "", *tracks);
@@@ -1865,12 -1855,12 +1865,12 @@@ static const struct command 
     */
    rights_type rights;
  } commands[] = {
-   { "adduser",        2, 3,       c_adduser,        RIGHT_ADMIN|RIGHT__LOCAL },
+   { "adduser",        2, 3,       c_adduser,        RIGHT_ADMIN },
    { "adopt",          1, 1,       c_adopt,          RIGHT_PLAY },
    { "allfiles",       0, 2,       c_allfiles,       RIGHT_READ },
    { "confirm",        1, 1,       c_confirm,        0 },
    { "cookie",         1, 1,       c_cookie,         0 },
-   { "deluser",        1, 1,       c_deluser,        RIGHT_ADMIN|RIGHT__LOCAL },
+   { "deluser",        1, 1,       c_deluser,        RIGHT_ADMIN },
    { "dirs",           0, 2,       c_dirs,           RIGHT_READ },
    { "disable",        0, 1,       c_disable,        RIGHT_GLOBAL_PREFS },
    { "edituser",       3, 3,       c_edituser,       RIGHT_ADMIN|RIGHT_USERINFO },
    { "random-enabled", 0, 0,       c_random_enabled, RIGHT_READ },
    { "recent",         0, 0,       c_recent,         RIGHT_READ },
    { "reconfigure",    0, 0,       c_reconfigure,    RIGHT_ADMIN },
-   { "register",       3, 3,       c_register,       RIGHT_REGISTER|RIGHT__LOCAL },
+   { "register",       3, 3,       c_register,       RIGHT_REGISTER },
    { "reminder",       1, 1,       c_reminder,       RIGHT__LOCAL },
    { "remove",         1, 1,       c_remove,         RIGHT_REMOVE__MASK },
    { "rescan",         0, INT_MAX, c_rescan,         RIGHT_RESCAN },