Removed
Link Here
|
1 |
--- src/pam_fprint.c.orig 2023-02-14 15:43:27 UTC |
2 |
+++ src/pam_fprint.c |
3 |
@@ -18,6 +18,7 @@ |
4 |
*/ |
5 |
|
6 |
#include <stdio.h> |
7 |
+#include <stdlib.h> |
8 |
#include <unistd.h> |
9 |
#include <sys/types.h> |
10 |
#include <pwd.h> |
11 |
@@ -27,6 +28,7 @@ |
12 |
|
13 |
#define PAM_SM_AUTH |
14 |
#include <security/pam_modules.h> |
15 |
+#include <security/pam_appl.h> |
16 |
|
17 |
static int send_info_msg(pam_handle_t *pamh, char *msg) |
18 |
{ |
19 |
@@ -41,10 +43,10 @@ static int send_info_msg(pam_handle_t *pamh, char *msg |
20 |
|
21 |
r = pam_get_item(pamh, PAM_CONV, (const void **) &pc); |
22 |
if (r != PAM_SUCCESS) |
23 |
- return; |
24 |
+ return r; |
25 |
|
26 |
if (!pc || !pc->conv) |
27 |
- return; |
28 |
+ return PAM_BUF_ERR; |
29 |
|
30 |
return pc->conv(1, &msgp, &resp, pc->appdata_ptr); |
31 |
} |
32 |
@@ -62,10 +64,10 @@ static int send_err_msg(pam_handle_t *pamh, char *msg) |
33 |
|
34 |
r = pam_get_item(pamh, PAM_CONV, (const void **) &pc); |
35 |
if (r != PAM_SUCCESS) |
36 |
- return; |
37 |
+ return r; |
38 |
|
39 |
if (!pc || !pc->conv) |
40 |
- return; |
41 |
+ return PAM_BUF_ERR; |
42 |
|
43 |
return pc->conv(1, &msgp, &resp, pc->appdata_ptr); |
44 |
} |
45 |
@@ -102,7 +104,7 @@ static struct fp_print_data **find_dev_and_prints(stru |
46 |
struct fp_print_data **gallery; |
47 |
|
48 |
/* TODO: add device selection */ |
49 |
- while (print = prints[i++]) { |
50 |
+ while ((print = prints[i++])) { |
51 |
if (!ddev) { |
52 |
ddev = fp_dscv_dev_for_dscv_print(ddevs, print); |
53 |
driver_id = fp_dscv_print_get_driver_id(print); |
54 |
@@ -133,7 +135,7 @@ static struct fp_print_data **find_dev_and_prints(stru |
55 |
} |
56 |
|
57 |
i = 0, j = 0; |
58 |
- while (print = prints[i++]) { |
59 |
+ while ((print = prints[i++])) { |
60 |
driver_id_cur = fp_dscv_print_get_driver_id(print); |
61 |
if (driver_id_cur == driver_id) { |
62 |
err = fp_print_data_from_dscv_print(print, & (gallery[j])); |