*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.54 2002/02/18 23:11:07 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.55 2002/03/02 21:39:22 momjian Exp $
*
* NOTES
* See acl.h.
int i;
AclItem *aip;
- elog(DEBUG, "acl size = %d, # acls = %d",
+ elog(LOG, "acl size = %d, # acls = %d",
ACL_SIZE(acl), ACL_NUM(acl));
aip = ACL_DAT(acl);
for (i = 0; i < ACL_NUM(acl); ++i)
- elog(DEBUG, " acl[%d]: %s", i,
+ elog(LOG, " acl[%d]: %s", i,
DatumGetCString(DirectFunctionCall1(aclitemout,
PointerGetDatum(aip + i))));
}
Oid argoids[FUNC_MAX_ARGS];
int i;
int16 argcount;
-
+
MemSet(argoids, 0, FUNC_MAX_ARGS * sizeof(Oid));
argcount = length(arguments);
if (argcount > FUNC_MAX_ARGS)
{
TypeName *t = (TypeName *) lfirst(arguments);
char *typnam = TypeNameToInternalName(t);
-
+
arguments = lnext(arguments);
-
+
if (strcmp(typnam, "opaque") == 0)
argoids[i] = InvalidOid;
else
func_error(NULL, name, argcount, argoids, NULL);
return oid;
-}
+}
static void
*/
if (!acl)
{
- elog(DEBUG, "aclcheck: null ACL, returning OK");
+ elog(LOG, "aclcheck: null ACL, returning OK");
return ACLCHECK_OK;
}
*/
if (num < 1)
{
- elog(DEBUG, "aclcheck: zero-length ACL, returning OK");
+ elog(LOG, "aclcheck: zero-length ACL, returning OK");
return ACLCHECK_OK;
}
if (aidat->ai_mode & mode)
{
#ifdef ACLDEBUG
- elog(DEBUG, "aclcheck: using world=%d", aidat->ai_mode);
+ elog(LOG, "aclcheck: using world=%d", aidat->ai_mode);
#endif
return ACLCHECK_OK;
}
if (aip->ai_id == id)
{
#ifdef ACLDEBUG
- elog(DEBUG, "aclcheck: found user %u/%d",
+ elog(LOG, "aclcheck: found user %u/%d",
aip->ai_id, aip->ai_mode);
#endif
if (aip->ai_mode & mode)
if (in_group(id, aip->ai_id))
{
#ifdef ACLDEBUG
- elog(DEBUG, "aclcheck: found group %u/%d",
+ elog(LOG, "aclcheck: found group %u/%d",
aip->ai_id, aip->ai_mode);
#endif
return ACLCHECK_OK;
if (aip->ai_id == id)
{
#ifdef ACLDEBUG
- elog(DEBUG, "aclcheck: found group %u/%d",
+ elog(LOG, "aclcheck: found group %u/%d",
aip->ai_id, aip->ai_mode);
#endif
if (aip->ai_mode & mode)
!((Form_pg_shadow) GETSTRUCT(tuple))->usecatupd)
{
#ifdef ACLDEBUG
- elog(DEBUG, "pg_aclcheck: catalog update to \"%s\": permission denied",
+ elog(LOG, "pg_aclcheck: catalog update to \"%s\": permission denied",
relname);
#endif
ReleaseSysCache(tuple);
if (((Form_pg_shadow) GETSTRUCT(tuple))->usesuper)
{
#ifdef ACLDEBUG
- elog(DEBUG, "pg_aclcheck: \"%s\" is superuser",
+ elog(LOG, "pg_aclcheck: \"%s\" is superuser",
usename);
#endif
ReleaseSysCache(tuple);
if (((Form_pg_shadow) GETSTRUCT(tuple))->usesuper)
{
#ifdef ACLDEBUG
- elog(DEBUG, "pg_ownercheck: user \"%s\" is superuser",
+ elog(LOG, "pg_ownercheck: user \"%s\" is superuser",
usename);
#endif
ReleaseSysCache(tuple);
if (((Form_pg_shadow) GETSTRUCT(tuple))->usesuper)
{
#ifdef ACLDEBUG
- elog(DEBUG, "pg_ownercheck: user \"%s\" is superuser",
+ elog(LOG, "pg_ownercheck: user \"%s\" is superuser",
usename);
#endif
ReleaseSysCache(tuple);
if (((Form_pg_shadow) GETSTRUCT(tuple))->usesuper)
{
#ifdef ACLDEBUG
- elog(DEBUG, "pg_ownercheck: user \"%s\" is superuser",
+ elog(LOG, "pg_ownercheck: user \"%s\" is superuser",
usename);
#endif
ReleaseSysCache(tuple);
if (((Form_pg_shadow) GETSTRUCT(tuple))->usesuper)
{
#ifdef ACLDEBUG
- elog(DEBUG, "pg_aggr_ownercheck: user \"%s\" is superuser",
+ elog(LOG, "pg_aggr_ownercheck: user \"%s\" is superuser",
usename);
#endif
ReleaseSysCache(tuple);