Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6840ccc

Browse files
committed
Rename pg_make_encrypted_password to PQencryptPassword.
1 parent 5c9a46f commit 6840ccc

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

doc/src/sgml/libpq.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.200 2005/12/23 01:16:37 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.201 2005/12/26 14:58:04 petere Exp $
33
-->
44

55
<chapter id="libpq">
@@ -3574,22 +3574,22 @@ As always, there are some functions that just don't fit anywhere.
35743574

35753575
<variablelist>
35763576
<varlistentry>
3577-
<term><function>pg_make_encrypted_password</function><indexterm><primary>pg_make_encrypted_password</></></term>
3577+
<term><function>PQencryptPassword</function><indexterm><primary>PQencryptPassword</></></term>
35783578
<listitem>
35793579
<para>
35803580
Prepares the encrypted form of a <productname>PostgreSQL</> password.
35813581
<synopsis>
3582-
char *pg_make_encrypted_password(const char *passwd, const char *user);
3582+
char * PQencryptPassword(const char *passwd, const char *user);
35833583
</synopsis>
3584-
<function>pg_make_encrypted_password</> is intended to be used by client
3584+
This function is intended to be used by client
35853585
applications that wish to send commands like
35863586
<literal>ALTER USER joe PASSWORD 'pwd'</>.
35873587
It is good practice not to send the original cleartext password in such a
35883588
command, because it might be exposed in command logs, activity displays,
35893589
and so on. Instead, use this function to convert the password to encrypted
35903590
form before it is sent. The arguments are the cleartext password, and the SQL
35913591
name of the user it is for. The return value is a malloc'd string, or NULL if
3592-
out-of-memory. The caller may assume the string doesn't contain any weird
3592+
out-of-memory. The caller may assume the string doesn't contain any special
35933593
characters that would require escaping. Use <function>PQfreemem</> to free
35943594
the result when done with it.
35953595
</para>

src/bin/psql/command.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.157 2005/12/23 01:16:38 tgl Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.158 2005/12/26 14:58:04 petere Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "command.h"
@@ -643,7 +643,7 @@ exec_command(const char *cmd,
643643
else
644644
user = PQuser(pset.db);
645645

646-
encrypted_password = pg_make_encrypted_password(pw1, user);
646+
encrypted_password = PQencryptPassword(pw1, user);
647647

648648
if (!encrypted_password)
649649
{

src/bin/scripts/createuser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
8-
* $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.25 2005/12/23 01:16:38 tgl Exp $
8+
* $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.26 2005/12/26 14:58:05 petere Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -251,7 +251,7 @@ main(int argc, char *argv[])
251251
{
252252
char *encrypted_password;
253253

254-
encrypted_password = pg_make_encrypted_password(newpassword,
254+
encrypted_password = PQencryptPassword(newpassword,
255255
newuser);
256256
if (!encrypted_password)
257257
{

src/interfaces/libpq/exports.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/src/interfaces/libpq/exports.txt,v 1.6 2005/12/23 01:16:38 tgl Exp $
1+
# $PostgreSQL: pgsql/src/interfaces/libpq/exports.txt,v 1.7 2005/12/26 14:58:05 petere Exp $
22
# Functions to be exported by libpq DLLs
33
PQconnectdb 1
44
PQsetdbLogin 2
@@ -125,4 +125,4 @@ PQcancel 122
125125
lo_create 123
126126
PQinitSSL 124
127127
PQregisterThreadLock 125
128-
pg_make_encrypted_password 126
128+
PQencryptPassword 126

src/interfaces/libpq/fe-auth.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.109 2005/12/23 01:16:38 tgl Exp $
13+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.110 2005/12/26 14:58:05 petere Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -534,7 +534,7 @@ pg_fe_getauthname(char *PQerrormsg)
534534

535535

536536
/*
537-
* pg_make_encrypted_password -- exported routine to encrypt a password
537+
* PQencryptPassword -- exported routine to encrypt a password
538538
*
539539
* This is intended to be used by client applications that wish to send
540540
* commands like ALTER USER joe PASSWORD 'pwd'. The password need not
@@ -548,11 +548,11 @@ pg_fe_getauthname(char *PQerrormsg)
548548
* is for.
549549
*
550550
* Return value is a malloc'd string, or NULL if out-of-memory. The client
551-
* may assume the string doesn't contain any weird characters that would
551+
* may assume the string doesn't contain any special characters that would
552552
* require escaping.
553553
*/
554554
char *
555-
pg_make_encrypted_password(const char *passwd, const char *user)
555+
PQencryptPassword(const char *passwd, const char *user)
556556
{
557557
char *crypt_pwd;
558558

src/interfaces/libpq/libpq-fe.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.123 2005/12/23 01:16:38 tgl Exp $
10+
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.124 2005/12/26 14:58:06 petere Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -497,7 +497,7 @@ extern int PQenv2encoding(void);
497497

498498
/* === in fe-auth.c === */
499499

500-
extern char *pg_make_encrypted_password(const char *passwd, const char *user);
500+
extern char *PQencryptPassword(const char *passwd, const char *user);
501501

502502
#ifdef __cplusplus
503503
}

0 commit comments

Comments
 (0)