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

[debian-hurd-Patches][311759] [FTBFS] hpsockd 0.17



Patches item #311759, was changed at 2009-06-17 20:32 by Barry deFreese
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=410472&aid=311759&group_id=30628

Status: Open
Priority: 3
Submitted By: Barry deFreese (bdefreese)
Assigned to: Nobody (None)
Summary: [FTBFS] hpsockd 0.17 
Category: linuxism
Group: unreviewed
Resolution: None


Initial Comment:
Getting hpsockd to recognize the system is as easy as adding the following to src/Makefile.os:

GNU: Linux

GNU.debug: Linux.debug


However, there is then an unconditional use of MAXPATHLEN.

src/sockd/gram.y:

hostToken:      T_HOST                                  { struct hostent *hp;
                                                          char tmp[MAXPATHLEN];
                                                          register int i;
                                                          gethostname(tmp,sizeof(tmp));
                                                          if ((hp=gethostbyname(tmp))==NULL) {
                                                                syslog(LOG_ERR,"No such host");
                                                                YYABORT;
                                                          }
                                                          NEWLIST($$,*(int*)hp->h_addr_list[0]);
                                                          for (i=1; hp->h_addr_list[i]; i++)
                                                                ADDTOLIST($$,*(int*)hp->h_addr_list[i]);
                                                        }

Why it uses MAXPATHLEN here is beyond me.

Barry

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

>Comment By: Barry deFreese (bdefreese)
Date: 2009-06-19 16:18

Message:
One more time...

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

Comment By: Barry deFreese (bdefreese)
Date: 2009-06-19 15:49

Message:
Updated patch...

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

Comment By: Barry deFreese (bdefreese)
Date: 2009-06-18 01:49

Message:
Here is an updated patch.

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

Comment By: Samuel Thibault (sthibault)
Date: 2009-06-17 21:27

Message:
Never assume that the author of the code is clever than you. Here he
obviously isn't. As usual, use a dynamic loop.


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

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


Reply to: