This allows the removal of the client dependency on libdb.
disorder_SOURCES=disorder.c authorize.c authorize.h \
../lib/memgc.c
disorder_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
disorder_SOURCES=disorder.c authorize.c authorize.h \
../lib/memgc.c
disorder_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
- $(LIBGC) $(LIBGCRYPT) $(LIBPCRE) $(LIBICONV) $(LIBDB) $(LIBPTHREAD)
+ $(LIBGC) $(LIBGCRYPT) $(LIBPCRE) $(LIBICONV) $(LIBPTHREAD)
disorder_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
disorderfm_SOURCES=disorderfm.c \
disorder_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
disorderfm_SOURCES=disorderfm.c \
disorder_playrtp_SOURCES=playrtp.c playrtp.h playrtp-mem.c
disorder_playrtp_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
$(LIBASOUND) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(COREAUDIO) \
disorder_playrtp_SOURCES=playrtp.c playrtp.h playrtp-mem.c
disorder_playrtp_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
$(LIBASOUND) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(COREAUDIO) \
- $(LIBDB) $(LIBPTHREAD) -lm
disorder_playrtp_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
rtpmon_SOURCES=rtpmon.c
disorder_playrtp_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
rtpmon_SOURCES=rtpmon.c
popup.h playlists.c multidrag.c multidrag.h autoscroll.c \
autoscroll.h globals.c
disobedience_LDADD=../lib/libdisorder.a $(LIBPCRE) $(LIBGC) $(LIBGCRYPT) \
popup.h playlists.c multidrag.c multidrag.h autoscroll.c \
autoscroll.h globals.c
disobedience_LDADD=../lib/libdisorder.a $(LIBPCRE) $(LIBGC) $(LIBGCRYPT) \
- $(LIBASOUND) $(COREAUDIO) $(LIBDB) $(LIBICONV)
+ $(LIBASOUND) $(COREAUDIO) $(LIBICONV)
disobedience_LDFLAGS=$(GTK_LIBS)
check: check-help
disobedience_LDFLAGS=$(GTK_LIBS)
check: check-help
sa = res->ai_addr;
len = res->ai_addrlen;
} else {
sa = res->ai_addr;
len = res->ai_addrlen;
} else {
- if(getuid() == 0) {
- /* root will use the private socket if possible (which it should be) */
- name = config_get_file2(c, "private/socket");
- if(access(name, R_OK) != 0) {
- xfree(name);
- name = NULL;
- }
+ /* use the private socket if possible (which it should be) */
+ name = config_get_file2(c, "private/socket");
+ if(access(name, R_OK) != 0) {
+ xfree(name);
+ name = NULL;
}
if(!name)
name = config_get_file2(c, "socket");
}
if(!name)
name = config_get_file2(c, "socket");
#include "authhash.h"
#include "client-common.h"
#include "rights.h"
#include "authhash.h"
#include "client-common.h"
#include "rights.h"
#include "kvp.h"
/** @brief Client handle contents */
#include "kvp.h"
/** @brief Client handle contents */
return -1;
}
password = config->password;
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";
if(!password) {
/* Oh well */
c->last = "no password";