mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
Replace "authorization" with "authentication"
Since we don't have "limited" clients, a client that authenticates correctly is automatically authorized. However, it's the authentication that can go wrong, rather than the authorization. Buglink: https://bugs.freedesktop.org/show_bug.cgi?id=78566 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
764da4260a
commit
58cffdcfc8
6 changed files with 8 additions and 8 deletions
|
|
@ -464,7 +464,7 @@ typedef enum pa_error_code {
|
|||
PA_ERR_CONNECTIONREFUSED, /**< Connection refused */
|
||||
PA_ERR_PROTOCOL, /**< Protocol error */
|
||||
PA_ERR_TIMEOUT, /**< Timeout */
|
||||
PA_ERR_AUTHKEY, /**< No authorization key */
|
||||
PA_ERR_AUTHKEY, /**< No authentication key */
|
||||
PA_ERR_INTERNAL, /**< Internal error */
|
||||
PA_ERR_CONNECTIONTERMINATED, /**< Connection terminated */
|
||||
PA_ERR_KILLED, /**< Entity killed */
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const char*pa_strerror(int error) {
|
|||
[PA_ERR_CONNECTIONREFUSED] = N_("Connection refused"),
|
||||
[PA_ERR_PROTOCOL] = N_("Protocol error"),
|
||||
[PA_ERR_TIMEOUT] = N_("Timeout"),
|
||||
[PA_ERR_AUTHKEY] = N_("No authorization key"),
|
||||
[PA_ERR_AUTHKEY] = N_("No authentication key"),
|
||||
[PA_ERR_INTERNAL] = N_("Internal error"),
|
||||
[PA_ERR_CONNECTIONTERMINATED] = N_("Connection terminated"),
|
||||
[PA_ERR_KILLED] = N_("Entity killed"),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
#include "authkey.h"
|
||||
|
||||
/* Generate a new authorization key, store it in file fd and return it in *data */
|
||||
/* Generate a new authentication key, store it in file fd and return it in *data */
|
||||
static int generate(int fd, void *ret_data, size_t length) {
|
||||
ssize_t r;
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ static int generate(int fd, void *ret_data, size_t length) {
|
|||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
/* Load an authorization cookie from file fn and store it in data. If
|
||||
/* Load an authentication cookie from file fn and store it in data. If
|
||||
* the cookie file doesn't exist, create it */
|
||||
static int load(const char *fn, bool create, void *data, size_t length) {
|
||||
int fd = -1;
|
||||
|
|
@ -156,7 +156,7 @@ int pa_authkey_load(const char *fn, bool create, void *data, size_t length) {
|
|||
return ret;
|
||||
|
||||
if ((ret = load(p, create, data, length)) < 0)
|
||||
pa_log_warn("Failed to load authorization key '%s': %s", p, (ret < 0) ? pa_cstrerror(errno) : "File corrupt");
|
||||
pa_log_warn("Failed to load authentication key '%s': %s", p, (ret < 0) ? pa_cstrerror(errno) : "File corrupt");
|
||||
|
||||
pa_xfree(p);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
/* maximum size we can write(). Otherwise we might overflow */
|
||||
#define ESD_MAX_WRITE_SIZE (21 * 4096)
|
||||
|
||||
/* length of the authorization key, octets */
|
||||
/* length of the authentication key, octets */
|
||||
#define ESD_KEY_LEN (16)
|
||||
|
||||
/* default port for the EsounD server */
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ static int esd_proto_connect(connection *c, esd_proto_t request, const void *dat
|
|||
}
|
||||
|
||||
if (!c->authorized) {
|
||||
pa_log("Kicked client with invalid authorization key.");
|
||||
pa_log("Kicked client with invalid authentication key.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2724,7 +2724,7 @@ static void command_auth(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_ta
|
|||
}
|
||||
|
||||
if (!success) {
|
||||
pa_log_warn("Denied access to client with invalid authorization data.");
|
||||
pa_log_warn("Denied access to client with invalid authentication data.");
|
||||
pa_pstream_send_error(c->pstream, tag, PA_ERR_ACCESS);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue