bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] tar 1.23 Solaris regression


From: David Bartley
Subject: Re: [Bug-tar] tar 1.23 Solaris regression
Date: Mon, 2 Aug 2010 11:21:57 -0700

On Mon, Aug 2, 2010 at 6:30 AM, Petr Sumbera <address@hidden> wrote:
> Hi Sergey, et al,
>
> Following commit is causing problem at some cases to GNU tar running on
> Solaris.
>
> http://git.savannah.gnu.org/gitweb/?p=tar.git;a=commit;h=b216fed6340d073d33351145be033ecc5b903c7a
>
> Problem is that users are expecting that their scripts (in our case info
> script which is defined with option -F) is run with the same set of
> privileges as tar program. In this case it's expected that script will
> execute program for CD burning (which requires some additional privileges).
>
> It seems that following fix solves the issue:
>
> --- tar-1.23/src/system.c.orig  Mon Aug  2 05:52:37 2010
> +++ tar-1.23/src/system.c       Mon Aug  2 05:58:38 2010
> @@ -20,6 +20,7 @@
>  #include <system.h>
>
>  #include "common.h"
> +#include <priv-set.h>
>  #include <rmt.h>
>  #include <signal.h>
>
> @@ -816,6 +817,8 @@
>   argv[2] = (char*) info_script_option;
>   argv[3] = NULL;
>
> +  priv_set_restore_linkdir();
> +
>   execv (argv[0], argv);
>
>   exec_fatal (info_script_option);
>
> But First I'm not sure what is the reason for avoiding PRIV_SYS_LINKDIR
> privilege. And if this is really necassary it should be probably restored
> for every other program execution in src/system.c.

I think the reason was to make sure that unlink on directories didn't
work, avoiding a stat call to check if the target was a directory.

>
> Thanks for any comment!
>
> Petr
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]