]> granicus.if.org Git - pgbouncer/commitdiff
Fix terminology
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 26 Sep 2019 19:37:27 +0000 (21:37 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 26 Sep 2019 19:37:27 +0000 (21:37 +0200)
PAM is authentication, not authorization.

README.md
configure.ac
include/pam.h
src/client.c
src/objects.c
src/pam.c

index 7739eaa73a1d48df1c965ad8cfd364940f94eab0..08736d21f38e9e86f56f11c68edaca2ce3e53358 100644 (file)
--- a/README.md
+++ b/README.md
@@ -67,11 +67,11 @@ to pick udns, else libevent is used.  Specify `--disable-evdns` to
 disable the use of libevent's evdns and fall back to a libc-based
 implementation.
 
-PAM authorization
------------------
+PAM authentication
+------------------
 
-To enable PAM authorization `./configure` has a flag `--with-pam` (default value is no). When compiled with
-PAM support new global authorization type `pam` appears which can be used to validate users through PAM.
+To enable PAM authentication `./configure` has a flag `--with-pam` (default value is no). When compiled with
+PAM support new global authentication type `pam` appears which can be used to validate users through PAM.
 
 Building from Git
 -----------------
index c58de442d3be86703e72705a25d09dec0cbfec83..f29b2e8e407a1846d236a3728b1396bab3b578a4 100644 (file)
@@ -56,7 +56,7 @@ AC_CHECK_FUNCS(lstat)
 dnl Find libevent
 PKG_CHECK_MODULES(LIBEVENT, libevent)
 
-dnl Check for PAM authorization support
+dnl Check for PAM authentication support
 pam_support=no
 AC_ARG_WITH(pam,
   AC_HELP_STRING([--with-pam], [build with PAM support]),
index fa887149b34953d6e67f145ecec7b6300cfe3102..89f4f7d4329bf8b254ec02ee9147cc404fab726d 100644 (file)
@@ -24,7 +24,7 @@
 #define PGBOUNCER_PAM_SERVICE "pgbouncer"
 
 /*
- * Defines how many authorization requests can be placed to the waiting queue.
+ * Defines how many authentication requests can be placed to the waiting queue.
  * When the queue is full calls to pam_auth_begin() will block until there is
  * free space in the queue.
  */
index b37d8d459cc6f863ccc83e1beb25d79a197b8041..236b92434d2d0ef66cb22de73009abea4c56025c 100644 (file)
@@ -299,11 +299,11 @@ bool set_pool(PgSocket *client, const char *dbname, const char *username, const
                client->auth_user = client->db->forced_user;
        } else if (cf_auth_type == AUTH_PAM) {
                if (client->db->auth_user) {
-                       slog_error(client, "PAM can't be used together with database authorization");
+                       slog_error(client, "PAM can't be used together with database authentication");
                        disconnect_client(client, true, "bouncer config error");
                        return false;
                }
-               /* Password will be set after successful authorization when not in takeover mode */
+               /* Password will be set after successful authentication when not in takeover mode */
                client->auth_user = add_pam_user(username, password);
                if (!client->auth_user) {
                        slog_error(client, "set_pool(): failed to allocate new PAM user");
index 2e2f463ce32fb334135f2b97e29c172de344e99e..f5f1465d75932b4f2c2655d8fab93e13522b4a5d 100644 (file)
@@ -33,7 +33,7 @@ struct AATree user_tree;
 
 /*
  * All PAM users are kept here. We need to differentiate two user
- * lists to avoid user clashing for different authorization types,
+ * lists to avoid user clashing for different authentication types,
  * and because pam_user_tree is closer to PgDatabase.user_tree in
  * logic.
  */
index 1f6b900cb5772872da670fb2f34eadaa1dafefb9..cb6fcc9e5b07acecefc4a77eba4e343abef83442 100644 (file)
--- a/src/pam.c
+++ b/src/pam.c
 #include <pthread.h>
 #include <security/pam_appl.h>
 
-/* The request is waiting in the queue or being authorized */
+/* The request is waiting in the queue or being authenticated */
 #define PAM_STATUS_IN_PROGRESS  1
-/* The request was successfully authorized */
+/* The request was successfully authenticated */
 #define PAM_STATUS_SUCCESS      2
-/* The request failed authorization */
+/* The request failed authentication */
 #define PAM_STATUS_FAILED       3
 
 /*
@@ -43,7 +43,7 @@
 
 
 struct pam_auth_request {
-       /* The socket we check authorization for */
+       /* The socket we check authentication for */
        PgSocket *client;
 
        /* CHECKME: The socket can be closed and reused while the request is waiting
@@ -53,7 +53,7 @@ struct pam_auth_request {
        usec_t connect_time;
 
        /* Same as in client->remote_addr.
-        * We want to minimize synchronization between the authorization thread and
+        * We want to minimize synchronization between the authentication thread and
         * the rest of pgbouncer, so the username and remote_addr are explicitly stored here.
         */
        PgAddr remote_addr;
@@ -254,7 +254,7 @@ static void* pam_auth_worker(void *arg)
                        request->status = PAM_STATUS_FAILED;
                }
 
-               log_debug("pam_auth_worker(): authorization completed, status=%d", request->status);
+               log_debug("pam_auth_worker(): authentication completed, status=%d", request->status);
        }
 
        return NULL;
@@ -272,7 +272,7 @@ static bool is_valid_socket(const struct pam_auth_request *request) {
 }
 
 /*
- * Finishes the handshake after successful or unsuccessful authorization.
+ * Finishes the handshake after successful or unsuccessful authentication.
  * The function is only called from the main thread.
  */
 static void pam_auth_finish(struct pam_auth_request *request)