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
b5fe16d0
Commit
b5fe16d0
authored
Feb 24, 2006
by
Andrew Dunstan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make initdb -U username work as advertised; back out bogus patch at rev 1.42
and supply real fix for problem it tried to address.
parent
f87d4875
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+10
-10
No files found.
src/bin/initdb/initdb.c
View file @
b5fe16d0
...
...
@@ -42,7 +42,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.11
0 2006/02/18 16:15:23 petere
Exp $
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.11
1 2006/02/24 00:55:49 adunstan
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -113,7 +113,6 @@ static char *conversion_file;
static
char
*
info_schema_file
;
static
char
*
features_file
;
static
char
*
system_views_file
;
static
char
*
effective_user
;
static
bool
made_new_pgdata
=
false
;
static
bool
found_existing_pgdata
=
false
;
static
char
infoversion
[
100
];
...
...
@@ -1385,7 +1384,7 @@ bootstrap_template1(char *short_version)
exit_nicely
();
}
bki_lines
=
replace_token
(
bki_lines
,
"POSTGRES"
,
effective_user
);
bki_lines
=
replace_token
(
bki_lines
,
"POSTGRES"
,
username
);
bki_lines
=
replace_token
(
bki_lines
,
"ENCODING"
,
encodingid
);
...
...
@@ -1547,7 +1546,7 @@ get_set_pwd(void)
PG_CMD_OPEN
;
PG_CMD_PRINTF2
(
"ALTER USER
\"
%s
\"
WITH PASSWORD '%s';
\n
"
,
effective_user
,
pwd1
);
username
,
pwd1
);
PG_CMD_CLOSE
;
...
...
@@ -1866,7 +1865,7 @@ setup_privileges(void)
PG_CMD_OPEN
;
priv_lines
=
replace_token
(
privileges_setup
,
"$POSTGRES_SUPERUSERNAME"
,
effective_user
);
"$POSTGRES_SUPERUSERNAME"
,
username
);
for
(
line
=
priv_lines
;
*
line
!=
NULL
;
line
++
)
PG_CMD_PUTS
(
*
line
);
...
...
@@ -2446,6 +2445,7 @@ main(int argc, char *argv[])
ret
;
int
option_index
;
char
*
short_version
;
char
*
effective_user
;
char
*
pgdenv
;
/* PGDATA value gotten from and sent to
* environment */
char
bin_dir
[
MAXPGPATH
];
...
...
@@ -2735,10 +2735,10 @@ main(int argc, char *argv[])
exit
(
1
);
}
if
(
strlen
(
username
))
effective_user
=
username
;
else
effective_user
=
get_id
();
if
(
strlen
(
username
)
==
0
)
username
=
effective_user
;
if
(
strlen
(
encoding
))
encodingid
=
get_encoding_id
(
encoding
);
...
...
@@ -2767,7 +2767,7 @@ main(int argc, char *argv[])
"PG_HBA_SAMPLE=%s
\n
PG_IDENT_SAMPLE=%s
\n
"
,
PG_VERSION
,
pg_data
,
share_path
,
bin_path
,
effective_user
,
bki_file
,
username
,
bki_file
,
desc_file
,
shdesc_file
,
conf_file
,
hba_file
,
ident_file
);
...
...
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