diff options
author | joerg <joerg@pkgsrc.org> | 2012-11-23 12:30:01 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2012-11-23 12:30:01 +0000 |
commit | b08f608276f21e221b118193e8e6aaf83973b710 (patch) | |
tree | 037ae4a9259cda0f4e35d2b613e6d49f332ca3a9 /security/pam-fprint/patches | |
parent | fb8fb2295896c9ac8c3b9f4b45c13d5382d4ef00 (diff) | |
download | pkgsrc-b08f608276f21e221b118193e8e6aaf83973b710.tar.gz |
Fix missing prototypes and return values and other goodies, so that it
passes -Werror with clang.
Diffstat (limited to 'security/pam-fprint/patches')
-rw-r--r-- | security/pam-fprint/patches/patch-src_pam__fprint.c | 54 | ||||
-rw-r--r-- | security/pam-fprint/patches/patch-src_pam__fprint__enroll.c | 13 |
2 files changed, 67 insertions, 0 deletions
diff --git a/security/pam-fprint/patches/patch-src_pam__fprint.c b/security/pam-fprint/patches/patch-src_pam__fprint.c new file mode 100644 index 00000000000..78c063bfa88 --- /dev/null +++ b/security/pam-fprint/patches/patch-src_pam__fprint.c @@ -0,0 +1,54 @@ +$NetBSD: patch-src_pam__fprint.c,v 1.1 2012/11/23 12:30:01 joerg Exp $ + +--- src/pam_fprint.c.orig 2012-11-22 21:40:14.000000000 +0000 ++++ src/pam_fprint.c +@@ -21,12 +21,14 @@ + #include <unistd.h> + #include <sys/types.h> + #include <pwd.h> ++#include <stdlib.h> + #include <string.h> + + #include <fprint.h> + + #define PAM_SM_AUTH + #include <security/pam_modules.h> ++#include <security/pam_appl.h> + + static int send_info_msg(pam_handle_t *pamh, char *msg) + { +@@ -41,10 +43,10 @@ static int send_info_msg(pam_handle_t *p + + r = pam_get_item(pamh, PAM_CONV, (const void **) &pc); + if (r != PAM_SUCCESS) +- return; ++ return r; + + if (!pc || !pc->conv) +- return; ++ return PAM_SERVICE_ERR; + + return pc->conv(1, &msgp, &resp, pc->appdata_ptr); + } +@@ -62,10 +64,10 @@ static int send_err_msg(pam_handle_t *pa + + r = pam_get_item(pamh, PAM_CONV, (const void **) &pc); + if (r != PAM_SUCCESS) +- return; ++ return r; + + if (!pc || !pc->conv) +- return; ++ return PAM_SERVICE_ERR; + + return pc->conv(1, &msgp, &resp, pc->appdata_ptr); + } +@@ -97,7 +99,7 @@ static int find_dev_and_print(struct fp_ + struct fp_dscv_print *print; + struct fp_dscv_dev *ddev; + +- while (print = prints[i++]) { ++ while ((print = prints[i++]) != NULL) { + ddev = fp_dscv_dev_for_dscv_print(ddevs, print); + if (ddev) { + *_ddev = ddev; diff --git a/security/pam-fprint/patches/patch-src_pam__fprint__enroll.c b/security/pam-fprint/patches/patch-src_pam__fprint__enroll.c new file mode 100644 index 00000000000..48e42e0f940 --- /dev/null +++ b/security/pam-fprint/patches/patch-src_pam__fprint__enroll.c @@ -0,0 +1,13 @@ +$NetBSD: patch-src_pam__fprint__enroll.c,v 1.1 2012/11/23 12:30:01 joerg Exp $ + +--- src/pam_fprint_enroll.c.orig 2012-11-22 21:39:34.000000000 +0000 ++++ src/pam_fprint_enroll.c +@@ -47,7 +47,7 @@ static struct fp_dscv_dev *discover_devi + struct fp_dscv_dev *ddev = NULL; + int i; + +- for (i = 0; ddev = discovered_devs[i]; i++) { ++ for (i = 0; (ddev = discovered_devs[i]) != NULL; i++) { + struct fp_driver *drv = fp_dscv_dev_get_driver(ddev); + printf("Found device claimed by %s driver\n", + fp_driver_get_full_name(drv)); |