Package: authbind
Version: 1.2.0
Severity: minor
Tags: patch

authbind-helper(8) says that the arguments are in network byte order.
Eg, port 1 would be represented as the argument 0001.  However, this
is not the case.  The code takes each argument, runs strtoul on it,
and stuffs the result into the sockaddr.  (And of course the code in
the libauthbind preload library does the same.)

This should be fixed in the documentation rather than the code to
avoid introducing two versions with incompatible calling conventions.

Ian.

@@ -48,7 +48,11 @@
 .BR 0x ,
 of exactly the right length (8 and 4 digits, respectively), being
 a pairs of hex digits for each byte in the address or port number when
-expressed in network byte order.
+expressed in host byte order.  For example, the port argument is the
+result of something like
+.B sprintf(arg,
+.B """%04X"",
+.BR sin.sin_port) .
 .PP
 .B helper
 will not bind to ports 512 and onwards, because programs like



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to