X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/7c82ecb820073aa894f9b41442fdf910c19accdb..1e97629da2ea6c1ae328912ba82d4595eb08b700:/server/server.c diff --git a/server/server.c b/server/server.c index cbeb0ab..3d59398 100644 --- a/server/server.c +++ b/server/server.c @@ -767,7 +767,7 @@ static int c_volume(struct conn *c, sink_writes(ev_writer_sink(c->w), "510 Prohibited\n"); return 1; } - if(mixer_control(&l, &r, set)) + if(mixer_control(-1/*as configured*/, &l, &r, set)) sink_writes(ev_writer_sink(c->w), "550 error accessing mixer\n"); else { sink_printf(ev_writer_sink(c->w), "252 %d %d\n", l, r); @@ -1097,6 +1097,7 @@ static int c_adduser(struct conn *c, const char *rights; if(!config->remote_userman && !(c->rights & RIGHT__LOCAL)) { + error(0, "S%x: remote adduser", c->tag); sink_writes(ev_writer_sink(c->w), "550 Remote user management is disabled\n"); return 1; } @@ -1122,6 +1123,7 @@ static int c_deluser(struct conn *c, struct conn *d; if(!config->remote_userman && !(c->rights & RIGHT__LOCAL)) { + error(0, "S%x: remote deluser", c->tag); sink_writes(ev_writer_sink(c->w), "550 Remote user management is disabled\n"); return 1; } @@ -1143,6 +1145,7 @@ static int c_edituser(struct conn *c, struct conn *d; if(!config->remote_userman && !(c->rights & RIGHT__LOCAL)) { + error(0, "S%x: remote edituser", c->tag); sink_writes(ev_writer_sink(c->w), "550 Remote user management is disabled\n"); return 1; } @@ -1184,7 +1187,12 @@ static int c_userinfo(struct conn *c, struct kvp *k; const char *value; - if(!config->remote_userman && !(c->rights & RIGHT__LOCAL)) { + /* We allow remote querying of rights so that clients can figure out what + * they're allowed to do */ + if(!config->remote_userman + && !(c->rights & RIGHT__LOCAL) + && strcmp(vec[1], "rights")) { + error(0, "S%x: remote userinfo %s %s", c->tag, vec[0], vec[1]); sink_writes(ev_writer_sink(c->w), "550 Remote user management is disabled\n"); return 1; }