coreutils
[Top][All Lists]
Advanced

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

Re: RFC: avoid chroot() call if not changing root dir


From: Pádraig Brady
Subject: Re: RFC: avoid chroot() call if not changing root dir
Date: Wed, 14 May 2014 01:02:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 05/13/2014 11:45 PM, Bernhard Voelker wrote:
> On 05/13/2014 05:14 PM, Pádraig Brady wrote:
>> From 9c1bad82852cec8403ead49f12f53280c468a2cf Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?P=C3=A1draig=20Brady?= <address@hidden>
>> Date: Tue, 13 May 2014 15:56:34 +0100
>> Subject: [PATCH] chroot: don't chdir() if not changing root
>>
>> This allows chroot to use used as a light weight tool
>> to change user identification for a command,
>> while not changing the current working directory.
>>
>> * src/chroot.c (main): If the same root is specified. i.e. '/'
>> then don't change the current working directory, and avoid the
>> overhead of the other redundant calls.
> 
> Looks good, but deserves a NEWS entry, doesn't it?

Yep as a "Change in behavior".
Also needs tests.

Just popping it out as an RFC at this stage.

Thanks for the opinion.

cheers,
Pádraig.



reply via email to

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