[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] trans/mtab: use setnullauth to drop privileges
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 1/3] trans/mtab: use setnullauth to drop privileges |
Date: |
Sun, 31 Aug 2014 16:29:29 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Sun 31 Aug 2014 16:24:59 +0200, a écrit :
> * trans/mtab.c (main): Use setnullauth to drop privileges.
Ack.
> ---
> trans/mtab.c | 15 ++-------------
> 1 file changed, 2 insertions(+), 13 deletions(-)
>
> diff --git a/trans/mtab.c b/trans/mtab.c
> index df03b1d..5207c1e 100644
> --- a/trans/mtab.c
> +++ b/trans/mtab.c
> @@ -27,6 +27,7 @@
> #include <hurd/trivfs.h>
> #include <inttypes.h>
> #include <mntent.h>
> +#include <nullauth.h>
> #include <pthread.h>
> #include <stdlib.h>
> #include <stdio.h>
> @@ -221,19 +222,7 @@ main (int argc, char *argv[])
> if (bootstrap != MACH_PORT_NULL)
> {
> /* Started as a translator. */
> -
> - auth_t nullauth;
> - err = auth_makeauth (getauth (),
> - NULL, MACH_MSG_TYPE_COPY_SEND, 0,
> - NULL, 0,
> - NULL, 0,
> - NULL, 0,
> - NULL, 0,
> - &nullauth);
> - if (err)
> - error (3, err, "dropping credentials");
> -
> - err = setauth (nullauth);
> + err = setnullauth ();
> if (err)
> error (3, err, "dropping credentials");
>
> --
> 2.1.0
>
--
Samuel
Tu as lu les docs. Tu es devenu un informaticien. Que tu le veuilles
ou non. Lire la doc, c'est le Premier et Unique Commandement de
l'informaticien.
-+- TP in: Guide du Linuxien pervers - "L'évangile selon St Thomas"