[pulseaudio-discuss] [PATCH] Replace "authorization" with "authentication"

David Henningsson david.henningsson at canonical.com
Tue Sep 2 02:54:08 PDT 2014


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 at canonical.com>
---
 src/pulse/def.h                 | 2 +-
 src/pulse/error.c               | 2 +-
 src/pulsecore/authkey.c         | 6 +++---
 src/pulsecore/esound.h          | 2 +-
 src/pulsecore/protocol-esound.c | 2 +-
 src/pulsecore/protocol-native.c | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/pulse/def.h b/src/pulse/def.h
index dfc0c10..ee7404d 100644
--- a/src/pulse/def.h
+++ b/src/pulse/def.h
@@ -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 */
diff --git a/src/pulse/error.c b/src/pulse/error.c
index 751d42a..27b8ec4 100644
--- a/src/pulse/error.c
+++ b/src/pulse/error.c
@@ -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"),
diff --git a/src/pulsecore/authkey.c b/src/pulsecore/authkey.c
index 3c5827d..7f91f16 100644
--- a/src/pulsecore/authkey.c
+++ b/src/pulsecore/authkey.c
@@ -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);
 
diff --git a/src/pulsecore/esound.h b/src/pulsecore/esound.h
index 5d6ec95..5fc91db 100644
--- a/src/pulsecore/esound.h
+++ b/src/pulsecore/esound.h
@@ -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 */
diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c
index 755109c..a4e0028 100644
--- a/src/pulsecore/protocol-esound.c
+++ b/src/pulsecore/protocol-esound.c
@@ -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;
     }
 
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 93db157..6ec65d6 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -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;
         }
-- 
1.9.1



More information about the pulseaudio-discuss mailing list