You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Eric Badger (JIRA)" <ji...@apache.org> on 2017/10/18 15:43:00 UTC

[jira] [Updated] (YARN-7353) Docker permitted volumes don't properly check for directories

     [ https://issues.apache.org/jira/browse/YARN-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Badger updated YARN-7353:
------------------------------
    Attachment: YARN-7353.001.patch

Uploading a patch that uses {{S_ISDIR}} to check whether the path is a directory

> Docker permitted volumes don't properly check for directories
> -------------------------------------------------------------
>
>                 Key: YARN-7353
>                 URL: https://issues.apache.org/jira/browse/YARN-7353
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: yarn
>            Reporter: Eric Badger
>            Assignee: Eric Badger
>         Attachments: YARN-7353.001.patch
>
>
> {noformat:title=docker-util.c:check_mount_permitted()}
>     // directory check
>     permitted_mount_len = strlen(permitted_mounts[i]);
>     if (permitted_mount_len > 0
>         && permitted_mounts[i][permitted_mount_len - 1] == '/') {
>       if (strncmp(normalized_path, permitted_mounts[i], permitted_mount_len) == 0) {
>         ret = 1;
>         break;
>       }
>     }
> {noformat}
> This code will treat "/home/" as a directory, but not "/home"



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

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