Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | netkit-rsh: |
| 2 | Allow to build with no PAM enabled. |
| 3 | |
| 4 | Upstream-Status: Inappropriate [ no upstream maintaner ] |
| 5 | |
| 6 | Signed-off-by: Armin Kuster <akuster808@gmail.com> |
| 7 | |
| 8 | Index: netkit-rsh-0.17/rshd/rshd.c |
| 9 | =================================================================== |
| 10 | --- netkit-rsh-0.17.orig/rshd/rshd.c |
| 11 | +++ netkit-rsh-0.17/rshd/rshd.c |
| 12 | @@ -110,9 +110,11 @@ extern char **environ; |
| 13 | static void error(const char *fmt, ...); |
| 14 | static void doit(struct sockaddr *fromp, socklen_t fromlen); |
| 15 | static char *getstr(char *, size_t, const char *); |
| 16 | +#ifdef USE_PAM |
| 17 | static int err_conv( |
| 18 | int, const struct pam_message **, struct pam_response **, void * |
| 19 | ); |
| 20 | +#endif /* USE_PAM */ |
| 21 | |
| 22 | extern int _check_rhosts_file; |
| 23 | |
| 24 | @@ -256,6 +258,7 @@ static void stderr_parent(int sock, int |
| 25 | } |
| 26 | |
| 27 | |
| 28 | +#ifdef USE_PAM |
| 29 | static int err_conv( |
| 30 | int num_msg, const struct pam_message **msg, |
| 31 | struct pam_response **resp, void *appdata_ptr |
| 32 | @@ -266,6 +269,7 @@ static int err_conv( |
| 33 | (void) appdata_ptr; |
| 34 | return PAM_CONV_ERR; |
| 35 | } |
| 36 | +#endif |
| 37 | |
| 38 | static struct passwd *doauth(const char *remuser, |
| 39 | const char *hostname, |