Skip to content

configure check for HAVE_CRYPT_R is wrong #89966

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

Closed
tiran opened this issue Nov 15, 2021 · 4 comments
Closed

configure check for HAVE_CRYPT_R is wrong #89966

tiran opened this issue Nov 15, 2021 · 4 comments
Labels
3.11 only security fixes type-bug An unexpected behavior, bug, or error

Comments

@tiran
Copy link
Member

tiran commented Nov 15, 2021

BPO 45808
Nosy @tiran
PRs
  • bpo-45808: Fix check for crypt_r on platforms without crypt.h #29563
  • 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 = None
    closed_at = None
    created_at = <Date 2021-11-15.15:41:05.271>
    labels = ['type-bug', '3.11']
    title = 'configure check for HAVE_CRYPT_R is wrong'
    updated_at = <Date 2021-11-15.15:52:50.230>
    user = 'https://github.com/tiran'

    bugs.python.org fields:

    activity = <Date 2021-11-15.15:52:50.230>
    actor = 'christian.heimes'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = []
    creation = <Date 2021-11-15.15:41:05.271>
    creator = 'christian.heimes'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45808
    keywords = ['patch']
    message_count = 2.0
    messages = ['406352', '406353']
    nosy_count = 1.0
    nosy_names = ['christian.heimes']
    pr_nums = ['29563']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45808'
    versions = ['Python 3.11']

    @tiran
    Copy link
    Member Author

    tiran commented Nov 15, 2021

    The configure check for HAVE_CRYPT_R assumes that all platforms have <crypt.h>. Some platforms like FreeBSD don't have <crypt.h> at all. Instead the crypt_r() prototype is defined in <unistd.h>.

    @tiran tiran added 3.11 only security fixes type-bug An unexpected behavior, bug, or error labels Nov 15, 2021
    @tiran
    Copy link
    Member Author

    tiran commented Nov 15, 2021

    https://www.freebsd.org/cgi/man.cgi?crypt(3)

    LIBRARY
    Crypt Library (libcrypt, -lcrypt)

    SYNOPSIS
         #include <unistd.h>
    
         char *
         crypt(const char *key, const char *salt);

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @gstein
    Copy link

    gstein commented Sep 11, 2022

    Isn't the crypt module deprecated for 3.11 ?

    @erlend-aasland
    Copy link
    Contributor

    Isn't the crypt module deprecated for 3.11 ?

    Yes, it was deprecated in 3.11, and is now removed. Also, this issue was resolved by gh-29725.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants