Mikheev, Vadim writes:

> Yes, there should be permission checking - I'll add it later (in 7.1)
> if no one else.

Should be simple enough.  Is this okay:

Index: utility.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/tcop/utility.c,v
retrieving revision 1.105
diff -c -r1.105 utility.c
*** utility.c   2001/01/05 06:34:20     1.105
--- utility.c   2001/01/25 16:40:40
***************
*** 18,23 ****
--- 18,24 ----

  #include "access/heapam.h"
  #include "catalog/catalog.h"
+ #include "catalog/pg_shadow.h"
  #include "commands/async.h"
  #include "commands/cluster.h"
  #include "commands/command.h"
***************
*** 851,856 ****
--- 852,859 ----
                        {
                                set_ps_display(commandTag = "CHECKPOINT");

+                               if (!superuser())
+                                       elog(ERROR, "permission denied");
                                CreateCheckPoint(false);
                        }
                        break;


-- 
Peter Eisentraut      [EMAIL PROTECTED]       http://yi.org/peter-e/

Reply via email to