From: Ludovic R. <no...@gi...> - 2019-05-17 13:56:26
|
Branch: refs/heads/master Home: https://github.com/OpenSC/pam_pkcs11 Commit: 1b30b37d67bb150a2b663c61637199b09d84eceb https://github.com/OpenSC/pam_pkcs11/commit/1b30b37d67bb150a2b663c61637199b09d84eceb Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/tools/card_eventmgr.c Log Message: ----------- Fix compiler warning card_eventmgr.c: In function ‘main’: card_eventmgr.c:336:8: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘pid_t’ {aka ‘int’} [-Wformat=] DBG1("Killing process: %ld", pid); ^~~~~~~~~~~~~~~~~~~~~~ ~~~ Commit: 1ea8cd0c1371cd51d83ab9001a219a514cce8920 https://github.com/OpenSC/pam_pkcs11/commit/1ea8cd0c1371cd51d83ab9001a219a514cce8920 Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/pam_pkcs11/pam_pkcs11.c Log Message: ----------- Fix potential buffer overflow by 1 pam_pkcs11.c:753:34: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] "PKCS11_LOGIN_TOKEN_NAME=%.*s", ^ pam_pkcs11.c:752:3: note: ‘snprintf’ output between 25 and 256 bytes into a destination of size 255 snprintf(env_temp, sizeof(env_temp) - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "PKCS11_LOGIN_TOKEN_NAME=%.*s", ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (int)((sizeof(env_temp) - 1) - strlen("PKCS11_LOGIN_TOKEN_NAME=")), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ get_slot_tokenlabel(ph)); ~~~~~~~~~~~~~~~~~~~~~~~~ pam_pkcs11.c:770:35: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] "PKCS11_LOGIN_CERT_ISSUER=%.*s", ^ pam_pkcs11.c:769:5: note: ‘snprintf’ output between 26 and 256 bytes into a destination of size 255 snprintf(env_temp, sizeof(env_temp) - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "PKCS11_LOGIN_CERT_ISSUER=%.*s", ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (int)((sizeof(env_temp) - 1) - strlen("PKCS11_LOGIN_CERT_ISSUER=")), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ issuer[0]); ~~~~~~~~~~ pam_pkcs11.c:792:35: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] "PKCS11_LOGIN_CERT_SERIAL=%.*s", ^ pam_pkcs11.c:791:5: note: ‘snprintf’ output between 26 and 256 bytes into a destination of size 255 snprintf(env_temp, sizeof(env_temp) - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "PKCS11_LOGIN_CERT_SERIAL=%.*s", ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (int)((sizeof(env_temp) - 1) - strlen("PKCS11_LOGIN_CERT_SERIAL=")), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ serial[0]); ~~~~~~~~~~ Commit: 6583c2c891c32dbebecbca85aa56093f0b13b4eb https://github.com/OpenSC/pam_pkcs11/commit/6583c2c891c32dbebecbca85aa56093f0b13b4eb Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/common/pam-pkcs11-ossl-compat.h M src/mappers/openssh_mapper.c Log Message: ----------- Fix openssh_mapper_match_keys() for OpenSSL 1.0 & 1.1 The code was incorrect since the addition of OpenSSL 1.1 support in release 0.6.10. Commit: f7fb07c53e5beb31c84cd63af51d2da19c807d01 https://github.com/OpenSC/pam_pkcs11/commit/f7fb07c53e5beb31c84cd63af51d2da19c807d01 Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/mappers/mail_mapper.c Log Message: ----------- Fix compiler warning mail_mapper.c: In function ‘compare_email’: mail_mapper.c:100:27: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] return (at - c_email) == strlen(c_user) && !strncmp(c_email, c_user, strlen(c_user)); ^~ Commit: 1dd15447752c426309bef05765137a23aba7db49 https://github.com/OpenSC/pam_pkcs11/commit/1dd15447752c426309bef05765137a23aba7db49 Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/mappers/ldap_mapper.c Log Message: ----------- Fix compiler warning ldap_mapper.c:844:33: warning: pointer targets in passing argument 1 of ‘ldap_encode_escapes’ differ in signedness [-Wpointer-sign] escaped = ldap_encode_escapes(login, strlen(login)); ^~~~~ ldap_mapper.c:622:1: note: expected ‘const unsigned char *’ but argument is of type ‘const char *’ ldap_encode_escapes(const unsigned char *binary, size_t length) ^~~~~~~~~~~~~~~~~~~ Commit: 1d99a3134bd5d02e683b5618f4f02834e6b6d017 https://github.com/OpenSC/pam_pkcs11/commit/1d99a3134bd5d02e683b5618f4f02834e6b6d017 Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/mappers/ldap_mapper.c Log Message: ----------- Fix compiler warning ldap_mapper.c: In function ‘ldap_build_filter’: ldap_mapper.c:836:31: warning: declaration of ‘filter’ shadows a global declaration [-Wshadow] ldap_build_filter(const char *filter, const char *login, const char *map, ~~~~~~~~~~~~^~~~~~ ldap_mapper.c:107:20: note: shadowed declaration is here static const char *filter="(&(objectClass=posixAccount)(uid=%s)"; ^~~~~~ Commit: c2288eaf956d229cfeabd1ce0f1ea499f3d9dee3 https://github.com/OpenSC/pam_pkcs11/commit/c2288eaf956d229cfeabd1ce0f1ea499f3d9dee3 Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/scconf/parse.c Log Message: ----------- Fix compiler warning parse.c: In function ‘scconf_parse’: parse.c:389:3: warning: ‘strncpy’ output may be truncated copying 255 bytes from a string of length 255 [-Wstringop-truncation] strncpy(buffer, p.emesg, sizeof(buffer)-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ parse.c: In function ‘scconf_parse_string’: parse.c:416:3: warning: ‘strncpy’ output may be truncated copying 255 bytes from a string of length 255 [-Wstringop-truncation] strncpy(buffer, p.emesg, sizeof(buffer)-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Commit: f0713b2e17d4fb83374d67e02f768fdc259abf17 https://github.com/OpenSC/pam_pkcs11/commit/f0713b2e17d4fb83374d67e02f768fdc259abf17 Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/common/strings.c Log Message: ----------- Fix compiler warning and optimize speed memcpy() should be faster than strncpy(). ./strings.h: In function ‘clone_str’: strings.c:53:2: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] strncpy(dst,str,len); ^~~~~~~~~~~~~~~~~~~~ strings.c:50:14: note: length computed here size_t len= strlen(str); ^~~~~~~~~~~ Commit: 6855b9d3e782f2de75426446a3c1455e40707f67 https://github.com/OpenSC/pam_pkcs11/commit/6855b9d3e782f2de75426446a3c1455e40707f67 Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/common/strings.c Log Message: ----------- Fix compiler warning The function split_static() is not used anywhere in the code. I could have removed the code but maybe some external mapper are using it? strings.c:158:9: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=] strncpy(dst,str,1+strlen(str)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ strings.c:158:27: note: length computed here strncpy(dst,str,1+strlen(str)); ^~~~~~~~~~~ Commit: 7912c5dfc4a758762dc5d6630fb851b35c1ca54d https://github.com/OpenSC/pam_pkcs11/commit/7912c5dfc4a758762dc5d6630fb851b35c1ca54d Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/common/pkcs11_lib.c Log Message: ----------- Fix compiler warning pkcs11_lib.c: In function ‘refresh_slots’: pkcs11_lib.c:1111:11: warning: declaration of ‘rv’ shadows a previous local [-Wshadow] CK_RV rv; ^~ pkcs11_lib.c:1056:9: note: shadowed declaration is here CK_RV rv; ^~ Commit: 03fde3e1799a1d9b1aba18cf8474eaebd9068776 https://github.com/OpenSC/pam_pkcs11/commit/03fde3e1799a1d9b1aba18cf8474eaebd9068776 Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/common/pkcs11_lib.c Log Message: ----------- Fix compiler warning pkcs11_lib.c: In function ‘init_pkcs11_module’: pkcs11_lib.c:1148:12: warning: unused variable ‘i’ [-Wunused-variable] CK_ULONG i; ^ Commit: 0931f22b35e60255cc22d21c031755257ff295be https://github.com/OpenSC/pam_pkcs11/commit/0931f22b35e60255cc22d21c031755257ff295be Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/mappers/null_mapper.c Log Message: ----------- Fix compiler warning null_mapper.c: In function ‘mapper_match_user’: mapper.h:206:6: warning: declaration of ‘match’ shadows a global declaration [-Wshadow] int match = 0; \ ^~~~~ null_mapper.c:60:1: note: in expansion of macro ‘_DEFAULT_MAPPER_MATCH_USER’ _DEFAULT_MAPPER_MATCH_USER ^~~~~~~~~~~~~~~~~~~~~~~~~~ null_mapper.c:43:12: note: shadowed declaration is here static int match=0; ^~~~~ Commit: 8a5d6b941611f70b99625b6206732adcdcfa06d8 https://github.com/OpenSC/pam_pkcs11/commit/8a5d6b941611f70b99625b6206732adcdcfa06d8 Author: Ludovic Rousseau <lud...@fr...> Date: 2019-05-17 (Fri, 17 May 2019) Changed paths: M src/mappers/openssh_mapper.c Log Message: ----------- Fix compiler warning openssh_mapper.c: In function ‘openssh_mapper_match_keys’: openssh_mapper.c:297:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] authrsa_e = RSA_get0_e(authrsa); ^ openssh_mapper.c:298:23: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] rsa_e = RSA_get0_e(rsa); ^ openssh_mapper.c:301:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] authrsa_n = RSA_get0_n(authrsa); ^ openssh_mapper.c:302:23: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] rsa_n = RSA_get0_n(rsa); ^ Compare: https://github.com/OpenSC/pam_pkcs11/compare/d256fd4002e8...8a5d6b941611 |