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

#55185 pdbedit module should check for version 4.8.x or newer #55894

Merged
merged 3 commits into from
Mar 10, 2020
Merged

#55185 pdbedit module should check for version 4.8.x or newer #55894

merged 3 commits into from
Mar 10, 2020

Conversation

sjorge
Copy link
Contributor

@sjorge sjorge commented Jan 16, 2020

What does this PR do?

The __virtual__ function of the pdbedit module now adds a version check to make sure we are running pdbedit 4.8.0 newer. Older versions have incompatible output and missing fields this module uses.

What issues does this PR fix or reference?

#55185

Previous Behavior

pdbedit module (and state which checks the module is available) would load, resulting in exceptions when trying to parse the output.

New Behavior

pdbedit module does not load when an older version of pdbedit is encountered

Tests written?

Yes

Commits signed with GPG?

No

@sjorge sjorge requested a review from a team as a code owner January 16, 2020 21:44
@ghost ghost requested a review from xeacott January 16, 2020 21:44
@sjorge
Copy link
Contributor Author

sjorge commented Jan 16, 2020

Some minor additional testing done, I verified that the module still works after adding the extra version check.

[cronos :: sjorge][/salt/states/.extmods/_modules][master ✗]
[.]$ salt atlas saltutil.sync_all
atlas:
    ----------
    beacons:
    clouds:
    engines:
    grains:
    log_handlers:
    matchers:
    modules:
        - modules.pdbedit
    output:
    proxymodules:
    renderers:
    returners:
    sdb:
    serializers:
    states:
    thorium:
    utils:
[cronos :: sjorge][/salt/states/.extmods/_modules][master ✗]
[.]$ salt atlas pdbedit.list
atlas:
    ----------
    user1:
        ----------
        account desc:
        account flags:
            [U          ]
        bad password count:
            0
        domain:
            ATLAS
        full name:
            User One
        home directory:
            \\atlas\user1
        homedir drive:
        kickoff time:
            Wed, 06 Feb 2036 16:06:39 CET
        last bad password:
            0
        logoff time:
            Wed, 06 Feb 2036 16:06:39 CET
        logon hours:
            FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
        logon script:
        logon time:
            0
        munged dial:
        nt username:
        password can change:
            Wed, 24 Oct 2018 20:05:20 CEST
        password last set:
            Wed, 24 Oct 2018 20:05:20 CEST
        password must change:
            never
        primary group sid:
            S-1-5-00-000000000-0000000000-0000000000-001
        profile path:
            \\atlas\user1\profile
        unix username:
            user1
        user sid:
            S-1-5-00-000000000-0000000000-0000000000-0002
        workstations:
    user2:
        ----------
        account desc:
        account flags:
            [U          ]
        bad password count:
            0
        domain:
            ATLAS
        full name:
            User Two
        home directory:
            \\atlas\user2
        homedir drive:
        kickoff time:
            Wed, 06 Feb 2036 16:06:39 CET
        last bad password:
            0
        logoff time:
            Wed, 06 Feb 2036 16:06:39 CET
        logon hours:
            FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
        logon script:
        logon time:
            0
        munged dial:
        nt username:
        password can change:
            Wed, 30 Oct 2019 09:47:39 CET
        password last set:
            Wed, 30 Oct 2019 09:47:39 CET
        password must change:
            never
        primary group sid:
            S-1-5-00-000000000-0000000000-0000000000-001
        profile path:
            \\atlas\user2\profile
        unix username:
            user2
        user sid:
            S-1-5-00-000000000-0000000000-0000000000-0001
        workstations:

Note, I did edit anonymize the sid/gid and username

salt/modules/pdbedit.py Outdated Show resolved Hide resolved
@sjorge
Copy link
Contributor Author

sjorge commented Jan 17, 2020

@Ch3LL you can kick jenkins, macosx test fails seem not related

@sjorge
Copy link
Contributor Author

sjorge commented Mar 4, 2020

@Ch3LL bump

@Ch3LL Ch3LL added the v3000.1 vulnerable version label Mar 5, 2020
@dwoz dwoz merged commit 1fa8555 into saltstack:master Mar 10, 2020
@sjorge sjorge deleted the pdbedit_55185 branch March 13, 2020 22:05
@sagetherage sagetherage added ZRelease-Sodium retired label and removed ZRelease-Sodium retired label labels May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3000.1 vulnerable version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants