Subject: Re: Using Postgres from Unix and security

From: Stuart Pook <[email-masked]>
Date: Wed, 06 May 92 11:28:51 +0200

> > I have compiled and installed postgres, run initdb, launched a
> > postmaster, and created a database called foo.  I have not run createuser.
> > I find that any user can run "/usr/postgres/bin/monitor foo" and change
> > the contents of the database foo.  This behaviour does not seem to agree
> > with the documentation cited above.  Am I confused?
> 
> No, this isn't supposed to happen.  What machine do you use?

I am using a Sun SPARC.  I compiled the programs on a SPARC running
SunOS 4.1.1 with various patches, I am running the postmaster on another
SPARC running SunOS 4.1.2, and another user using /usr/postgres/bin/monitor
on the original machine can use and change the database foo.

Should I be able to control the access to each database individually or only
to postgres (ie all the databases) as a whole?

I have just received some mail from [email-masked], he says:
> I don't know about other platforms,
> but it is a serious detriment to doing "real" work with postgres.  Anyone
> can maliciously delete all of your data. Is there any chance this will be
> fixed in the upcoming release?
I agree; a fix is urgently needed.  Does this problem not occur on other
platforms?

Stuart Pook

---

From: Stuart Pook <[email-masked]>
Date: Wed, 06 May 92 14:50:34 +0200

> No, this isn't supposed to happen.  What machine do you use?

This letter is an addition to my previous letter.  On my Sun SPARC
createdb seems to understand that the unix user "slp" is not
authorised to connect to postgres but the monitor allows slp to
read (and modify) the database "foo".  The following demonstrates this:

$ cd /usr/postgres/bin
$ ./createdb bar
WARN:May  6 14:41:45:No pg_user tuple for slp
 
./createdb: database creation failed on bar.
$ ./monitor foo
Welcome to the C POSTGRES terminal monitor

Go 
* retrieve (dummy.all) \g

Query sent to backend is "retrieve (dummy.all) "
-----------------------------
| n           | m           |
-----------------------------
| 6           | 5           |
-----------------------------

Go 
*