lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 Jun 2021 08:49:57 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Roi Dayan <roid@...dia.com>
Cc:     <netdev@...r.kernel.org>, Paul Blakey <paulb@...dia.com>,
        David Ahern <dsahern@...il.com>
Subject: Re: [PATCH iproute2-next v2 1/1] police: Add support for json
 output

On Thu, 3 Jun 2021 10:33:45 +0300
Roi Dayan <roid@...dia.com> wrote:

>  	if (tb[TCA_POLICE_TBF] == NULL) {
> -		fprintf(f, "[NULL police tbf]");
> +		print_string(PRINT_FP, NULL, "%s", "[NULL police tbf]");
>  		return 0;
>  	}
>  #ifndef STOOPID_8BYTE
>  	if (RTA_PAYLOAD(tb[TCA_POLICE_TBF])  < sizeof(*p)) {
> -		fprintf(f, "[truncated police tbf]");
> +		print_string(PRINT_FP, NULL, "%s", "[truncated police tbf]");

These are errors, and you should just print them to stderr.
That way if program is using JSON they can see the output on stdout;
and look for non-structured errors on stderr.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ