diff options
author | Max Kellermann <max@duempel.org> | 2008-10-15 22:34:21 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-15 22:34:21 +0200 |
commit | 4a7ad5b618957f75da5b305a3d0cc8006e3e7416 (patch) | |
tree | 80947f009e0efe11e45b0e64ebb2b81cc5c16abe /src/client.h | |
parent | fa56ff3d5250219d39d3cb077fd1e265fd6f92be (diff) | |
download | mpd-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.h | 8 |
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); |