$ /usr/sbin/nft list ruleset
Operation not permitted (you must be root)
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1372
Acked-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
parser_rc = rc;
rc = nft_evaluate(nft, &msgs, &cmds);
- if (rc < 0)
+ if (rc < 0) {
+ if (errno == EPERM) {
+ fprintf(stderr, "%s (you must be root)\n",
+ strerror(errno));
+ }
goto err;
+ }
if (parser_rc) {
rc = parser_rc;
if (errno == EINTR)
return -1;
- return 0;
+ return -1;
}
ctx->data = h;