Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
6840cccd
Commit
6840cccd
authored
Dec 26, 2005
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename pg_make_encrypted_password to PQencryptPassword.
parent
5c9a46f6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
+17
-17
doc/src/sgml/libpq.sgml
doc/src/sgml/libpq.sgml
+5
-5
src/bin/psql/command.c
src/bin/psql/command.c
+2
-2
src/bin/scripts/createuser.c
src/bin/scripts/createuser.c
+2
-2
src/interfaces/libpq/exports.txt
src/interfaces/libpq/exports.txt
+2
-2
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-auth.c
+4
-4
src/interfaces/libpq/libpq-fe.h
src/interfaces/libpq/libpq-fe.h
+2
-2
No files found.
doc/src/sgml/libpq.sgml
View file @
6840cccd
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.20
0 2005/12/23 01:16:37 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.20
1 2005/12/26 14:58:04 petere
Exp $
-->
-->
<chapter id="libpq">
<chapter id="libpq">
...
@@ -3574,14 +3574,14 @@ As always, there are some functions that just don't fit anywhere.
...
@@ -3574,14 +3574,14 @@ As always, there are some functions that just don't fit anywhere.
<variablelist>
<variablelist>
<varlistentry>
<varlistentry>
<term><function>
pg_make_encrypted_password</function><indexterm><primary>pg_make_encrypted_p
assword</></></term>
<term><function>
PQencryptPassword</function><indexterm><primary>PQencryptP
assword</></></term>
<listitem>
<listitem>
<para>
<para>
Prepares the encrypted form of a <productname>PostgreSQL</> password.
Prepares the encrypted form of a <productname>PostgreSQL</> password.
<synopsis>
<synopsis>
char *
pg_make_encrypted_p
assword(const char *passwd, const char *user);
char *
PQencryptP
assword(const char *passwd, const char *user);
</synopsis>
</synopsis>
<function>pg_make_encrypted_password</>
is intended to be used by client
This function
is intended to be used by client
applications that wish to send commands like
applications that wish to send commands like
<literal>ALTER USER joe PASSWORD 'pwd'</>.
<literal>ALTER USER joe PASSWORD 'pwd'</>.
It is good practice not to send the original cleartext password in such a
It is good practice not to send the original cleartext password in such a
...
@@ -3589,7 +3589,7 @@ command, because it might be exposed in command logs, activity displays,
...
@@ -3589,7 +3589,7 @@ command, because it might be exposed in command logs, activity displays,
and so on. Instead, use this function to convert the password to encrypted
and so on. Instead, use this function to convert the password to encrypted
form before it is sent. The arguments are the cleartext password, and the SQL
form before it is sent. The arguments are the cleartext password, and the SQL
name of the user it is for. The return value is a malloc'd string, or NULL if
name of the user it is for. The return value is a malloc'd string, or NULL if
out-of-memory. The caller may assume the string doesn't contain any
weird
out-of-memory. The caller may assume the string doesn't contain any
special
characters that would require escaping. Use <function>PQfreemem</> to free
characters that would require escaping. Use <function>PQfreemem</> to free
the result when done with it.
the result when done with it.
</para>
</para>
...
...
src/bin/psql/command.c
View file @
6840cccd
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
*
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.15
7 2005/12/23 01:16:38 tgl
Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.15
8 2005/12/26 14:58:04 petere
Exp $
*/
*/
#include "postgres_fe.h"
#include "postgres_fe.h"
#include "command.h"
#include "command.h"
...
@@ -643,7 +643,7 @@ exec_command(const char *cmd,
...
@@ -643,7 +643,7 @@ exec_command(const char *cmd,
else
else
user
=
PQuser
(
pset
.
db
);
user
=
PQuser
(
pset
.
db
);
encrypted_password
=
pg_make_encrypted_p
assword
(
pw1
,
user
);
encrypted_password
=
PQencryptP
assword
(
pw1
,
user
);
if
(
!
encrypted_password
)
if
(
!
encrypted_password
)
{
{
...
...
src/bin/scripts/createuser.c
View file @
6840cccd
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.2
5 2005/12/23 01:16:38 tgl
Exp $
* $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.2
6 2005/12/26 14:58:05 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -251,7 +251,7 @@ main(int argc, char *argv[])
...
@@ -251,7 +251,7 @@ main(int argc, char *argv[])
{
{
char
*
encrypted_password
;
char
*
encrypted_password
;
encrypted_password
=
pg_make_encrypted_p
assword
(
newpassword
,
encrypted_password
=
PQencryptP
assword
(
newpassword
,
newuser
);
newuser
);
if
(
!
encrypted_password
)
if
(
!
encrypted_password
)
{
{
...
...
src/interfaces/libpq/exports.txt
View file @
6840cccd
# $PostgreSQL: pgsql/src/interfaces/libpq/exports.txt,v 1.
6 2005/12/23 01:16:38 tgl
Exp $
# $PostgreSQL: pgsql/src/interfaces/libpq/exports.txt,v 1.
7 2005/12/26 14:58:05 petere
Exp $
# Functions to be exported by libpq DLLs
# Functions to be exported by libpq DLLs
PQconnectdb 1
PQconnectdb 1
PQsetdbLogin 2
PQsetdbLogin 2
...
@@ -125,4 +125,4 @@ PQcancel 122
...
@@ -125,4 +125,4 @@ PQcancel 122
lo_create 123
lo_create 123
PQinitSSL 124
PQinitSSL 124
PQregisterThreadLock 125
PQregisterThreadLock 125
pg_make_encrypted_password
126
PQencryptPassword
126
src/interfaces/libpq/fe-auth.c
View file @
6840cccd
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.1
09 2005/12/23 01:16:38 tgl
Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.1
10 2005/12/26 14:58:05 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -534,7 +534,7 @@ pg_fe_getauthname(char *PQerrormsg)
...
@@ -534,7 +534,7 @@ pg_fe_getauthname(char *PQerrormsg)
/*
/*
*
pg_make_encrypted_p
assword -- exported routine to encrypt a password
*
PQencryptP
assword -- exported routine to encrypt a password
*
*
* This is intended to be used by client applications that wish to send
* This is intended to be used by client applications that wish to send
* commands like ALTER USER joe PASSWORD 'pwd'. The password need not
* commands like ALTER USER joe PASSWORD 'pwd'. The password need not
...
@@ -548,11 +548,11 @@ pg_fe_getauthname(char *PQerrormsg)
...
@@ -548,11 +548,11 @@ pg_fe_getauthname(char *PQerrormsg)
* is for.
* is for.
*
*
* Return value is a malloc'd string, or NULL if out-of-memory. The client
* Return value is a malloc'd string, or NULL if out-of-memory. The client
* may assume the string doesn't contain any
weird
characters that would
* may assume the string doesn't contain any
special
characters that would
* require escaping.
* require escaping.
*/
*/
char
*
char
*
pg_make_encrypted_p
assword
(
const
char
*
passwd
,
const
char
*
user
)
PQencryptP
assword
(
const
char
*
passwd
,
const
char
*
user
)
{
{
char
*
crypt_pwd
;
char
*
crypt_pwd
;
...
...
src/interfaces/libpq/libpq-fe.h
View file @
6840cccd
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.12
3 2005/12/23 01:16:38 tgl
Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.12
4 2005/12/26 14:58:06 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -497,7 +497,7 @@ extern int PQenv2encoding(void);
...
@@ -497,7 +497,7 @@ extern int PQenv2encoding(void);
/* === in fe-auth.c === */
/* === in fe-auth.c === */
extern
char
*
pg_make_encrypted_p
assword
(
const
char
*
passwd
,
const
char
*
user
);
extern
char
*
PQencryptP
assword
(
const
char
*
passwd
,
const
char
*
user
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment