Hello.

After the recent addition of pledge and privilege separation to rdate,
some error messages get truncated, since the pipe message size for the
child is limited to 256. For example:

$ rdate -n pool.ntp.org
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign reque


Are there any potential issues with increasing the size a little bit?
As in:

Index: rdate.c
===================================================================
RCS file: /build/openbsd/cvs/src/usr.sbin/rdate/rdate.c,v
retrieving revision 1.34
diff -u -p -r1.34 rdate.c
--- rdate.c     31 Oct 2015 18:24:01 -0000      1.34
+++ rdate.c     23 Dec 2015 17:54:00 -0000
@@ -64,7 +64,7 @@ extern char    *__progname;
 __dead void    usage(void);
 
 struct {
-       char message[256];
+       char message[1024];
        struct timeval new;
        struct timeval adjust;
 } pdata;


With this change the errors look like this:

ZAURUS: /build/openbsd/current/src/usr.sbin/rdate $ obj/rdate -n pool.ntp.org   
   
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Unable to get a reasonable time estimate

ZAURUS: /build/openbsd/current/src/usr.sbin/rdate $ obj/rdate -n google.com   
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: Can't assign requested address
rdate: Failed to connect to server: No route to host
rdate: Unable to get a reasonable time estimate

Reply via email to