From: ian Date: Sun, 30 Aug 1998 19:52:38 +0000 (+0000) Subject: Make IPPORT_RESERVED check work (oops!). X-Git-Tag: debian_version_1_1_3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=authbind.git;a=commitdiff_plain;h=c6039ba83709d644380fe7fe0fa34f81cf61afc6 Make IPPORT_RESERVED check work (oops!). --- diff --git a/debian/changelog b/debian/changelog index 828f79a..0e2152f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +authbind (1.1.3) unstable; urgency=low + + * Make IPPORT_RESERVED check work (oops!). + + -- Ian Jackson Sun, 30 Aug 1998 20:52:10 +0100 + authbind (1.1.2) unstable; urgency=low * Make --deep option actually work (oops). diff --git a/helper.c b/helper.c index 409ed7b..3615d77 100644 --- a/helper.c +++ b/helper.c @@ -72,7 +72,8 @@ int main(int argc, const char *const *argv) { if (argc != 3) badusage(); addr= strtoul(argv[1],&ep,16); if (*ep || addr&~0x0ffffffffUL) badusage(); port= strtoul(argv[2],&ep,16); if (*ep || port&~0x0ffffUL) badusage(); - if (port >= IPPORT_RESERVED/2) _exit(EPERM); + hport= htons(port); + if (hport >= IPPORT_RESERVED/2) _exit(EPERM); if (chdir(CONFIGDIR)) perrorfail("chdir " CONFIGDIR); @@ -81,7 +82,6 @@ int main(int argc, const char *const *argv) { saddr.sin_family= AF_INET; saddr.sin_port= port; saddr.sin_addr.s_addr= addr; - hport= htons(port); snprintf(fnbuf,sizeof(fnbuf)-1,"byport/%u",hport); if (!access(fnbuf,X_OK)) authorised();