Unix Technical Forum

DBLink's default user: postgres

This is a discussion on DBLink's default user: postgres within the pgsql Hackers forums, part of the PostgreSQL category; --> Is this the regular behavior on DBLink? rot=> SELECT user, current_database(); current_user | current_database --------------+------------------ sa_rot | rot (1 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 10:28 PM
Rodrigo Hjort
 
Posts: n/a
Default DBLink's default user: postgres

Is this the regular behavior on DBLink?

rot=> SELECT user, current_database();
current_user | current_database
--------------+------------------
sa_rot | rot
(1 registro)

rot=> SELECT *
rot-> FROM dblink('dbname=escola',
rot(> 'SELECT user, current_database()')
rot-> AS (usr name, db name);
usr | db
----------+--------
postgres | escola
(1 registro)

This way, I fear DBLink functions should become a vulnerability issue on my
database.
Is there any way to protect or override this setting? Or it should be done
on pg_hba.conf only?

--
Regards,

Rodrigo Hjort
http://icewall.org/~hjort

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 10:28 PM
Tommy Gildseth
 
Posts: n/a
Default Re: DBLink's default user: postgres

Rodrigo Hjort wrote:
> Is this the regular behavior on DBLink?
>
> rot=> SELECT user, current_database();
> current_user | current_database
> --------------+------------------
> sa_rot | rot
> (1 registro)
>
> rot=> SELECT *
> rot-> FROM dblink('dbname=escola',
> rot(> 'SELECT user, current_database()')
> rot-> AS (usr name, db name);
> usr | db
> ----------+--------
> postgres | escola
> (1 registro)
>
> This way, I fear DBLink functions should become a vulnerability issue
> on my database.
> Is there any way to protect or override this setting? Or it should be
> done on pg_hba.conf only?


This issue has been thoroughly discussed before. You can read more about
it in f.ex these threads:
http://archives.postgresql.org/pgsql...6/msg00678.php

http://archives.postgresql.org/pgsql...7/msg00000.php

--
Tommy Gildseth


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:16 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com