X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/6961095b797229842e1465ff3670625d11e95167..c8a277f4ccdf4c392135769a4f0585dd7df5ae19:/lib/client.c diff --git a/lib/client.c b/lib/client.c index 987ab01..55cfe1c 100644 --- a/lib/client.c +++ b/lib/client.c @@ -50,7 +50,6 @@ #include "authhash.h" #include "client-common.h" #include "rights.h" -#include "trackdb.h" #include "kvp.h" /** @brief Client handle contents */ @@ -521,13 +520,13 @@ int disorder_connect(disorder_client *c) { return -1; } password = config->password; - /* Maybe we can read the database */ - if(!password && trackdb_readable()) { - trackdb_init(TRACKDB_NO_RECOVER|TRACKDB_NO_UPGRADE); - trackdb_open(TRACKDB_READ_ONLY); - password = trackdb_get_password(username); - trackdb_close(); - } + /* If we're connecting as 'root' guess that we're the system root + * user (or the jukebox user), both of which can use the privileged + * socket. They can also furtle with the db directly: that is why + * privileged socket does not represent a privilege escalation. */ + if(!password + && !strcmp(username, "root")) + password = "anything will do for root"; if(!password) { /* Oh well */ c->last = "no password";