Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: pgaudit/set_user
base: REL2_0_0
Choose a base ref
head repository: pgaudit/set_user
compare: REL2_0_1
Choose a head ref
  • 8 commits
  • 7 files changed
  • 1 contributor

Commits on May 27, 2021

  1. Block RESET SESSION AUTHORIZATION after set_user()

    Calls to set_user imply that we are now using set_user to manage
    role-related session variables. Previously we blocked `RESET ROLE`, but
    it looks like we missed `RESET SESSION AUTHORIZATION`.
    
    Update regression tests to check for all `reset_user()` variants.
    mpalmi committed May 27, 2021
  2. Drop invalid RESET USER check

    The `RESET USER` syntax is invalid and the associated check is just
    extra SLOC.
    mpalmi committed May 27, 2021

Commits on Jun 3, 2021

  1. Update SET/RESET block error messages

    Since the block covers both `SET` and `RESET` cases for both `ROLE` and
    `SESSION AUTHORIZATION`, update the error message to be a bit more accurate.
    
    Update the regression tests and move reset_user() so we can verify the output
    of an invalid `RESET SESSION AUTHORIZATION` after error.
    mpalmi committed Jun 3, 2021
  2. Add multiple set_user calls to test

    Multiple successive calls to set_user should fail. Add a test and update the
    corresponding expected output.
    mpalmi committed Jun 3, 2021
  3. Add results dir to .gitignore

    mpalmi committed Jun 3, 2021

Commits on Jun 7, 2021

  1. Fix deprecated GUC handling

    Update deprecated GUC macros to follow the guidelines in
    src/backend/utils/misc/README (re: check_hook):
    
     > If the function wishes to replace a string value, it must malloc (not
     palloc) the replacement value, and be sure to free() the previous
     value.
    
    In this case, the free() is carried out by `set_string_field`, so it is
    unnecessary in the check_hook. A free in the check_hook results in an
    invalid free when running under valgrind.
    
    Create tighter constraints on the deprecation NOTICEs, such that they're
    only displayed for non-default deprecated GUC settings and only once.
    
    Remove GUCs from `show all` by using `GUC_NO_SHOW_ALL`. Previously we were
    unable to filter out the deprecated GUC, since the show_hook was hit during
    autocompletion, even when the GUC was marked with the no show flag.
    
    Update the set_user README to reflect changes.
    
    This commit should address #32.
    mpalmi committed Jun 7, 2021

Commits on Aug 5, 2021

  1. Fix invalid include on PG_VERSION < 10

    deprecated_gucs.h explicitly includes a header that is not necessary.
    Drop it so we can support postgres version 9.6 and lower.
    mpalmi committed Aug 5, 2021
  2. Get rid of deprecated GUCs output in test

    Deprecation GUC notices should only be displayed whenever non-default
    values exist in postgresql.*.conf. Since we can't be certain of these
    values during a regression test invocation, just skip checking
    altogether.
    mpalmi committed Aug 5, 2021