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

Gost yescrypt may fail to build on some older versions of glibc. #4588

Closed
Firstyear opened this issue Feb 2, 2021 · 3 comments · Fixed by #4589
Closed

Gost yescrypt may fail to build on some older versions of glibc. #4588

Firstyear opened this issue Feb 2, 2021 · 3 comments · Fixed by #4589

Comments

@Firstyear
Copy link
Contributor

Issue Description

/home/william/development/389ds/ds/ldap/servers/plugins/pwdstorage/gost_yescrypt.c:23:12: warning: implicit declaration of function 'crypt_rn' is invalid in C99 [-Wimplicit-function-declaration]
    hash = crypt_rn(userpwd, dbpwd, &output, (int) sizeof(output));
           ^
/home/william/development/389ds/ds/ldap/servers/plugins/pwdstorage/gost_yescrypt.c:23:10: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
    hash = crypt_rn(userpwd, dbpwd, &output, (int) sizeof(output));
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/william/development/389ds/ds/ldap/servers/plugins/pwdstorage/gost_yescrypt.c:41:15: error: use of undeclared identifier 'CRYPT_GENSALT_OUTPUT_SIZE'
    char salt[CRYPT_GENSALT_OUTPUT_SIZE];
              ^
/home/william/development/389ds/ds/ldap/servers/plugins/pwdstorage/gost_yescrypt.c:47:10: warning: implicit declaration of function 'crypt_gensalt_rn' is invalid in C99 [-Wimplicit-function-declaration]
    if (!crypt_gensalt_rn(prefix, 0, ((void*)0), 0, salt, (int) sizeof(salt))) {
         ^
/home/william/development/389ds/ds/ldap/servers/plugins/pwdstorage/gost_yescrypt.c:53:12: warning: implicit declaration of function 'crypt_rn' is invalid in C99 [-Wimplicit-function-declaration]
    hash = crypt_rn(pwd, salt, &output, (int) sizeof(output));
           ^
4 warnings and 1 error generated.

This appears to be due to missing defines in crypt.h on older glibc.

Package Version and Platform:
SLE 15.2 glibc-2.26-13.51.1.x86_64

does not affect SUSE TW glibc-2.32-4.1.x86_64

@Firstyear Firstyear added the needs triage The issue will be triaged during scrum label Feb 2, 2021
@Firstyear
Copy link
Contributor Author

Ahhhh it's not crypt versions, it's that tw has xcrypt.

Firstyear added a commit to Firstyear/389-ds-base that referenced this issue Feb 2, 2021
Bug Description: If xcrypt is not available, especially on some
distros with older libraries, 389 was unable to build.

Fix Description: Detect if we have xcrypt, and if not, add
stubs that always error instead.

fixes: 389ds#4588

Author: William Brown <william@blackhats.net.au>

Review by: @progier389, @jchapma, @droideck (Thanks!)
Firstyear added a commit that referenced this issue Feb 2, 2021
Bug Description: If xcrypt is not available, especially on some
distros with older libraries, 389 was unable to build.

Fix Description: Detect if we have xcrypt, and if not, add
stubs that always error instead.

fixes: #4588

Author: William Brown <william@blackhats.net.au>

Review by: @progier389, @jchapma, @droideck (Thanks!)
@mreynolds389 mreynolds389 removed the needs triage The issue will be triaged during scrum label Feb 11, 2021
Firstyear added a commit that referenced this issue Mar 2, 2021
Bug Description: If xcrypt is not available, especially on some
distros with older libraries, 389 was unable to build.

Fix Description: Detect if we have xcrypt, and if not, add
stubs that always error instead.

fixes: #4588

Author: William Brown <william@blackhats.net.au>

Review by: @progier389, @jchapma, @droideck (Thanks!)
Firstyear added a commit that referenced this issue Mar 2, 2021
Bug Description: If xcrypt is not available, especially on some
distros with older libraries, 389 was unable to build.

Fix Description: Detect if we have xcrypt, and if not, add
stubs that always error instead.

fixes: #4588

Author: William Brown <william@blackhats.net.au>

Review by: @progier389, @jchapma, @droideck (Thanks!)
@Firstyear
Copy link
Contributor Author

   65a551298..3fc16cccf  389-ds-base-1.4.4 -> 389-ds-base-1.4.4
   44ba82dee..b9b2cccb4  389-ds-base-1.4.3 -> 389-ds-base-1.4.3

Apparently I forgot to cherry pick this to the relevant branches :( better late than never.

aadhikar added a commit to aadhikar/389-ds-base that referenced this issue Aug 10, 2022
…f glibc

Description: Fixed the test case for older version, also fixed another test
case which had wrong attribute name: telephonenumber

Relates: 389ds#4588

Reviewed by: @bsimonova (Thanks!)
bsimonova pushed a commit that referenced this issue Aug 10, 2022
…f glibc

Description: Fixed the test case for older version, also fixed another test
case which had wrong attribute name: telephonenumber

Relates: #4588

Reviewed by: @bsimonova (Thanks!)
@tbordaz
Copy link
Contributor

tbordaz commented Aug 10, 2022

f7b56cb..0f1f3d4 389-ds-base-1.4.3

mreynolds389 pushed a commit that referenced this issue Sep 15, 2022
…f glibc

Description: Fixed the test case for older version, also fixed another test
case which had wrong attribute name: telephonenumber

Relates: #4588

Reviewed by: @bsimonova (Thanks!)
mreynolds389 pushed a commit that referenced this issue Sep 15, 2022
…f glibc

Description: Fixed the test case for older version, also fixed another test
case which had wrong attribute name: telephonenumber

Relates: #4588

Reviewed by: @bsimonova (Thanks!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants