tag 423444 patch
thanks

Steve Langasek <[EMAIL PROTECTED]> (11/05/2007):
> Attempts to rebuild pam-http in unstable for the libcurl3 -> libcurl4
> transition are failing when building against libcurl4-dev, because
> pam_http appears to depend on an obsolete curl option:
> 
> cc -Werror -Wall -fPIC -shared -Xlinker -x -o pam_http.so pam_http.c -lcurl
> pam_http.c: In function 'geturl':
> pam_http.c:67: error: 'CURLOPT_PASSWDFUNCTION' undeclared (first use in this 
> function)
> pam_http.c:67: error: (Each undeclared identifier is reported only once
> pam_http.c:67: error: for each function it appears in.)
> make[1]: *** [pam_http.so] Error 1

Hi,

please find attached a patch to make the use of this option conditional.
Your package builds fine once it's applied; tagging accordingly.

Cheers,

-- 
Cyril Brulebois

PS: Cc'ing my AM for RC bugfix.
--- pam-http-3/pam_http.c	2001-08-30 03:56:03.000000000 +0000
+++ pam-http-3~/pam_http.c	2007-07-25 05:30:17.000000000 +0000
@@ -34,10 +34,13 @@
 static size_t nop_wf(void* a, size_t x, size_t y, void* b) { return x * y; }
 
 /* nop password ask function */
+/* only defined when needed, otherwise a warning is issued, treated as an error */
+#ifdef CURLOPT_PASSWDFUNCTION
 static int my_getpass(void *client, char *prompt, char *buffer, int buflen) {
   buffer[0] = '\0';
   return 0;
 }
+#endif
 
 static int geturl(const char *url, const char *username, 
 		  const char *password, const char *cafile)
@@ -64,7 +67,9 @@
   /* return an empty password if none supplied instead of the default
      behavior, which is to fuck with the tty and half-assedly ask the
      user for a password from somewhere in the guts of libcURL */
+#ifdef CURLOPT_PASSWDFUNCTION
   curl_easy_setopt(curl, CURLOPT_PASSWDFUNCTION, my_getpass);
+#endif
 
   /* seed SSL randomness from somewhere; this is really problematic
      because libcurl wants to read 16 kilobytes of randomness.  (Why

Attachment: pgpxkiSBYXUwJ.pgp
Description: PGP signature

Reply via email to