[Pkg-shadow-devel] Bug#750480: Bug#750480: shadow: FTBFS on hurd-i386

Christian PERRIER bubulle at debian.org
Tue Jun 10 04:54:14 UTC 2014

Quoting Svante Signell (svante.signell at gmail.com):
> Source: shadow
> Version: 4.2-2
> Severity: important
> Tags: patch
> User: debian-hurd at lists.debian.org
> Usertags: hurd
> Hi,
> Currently shadow fails to build from source and is flagged as
> out-of-date. This is due to a usage of PATH_MAX, which is not defined
> on GNU/Hurd. The attached patch solves this problem by allocating a
> fixed number of 32 bytes for the string proc_dir_name in files
> src/procuidmap.c and src/procgidmap.c. (In fact only 18 bytes are
> needed)

Hello Svante,

Thanks for your contribution and the proposed patch.

Disclaimer: I'm anything but a C programmer;..:-)

Is really hardcoding this value the best solution?

> Index: shadow-4.2/src/newuidmap.c
> ===================================================================
> --- shadow-4.2.orig/src/newuidmap.c
> +++ shadow-4.2/src/newuidmap.c
> @@ -94,7 +94,7 @@ void usage(void)
>   */
>  int main(int argc, char **argv)
>  {
> -	char proc_dir_name[PATH_MAX];
> +	char proc_dir_name[32];


Wouldn't it be better to leave PATH_MAX for all architectures but Hurd
and just hardcode the value for Hurd : I mean something like using
"#ifdef" statements (as you see, I'm only giving the rough idea : I'm
not sure how to do this cleanly myself).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20140610/344b3044/attachment.sig>

More information about the Pkg-shadow-devel mailing list