Re: how to perform file and directory metadata tests/queries in Perl with elevated privs?

2016-04-22 Thread Shlomi Fish
Hi Ken, On Thu, 21 Apr 2016 10:47:08 -0700 Kenneth Wolcott wrote: > Hi; > > I try not to run my scripts with elevated privilege. > > But sometimes files, directories and filesystems need to be accessed > via elevated privilege. > > So how to do this? > > If

Re: how to perform file and directory metadata tests/queries in Perl with elevated privs?

2016-04-22 Thread Rubén Llorente
El Fri, 22 Apr 2016 10:28:04 +, Rubén Llorente escribió: > > SUID and SGID are tricky matters. Common security advice is not to have > SUID or SGID scripts because sometimes you can cause a race condition > and run arbitrary scripts with the privileges of the owner of the > script. Which is

Re: how to perform file and directory metadata tests/queries in Perl with elevated privs?

2016-04-22 Thread Rubén Llorente
El Fri, 22 Apr 2016 13:05:28 +0300, Shlomi Fish escribió: > The way I understand the basic Unix permissions and privileges model > (which is before SELinux and other more complex stuff was introduced) > the way you gain root or other users privileges is by executing (using > EXECVE - possibly

Re: how to perform file and directory metadata tests/queries in Perl with elevated privs?

2016-04-22 Thread Shlomi Fish
Hi Ken, On Thu, 21 Apr 2016 10:47:08 -0700 Kenneth Wolcott wrote: > Hi; > > I try not to run my scripts with elevated privilege. > > But sometimes files, directories and filesystems need to be accessed > via elevated privilege. > > So how to do this? > > If