On Mon, Jan 30, 2006 at 03:12:01PM +0000, Roger Leigh wrote: > Hello again, > > Attached is a patch to fix this bug, using the fix from the upstream > stable release (Linux-PAM-0.99.2.1). > > If you can't fix it in the next few days, please could I NMU this? > It's now causing my schroot package to FTBFS.
Final patch is attached. This one fixes up all affected source files. It's all already done upstream, except for Linux-PAM/libpamc/test/regress/test.libpamc.c, which should probably also be pushed upstream. Regards, Roger -- Roger Leigh Printing on GNU/Linux? http://gutenprint.sourceforge.net/ Debian GNU/Linux http://www.debian.org/ GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
diff -urN pam-0.79.original/debian/changelog pam-0.79/debian/changelog --- pam-0.79.original/debian/changelog 2006-01-30 14:38:05.000000000 +0000 +++ pam-0.79/debian/changelog 2006-01-30 17:51:35.411326155 +0000 @@ -1,3 +1,15 @@ +pam (0.79-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Linux-PAM/libpamc/include/security/pam_client.h, + Linux-PAM/libpamc/pamc_converse.c: Apply patch from + latest upstream version to remove redefinition of internal + glibc/libstdc++ types. Closes: #344447. + * Linux-PAM/libpamc/test/regress/test.libpamc.c: Also switch to standard + types; not taken from upstream. + + -- Roger Leigh <[EMAIL PROTECTED]> Mon, 30 Jan 2006 17:50:14 +0000 + pam (0.79-3) unstable; urgency=low * Patch 059 diff -urN pam-0.79.original/Linux-PAM/libpamc/include/security/pam_client.h pam-0.79/Linux-PAM/libpamc/include/security/pam_client.h --- pam-0.79.original/Linux-PAM/libpamc/include/security/pam_client.h 2006-01-30 14:38:05.000000000 +0000 +++ pam-0.79/Linux-PAM/libpamc/include/security/pam_client.h 2006-01-30 14:43:50.297574694 +0000 @@ -1,5 +1,5 @@ /* - * $Id: pam_client.h 281 2005-07-13 12:05:12Z vorlon $ + * $Id: pam_client.h,v 1.7 2005/05/20 14:58:58 kukuk Exp $ * * Copyright (c) 1999 Andrew G. Morgan <[EMAIL PROTECTED]> * @@ -16,23 +16,14 @@ #include <unistd.h> #include <string.h> #include <stdio.h> - -#ifdef __cplusplus -extern "C" { -#endif +#include <sys/types.h> /* opaque agent handling structure */ typedef struct pamc_handle_s *pamc_handle_t; /* binary prompt structure pointer */ -#ifndef __u32 -# define __u32 unsigned int -#endif -#ifndef __u8 -# define __u8 unsigned char -#endif -typedef struct { __u32 length; __u8 control; } *pamc_bp_t; +typedef struct { u_int32_t length; u_int8_t control; } *pamc_bp_t; /* * functions provided by libpamc @@ -95,10 +86,10 @@ # define PAM_BP_FREE free #endif /* PAM_BP_FREE */ -#define __PAM_BP_WOCTET(x,y) (*((y) + (__u8 *)(x))) -#define __PAM_BP_ROCTET(x,y) (*((y) + (const __u8 *)(x))) +#define __PAM_BP_WOCTET(x,y) (*((y) + (u_int8_t *)(x))) +#define __PAM_BP_ROCTET(x,y) (*((y) + (const u_int8_t *)(x))) -#define PAM_BP_MIN_SIZE (sizeof(__u32) + sizeof(__u8)) +#define PAM_BP_MIN_SIZE (sizeof(u_int32_t) + sizeof(u_int8_t)) #define PAM_BP_MAX_LENGTH 0x20000 /* an advisory limit */ #define PAM_BP_WCONTROL(x) (__PAM_BP_WOCTET(x,4)) #define PAM_BP_RCONTROL(x) (__PAM_BP_ROCTET(x,4)) @@ -107,8 +98,8 @@ (__PAM_BP_ROCTET(x,2)<< 8)+ \ (__PAM_BP_ROCTET(x,3) )) #define PAM_BP_LENGTH(x) (PAM_BP_SIZE(x) - PAM_BP_MIN_SIZE) -#define PAM_BP_WDATA(x) (PAM_BP_MIN_SIZE + (__u8 *) (x)) -#define PAM_BP_RDATA(x) (PAM_BP_MIN_SIZE + (const __u8 *) (x)) +#define PAM_BP_WDATA(x) (PAM_BP_MIN_SIZE + (u_int8_t *) (x)) +#define PAM_BP_RDATA(x) (PAM_BP_MIN_SIZE + (const u_int8_t *) (x)) /* Note, this macro always '\0' terminates renewed packets */ @@ -116,13 +107,13 @@ do { \ if (old_p) { \ if (*(old_p)) { \ - __u32 __size; \ + u_int32_t __size; \ __size = PAM_BP_SIZE(*(old_p)); \ memset(*(old_p), 0, __size); \ PAM_BP_FREE(*(old_p)); \ } \ if (cntrl) { \ - __u32 __size; \ + u_int32_t __size; \ \ __size = PAM_BP_MIN_SIZE + data_length; \ if ((*(old_p) = PAM_BP_CALLOC(1, 1+__size))) { \ @@ -145,7 +136,7 @@ #define PAM_BP_FILL(prmpt, offset, length, data) \ do { \ size_t bp_length; \ - __u8 *prompt = (__u8 *) (prmpt); \ + u_int8_t *prompt = (u_int8_t *) (prmpt); \ bp_length = PAM_BP_LENGTH(prompt); \ if (bp_length < ((length)+(offset))) { \ PAM_BP_ASSERT("attempt to write over end of prompt"); \ @@ -156,7 +147,7 @@ #define PAM_BP_EXTRACT(prmpt, offset, length, data) \ do { \ size_t __bp_length; \ - const __u8 *__prompt = (const __u8 *) (prmpt); \ + const u_int8_t *__prompt = (const u_int8_t *) (prmpt); \ __bp_length = PAM_BP_LENGTH(__prompt); \ if (((offset) < 0) || (__bp_length < ((length)+(offset))) \ || ((length) < 0)) { \ @@ -165,9 +156,6 @@ memcpy((data), (offset) + PAM_BP_RDATA(__prompt), (length)); \ } while (0) -#ifdef __cplusplus -} -#endif /* Control types */ diff -urN pam-0.79.original/Linux-PAM/libpamc/pamc_converse.c pam-0.79/Linux-PAM/libpamc/pamc_converse.c --- pam-0.79.original/Linux-PAM/libpamc/pamc_converse.c 2006-01-30 14:38:05.000000000 +0000 +++ pam-0.79/Linux-PAM/libpamc/pamc_converse.c 2006-01-30 17:38:06.149144798 +0000 @@ -34,8 +34,8 @@ int pamc_converse(pamc_handle_t pch, pamc_bp_t *prompt_p) { - __u32 size, offset=0; - __u8 control, raw[PAM_BP_MIN_SIZE]; + u_int32_t size, offset=0; + u_int8_t control, raw[PAM_BP_MIN_SIZE]; D(("called")); @@ -109,7 +109,7 @@ /* pump all of the prompt into the agent */ do { int rval = write(pch->current->writer, - offset + (const __u8 *) (*prompt_p), + offset + (const u_int8_t *) (*prompt_p), size - offset); if (rval == -1) { switch (errno) { @@ -171,7 +171,7 @@ value from the previous loop */ while (offset < size) { - int rval = read(pch->current->reader, offset + (__u8 *) *prompt_p, + int rval = read(pch->current->reader, offset + (u_int8_t *) *prompt_p, size-offset); if (rval == -1) { diff -urN pam-0.79.original/Linux-PAM/libpamc/test/regress/test.libpamc.c pam-0.79/Linux-PAM/libpamc/test/regress/test.libpamc.c --- pam-0.79.original/Linux-PAM/libpamc/test/regress/test.libpamc.c 2001-01-20 22:29:47.000000000 +0000 +++ pam-0.79/Linux-PAM/libpamc/test/regress/test.libpamc.c 2006-01-30 17:41:47.782217348 +0000 @@ -157,7 +157,7 @@ return temp_packet.buffer; } -void packet_to_prompt(pamc_bp_t *prompt_p, __u8 control, +void packet_to_prompt(pamc_bp_t *prompt_p, u_int8_t control, struct internal_packet *packet) { PAM_BP_RENEW(prompt_p, control, packet->at);
signature.asc
Description: Digital signature