[ 
https://issues.apache.org/jira/browse/YARN-6623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16175201#comment-16175201
 ] 

Varun Vasudev commented on YARN-6623:
-------------------------------------

{noformat}   
     How would you detect the condition where the buffer doesn't have enough 
size?

You copy at most bufflen-strlen(buff) characters including \0. As I said only 
one strlen is enough in this case.
{noformat}
I think I understand what you're saying. The current implementation checks if 
the buffer has enough space to hold the final string and will return an error 
if there isn't enough space. Without the additional strlen, how would I check 
that the buffer can fit the additional string?

{noformat}
    381 quote_and_append_arg(&tmp_buffer, &tmp_buffer_size, " ", image_name); 

    That space might need to be added to the quote_and_append_arg function for 
safety reasons.

    I didn't get this. Can you please explain?

When we add a new arg then the space should be added by default in 
quote_and_append_arg every time.
{noformat}

Ah I see what you're saying. Thanks for the explanation. That line of code got 
removed in the latest patch to address the feedback from 
[~shaneku...@gmail.com] in his review.

{noformat}
    Is there any benefit to strcpy + strcat?

There is no need to do an strlen. Was the intention maybe to bound by the size 
of tmp_buffer_2?
{noformat}

Yep. The thinking was to limit it to the size of tmp_buffer_2.

> Add support to turn off launching privileged containers in the 
> container-executor
> ---------------------------------------------------------------------------------
>
>                 Key: YARN-6623
>                 URL: https://issues.apache.org/jira/browse/YARN-6623
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager
>            Reporter: Varun Vasudev
>            Assignee: Varun Vasudev
>            Priority: Blocker
>         Attachments: YARN-6623.001.patch, YARN-6623.002.patch, 
> YARN-6623.003.patch, YARN-6623.004.patch, YARN-6623.005.patch, 
> YARN-6623.006.patch, YARN-6623.007.patch, YARN-6623.008.patch, 
> YARN-6623.009.patch, YARN-6623.010.patch
>
>
> Currently, launching privileged containers is controlled by the NM. We should 
> add a flag to the container-executor.cfg allowing admins to disable launching 
> privileged containers at the container-executor level.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to