On Feb 6, 2015, at 21:31, Garrett Cooper <yaneurab...@gmail.com> wrote:

> On Feb 6, 2015, at 21:27, James Gritton <ja...@freebsd.org> wrote:
> 
>> On 2015-02-06 22:18, Garrett Cooper wrote:
>>> On Feb 6, 2015, at 9:54, Jamie Gritton <ja...@freebsd.org> wrote:
>>>> Modified: head/usr.sbin/jail/command.c
>>>> ==============================================================================
>>>> --- head/usr.sbin/jail/command.c   Fri Feb  6 17:43:13 2015        
>>>> (r278322)
>>>> +++ head/usr.sbin/jail/command.c   Fri Feb  6 17:54:53 2015        
>>>> (r278323)
>>>> @@ -112,6 +112,12 @@ next_command(struct cfjail *j)
>>>>                            if (!bool_param(j->intparams[IP_MOUNT_FDESCFS]))
>>>>                                    continue;
>>>>                            j->comstring = &dummystring;
>>>> +                          break;
>>>> +                  case IP_MOUNT_PROCFS:
>>>> +                          if (!bool_param(j->intparams[IP_MOUNT_PROCFS]))
>>>> +                                  continue;
>>>> +                          j->comstring = &dummystring;
>>>> +                          break;
>>> Did you intend on adding another break? The code would previously fall
>>> through to the next case statement...
>>>>                    case IP__OP:
>>>>                    case IP_STOP_TIMEOUT:
>>>>                            j->comstring = &dummystring;
>> 
>> Yes.  The code did indeed previously fall to the next case, but it was a 
>> no-op: the next case only had the same exact assignment that had just taken 
>> place (j->comstring = &dummystring).  The lack of a break that had existed 
>> before was just some sloppy coding that I didn't notice at the time because 
>> it didn't actually change any behavior.  Nonetheless it seemed worth 
>> correcting when I noticed it.
> 
> True. I looked at the code afterwards and it looks ok. mount.procfs doesn’t 
> exist in my environment. Is that command correct?
> 
> $ which mount.procfs; echo $?
> 1

Nevermind — thinking Linux for a sec. I think I see the bug now. etc/rc.d/jail 
before this change used to pass ${rootdir} if it was defined, and the new code 
wasn’t passing that… Might want to doublecheck it, but adding the rootdir 
afterwards might fix that.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to