~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to src/include/utils/rel.h

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-02-05 18:13:52 UTC
  • mfrom: (1.1.10) (10.1.5 oneiric-proposed)
  • Revision ID: package-import@ubuntu.com-20130205181352-3kw4f94ilqklzm7c
Tags: 9.1.8-0ubuntu11.10
* New upstream security/bug fix release: (LP: #1116336)
  - Prevent execution of enum_recv from SQL
    The function was misdeclared, allowing a simple SQL command to crash the
    server.  In principle an attacker might be able to use it to examine the
    contents of server memory.  Our thanks to Sumit Soni (via Secunia SVCRP)
    for reporting this issue. (CVE-2013-0255)
  - See HISTORY/changelog.gz for the other bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
        bool            rd_isvalid;             /* relcache entry is valid */
138
138
        char            rd_indexvalid;  /* state of rd_indexlist: 0 = not valid, 1 =
139
139
                                                                 * valid, 2 = temporarily forced */
 
140
        bool            rd_islocaltemp; /* rel is a temp rel of this session */
140
141
 
141
142
        /*
142
143
         * rd_createSubid is the ID of the highest subtransaction the rel has
406
407
        ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
407
408
 
408
409
/*
409
 
 * RelationUsesTempNamespace
410
 
 *              True if relation's catalog entries live in a private namespace.
411
 
 */
412
 
#define RelationUsesTempNamespace(relation) \
413
 
        ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
414
 
 
415
 
/*
416
410
 * RELATION_IS_LOCAL
417
411
 *              If a rel is either temp or newly created in the current transaction,
418
 
 *              it can be assumed to be visible only to the current backend.
 
412
 *              it can be assumed to be accessible only to the current backend.
 
413
 *              This is typically used to decide that we can skip acquiring locks.
419
414
 *
420
415
 * Beware of multiple eval of argument
421
416
 */
422
417
#define RELATION_IS_LOCAL(relation) \
423
 
        ((relation)->rd_backend == MyBackendId || \
 
418
        ((relation)->rd_islocaltemp || \
424
419
         (relation)->rd_createSubid != InvalidSubTransactionId)
425
420
 
426
421
/*
430
425
 * Beware of multiple eval of argument
431
426
 */
432
427
#define RELATION_IS_OTHER_TEMP(relation) \
433
 
        ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP \
434
 
        && (relation)->rd_backend != MyBackendId)
 
428
        ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP && \
 
429
         !(relation)->rd_islocaltemp)
435
430
 
436
431
/* routines in utils/cache/relcache.c */
437
432
extern void RelationIncrementReferenceCount(Relation rel);