aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-15 22:34:21 +0200
committerMax Kellermann <max@duempel.org>2008-10-15 22:34:21 +0200
commit4a7ad5b618957f75da5b305a3d0cc8006e3e7416 (patch)
tree80947f009e0efe11e45b0e64ebb2b81cc5c16abe /src/client.h
parentfa56ff3d5250219d39d3cb077fd1e265fd6f92be (diff)
downloadmpd-4a7ad5b618957f75da5b305a3d0cc8006e3e7416.tar.gz
mpd-4a7ad5b618957f75da5b305a3d0cc8006e3e7416.tar.xz
mpd-4a7ad5b618957f75da5b305a3d0cc8006e3e7416.zip
listen, client: enable SO_PASSCRED, get client's uid
Enable authentication over unix sockets. Store the client's uid in the client struct.
Diffstat (limited to '')
-rw-r--r--src/client.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client.h b/src/client.h
index 50238d9f0..58c2003de 100644
--- a/src/client.h
+++ b/src/client.h
@@ -33,10 +33,16 @@ void client_manager_deinit(void);
int client_manager_io(void);
void client_manager_expire(void);
-void client_new(int fd, const struct sockaddr *addr);
+void client_new(int fd, const struct sockaddr *addr, int uid);
int client_is_expired(const struct client *client);
+/**
+ * returns the uid of the client process, or a negative value if the
+ * uid is unknown
+ */
+int client_get_uid(const struct client *client);
+
int client_get_permission(const struct client *client);
void client_set_permission(struct client *client, int permission);