Remove commented out pledge in tsort

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Remove commented out pledge in tsort

George Brown
Removes commented out pledge with whitelist, this is the only instance I
found of this grep'ing through base.

diff --git usr.bin/tsort/tsort.c usr.bin/tsort/tsort.c
index 5caa733f4..cc1cba164 100644
--- usr.bin/tsort/tsort.c
+++ usr.bin/tsort/tsort.c
@@ -879,7 +879,6 @@ parse_args(int argc, char *argv[], struct ohash *pairs)

     files[i] = NULL;

-/*    if (pledge("stdio rpath", files) == -1) */
     if (pledge("stdio rpath", NULL) == -1)
         err(1, "pledge");

Reply | Threaded
Open this post in threaded view
|

Re: Remove commented out pledge in tsort

Marc Espie-2
On Sun, Nov 12, 2017 at 11:08:54AM +0000, George Brown wrote:

> Removes commented out pledge with whitelist, this is the only instance I
> found of this grep'ing through base.
>
> diff --git usr.bin/tsort/tsort.c usr.bin/tsort/tsort.c
> index 5caa733f4..cc1cba164 100644
> --- usr.bin/tsort/tsort.c
> +++ usr.bin/tsort/tsort.c
> @@ -879,7 +879,6 @@ parse_args(int argc, char *argv[], struct ohash *pairs)
>
>      files[i] = NULL;
>
> -/*    if (pledge("stdio rpath", files) == -1) */
>      if (pledge("stdio rpath", NULL) == -1)
>          err(1, "pledge");

I did this in an eager way a while back, was told in no uncertain terms
"not yet, we're still looking at things".

Well, see pledge(2). Whenever the dust settles, sure we can kill this line,
or activate it instead.

Dust is not yet settled.

Reply | Threaded
Open this post in threaded view
|

Re: Remove commented out pledge in tsort

Ori Bernstein
On Sun, 12 Nov 2017 13:31:10 +0100, Marc Espie <[hidden email]> wrote:

> I did this in an eager way a while back, was told in no uncertain terms
> "not yet, we're still looking at things".
>
> Well, see pledge(2). Whenever the dust settles, sure we can kill this line,
> or activate it instead.
>
> Dust is not yet settled.
>

In this specific case, the line is already activated. It's just duplicated
in a comment one line before the pledge gets called.

--
    Ori Bernstein

Reply | Threaded
Open this post in threaded view
|

Re: Remove commented out pledge in tsort

Marc Espie-2
On Mon, Nov 13, 2017 at 10:38:17PM -0800, Ori Bernstein wrote:

> On Sun, 12 Nov 2017 13:31:10 +0100, Marc Espie <[hidden email]> wrote:
>
> > I did this in an eager way a while back, was told in no uncertain terms
> > "not yet, we're still looking at things".
> >
> > Well, see pledge(2). Whenever the dust settles, sure we can kill this line,
> > or activate it instead.
> >
> > Dust is not yet settled.
> >
>
> In this specific case, the line is already activated. It's just duplicated
> in a comment one line before the pledge gets called.

Considering I wrote that code, yeah, I know. It's still a valid placeholder.

If you look at cvs, I reorganized tsort *a lot* to construct files as a
whitelist.