From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: "B.A.T.M.A.N" <b.a.t.m.a.n@lists.open-mesh.net>
Subject: Re: [B.A.T.M.A.N.] [PATCH v2 2/2] alfred: Mount debugfs before reducing capabilities
Date: Fri, 18 Mar 2016 12:27:38 +0100 [thread overview]
Message-ID: <2389171.6qzBFbKr0u@bentobox> (raw)
In-Reply-To: <1458157872-15879-3-git-send-email-andrew@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]
On Wednesday 16 March 2016 20:51:12 Andrew Lunn wrote:
> --- a/batadv_query.c
> +++ b/batadv_query.c
> @@ -90,16 +90,9 @@ int ipv6_to_mac(const struct in6_addr *addr, struct ether_addr *mac)
>
> int batadv_interface_check(const char *mesh_iface)
> {
> - char *debugfs_mnt;
> char full_path[MAX_PATH + 1];
> FILE *f;
>
> - debugfs_mnt = debugfs_mount(NULL);
> - if (!debugfs_mnt) {
> - fprintf(stderr, "Could not find debugfs path\n");
> - return -1;
> - }
> -
[...]
> diff --git a/main.c b/main.c
> index 9610398..52dca97 100644
> --- a/main.c
> +++ b/main.c
[...]
> @@ -160,6 +161,9 @@ static struct globals *alfred_init(int argc, char *argv[])
> {NULL, 0, NULL, 0},
> };
>
> + /* We need full capabilities to mount debugfs, so do that now */
> + debugfs_mount(NULL);
> +
> ret = reduce_capabilities();
> if (ret < 0)
> return NULL;
>
There were some return value checks for the debugfs_mount calls which you've
removed. Why isn't here some kind of check with error handling/warning, ...?
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-03-18 11:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 19:51 [B.A.T.M.A.N.] [PATCH v2 0/2] netns support for alfred Andrew Lunn
2016-03-16 19:51 ` [B.A.T.M.A.N.] [PATCH v2 1/2] alfred: Add support for network namespaces Andrew Lunn
2016-03-16 19:51 ` [B.A.T.M.A.N.] [PATCH v2 2/2] alfred: Mount debugfs before reducing capabilities Andrew Lunn
2016-03-18 11:27 ` Sven Eckelmann [this message]
2016-03-21 14:51 ` Andrew Lunn
2016-05-27 12:01 ` Simon Wunderlich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2389171.6qzBFbKr0u@bentobox \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.net \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox