Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socket module missing audit events #84302

Closed
zooba opened this issue Mar 30, 2020 · 8 comments
Closed

socket module missing audit events #84302

zooba opened this issue Mar 30, 2020 · 8 comments
Assignees
Labels
3.8 only security fixes 3.9 only security fixes type-bug An unexpected behavior, bug, or error

Comments

@zooba
Copy link
Member

zooba commented Mar 30, 2020

BPO 40121
Nosy @vstinner, @zooba, @miss-islington
PRs
  • bpo-40121: Fixes audit events raised on creating a new socket #19238
  • [3.8] bpo-40121: Fixes audit event raised on creating a new socket (GH-19238) #19241
  • bpo-40121: Fix exception type in test #19267
  • [3.8] bpo-40121: Fix exception type in test (GH-19267) #19275
  • [3.8] bpo-40121: Fix exception type in test (GH-19267) #19276
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/zooba'
    closed_at = <Date 2020-04-01.08:39:16.633>
    created_at = <Date 2020-03-30.21:31:39.464>
    labels = ['type-bug', '3.8', '3.9']
    title = 'socket module missing audit events'
    updated_at = <Date 2020-04-01.13:03:03.219>
    user = 'https://github.com/zooba'

    bugs.python.org fields:

    activity = <Date 2020-04-01.13:03:03.219>
    actor = 'miss-islington'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2020-04-01.08:39:16.633>
    closer = 'steve.dower'
    components = []
    creation = <Date 2020-03-30.21:31:39.464>
    creator = 'steve.dower'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40121
    keywords = ['patch']
    message_count = 8.0
    messages = ['365356', '365360', '365379', '365380', '365384', '365437', '365453', '365461']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'steve.dower', 'miss-islington']
    pr_nums = ['19238', '19241', '19267', '19275', '19276']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue40121'
    versions = ['Python 3.8', 'Python 3.9']

    @zooba
    Copy link
    Member Author

    zooba commented Mar 30, 2020

    Some of the events it was supposed to raise are not being raised.

    This is likely my fault for not adding the thorough testing in the test suite at the time (I'm uncovering them now with a different test suite...)

    I'll do a thorough review of this module and post a PR with the fixes. This shouldn't require any new events, as far as I can tell.

    @zooba zooba added 3.8 only security fixes 3.9 only security fixes labels Mar 30, 2020
    @zooba zooba self-assigned this Mar 30, 2020
    @zooba zooba added type-bug An unexpected behavior, bug, or error 3.8 only security fixes 3.9 only security fixes labels Mar 30, 2020
    @zooba zooba self-assigned this Mar 30, 2020
    @zooba zooba added the type-bug An unexpected behavior, bug, or error label Mar 30, 2020
    @zooba
    Copy link
    Member Author

    zooba commented Mar 30, 2020

    In my defense(?), it was working fine everywhere except Windows. And I'm pretty sure I was working in WSL for this change *shrug*

    With the PR, it will match the documentation.

    @zooba
    Copy link
    Member Author

    zooba commented Mar 31, 2020

    New changeset 63ba5cc by Steve Dower in branch 'master':
    bpo-40121: Fixes audit event raised on creating a new socket (GH-19238)
    63ba5cc

    @zooba zooba closed this as completed Mar 31, 2020
    @zooba zooba closed this as completed Mar 31, 2020
    @miss-islington
    Copy link
    Contributor

    New changeset 6a0ee60 by Miss Islington (bot) in branch '3.8':
    bpo-40121: Fixes audit event raised on creating a new socket (GH-19238)
    6a0ee60

    @vstinner
    Copy link
    Member

    s390x Fedora 3.x buildbot is unhappy:
    https://buildbot.python.org/all/#/builders/336/builds/328

    ======================================================================
    FAIL: test_socket (test.test_audit.AuditTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z/build/Lib/test/test_audit.py", line 125, in test_socket
        self.fail(stderr)
    AssertionError
    
    Stderr:
    Traceback (most recent call last):
      File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z/build/Lib/test/audit-tests.py", line 345, in test_socket
        sock.bind(('127.0.0.1', 8080))
    OSError: [Errno 98] Address already in use
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z/build/Lib/test/audit-tests.py", line 358, in <module>
        globals()[test]()
      File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z/build/Lib/test/audit-tests.py", line 346, in test_socket
        except error:
    NameError: name 'error' is not defined

    @vstinner vstinner reopened this Mar 31, 2020
    @vstinner vstinner reopened this Mar 31, 2020
    @zooba
    Copy link
    Member Author

    zooba commented Mar 31, 2020

    Thanks, Victor!

    @zooba
    Copy link
    Member Author

    zooba commented Apr 1, 2020

    New changeset 3ef4a7e by Steve Dower in branch 'master':
    bpo-40121: Fix exception type in test (GH-19267)
    3ef4a7e

    @zooba zooba closed this as completed Apr 1, 2020
    @zooba zooba closed this as completed Apr 1, 2020
    @miss-islington
    Copy link
    Contributor

    New changeset f971c8c by Miss Islington (bot) in branch '3.8':
    bpo-40121: Fix exception type in test (GH-19267)
    f971c8c

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes 3.9 only security fixes type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants