mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: add command access control
By default require that a client is authenticated and has a manager to be allowed to run a command. Specially: * AUTH requires nothing * SET_CLIENT_NAME and STAT only require authentication
This commit is contained in:
parent
92abc7b7ad
commit
1c3e45a584
3 changed files with 22 additions and 5 deletions
|
|
@ -192,9 +192,15 @@ enum pulseaudio_command {
|
|||
COMMAND_MAX
|
||||
};
|
||||
|
||||
enum command_access_flag {
|
||||
COMMAND_ACCESS_WITHOUT_AUTH = (1 << 0),
|
||||
COMMAND_ACCESS_WITHOUT_MANAGER = (1 << 1),
|
||||
};
|
||||
|
||||
struct command {
|
||||
const char *name;
|
||||
int (*run) (struct client *client, uint32_t command, uint32_t tag, struct message *msg);
|
||||
uint32_t access;
|
||||
};
|
||||
|
||||
extern const struct command commands[COMMAND_MAX];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue