[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[debian-hurd-Patches][310742] analog 6.0-14 hurd patch



Patches item #310742, was opened at 2008-04-26 21:30
Status: Open
Priority: 3
Submitted By: Flávio Cruz (flaviocruz-guest)
Assigned to: Nobody (None)
Summary: analog 6.0-14 hurd patch 
Category: None
Group: None
Resolution: None


Initial Comment:
analog 6.0-14 patch for GNU/Hurd

----------------------------------------------------------------------

Comment By: Flávio Cruz (flaviocruz-guest)
Date: 2008-04-29 23:56

Message:
Huu, you're right, but using realpath("/", NULL) doesn't just strdup's "/", but a buffer with 4K filled with "/ \0", at least in my system. Which means that the code below works OK.

But yeah, it's much better to patch the realpath calls just below.

----------------------------------------------------------------------

Comment By: Samuel Thibault (sthibaul-guest)
Date: 2008-04-28 23:27

Message:
Errr, I don't understand: why are you calling realpath("/", NULL)?  You
will just get an strdup of "/", which won't work with what is done
below.  You should rather patch the realpath() calls below.


----------------------------------------------------------------------

Comment By: Flávio Cruz (flaviocruz-guest)
Date: 2008-04-28 23:14

Message:
I've updated the patch

----------------------------------------------------------------------

Comment By: Samuel Thibault (sthibaul-guest)
Date: 2008-04-27 19:39

Message:
Mmm, SUS says that _PC_PATH_MAX is to be used for pathconf(), not
sysconf...

Also, it actually returns -1, since we don't have any path limitation
in GNU/Hurd.  A more correct fix is to set commandname to NULL to let
GLIBC's realpath allocate the string for us.  That should be done #ifdef
__GLIBC__ of course (that extension is not yet in SUS)


----------------------------------------------------------------------

You can respond by visiting: 
http://alioth.debian.org/tracker/?func=detail&atid=410472&aid=310742&group_id=30628


Reply to: