<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi Andrew , <o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">W.rt the mount namespace libct APIs , I wanted to know a bit more on how the libct_fs_set_private() API is useful .
<o:p></o:p></p>
<p class="MsoNormal">Qn 1: What is the use case where I need this .&nbsp; Please could you provide some pointers here .
<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I tried to use this with host bin,lib and lib64 bind mounted in the root of the container with mount namespaces . After that &nbsp;I see these directories (bin,lib and lib64) in the libct_test_private_ns also .
<o:p></o:p></p>
<p class="MsoNormal">The host directories bind mounted in the root of container which is &#8220;libct_test_root_ns&#8221; are also listed under the private directory of the container &nbsp;. They are &nbsp;also visible from outside the namespace.
<o:p></o:p></p>
<p class="MsoNormal">Qn 2 : Is this behavior correct. I have attached my test program which shows how I have used these APIs. &nbsp;Am I missing something obvious here?
<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Sample output: <o:p></o:p></p>
<p class="MsoNormal">root@ubuntu-mona:/home/monali/libct/master-19Jan/libct-master/test# ls -al libct_test_private_ns/<o:p></o:p></p>
<p class="MsoNormal">total 32<o:p></o:p></p>
<p class="MsoNormal">drw------- 8 root root 4096 Feb&nbsp; 6 05:26 .<o:p></o:p></p>
<p class="MsoNormal">drwxr-xr-x 5 root root 4096 Feb&nbsp; 6 06:26 ..<o:p></o:p></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow">drwxr-xr-x 2 root root 4096 Feb&nbsp; 6 05:26 bin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow">drwxr-xr-x 2 root root 4096 Feb&nbsp; 6 05:26 lib<o:p></o:p></span></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow">drwxr-xr-x 2 root root 4096 Feb&nbsp; 6 05:26 lib64</span><o:p></o:p></p>
<p class="MsoNormal">drwxr-xr-x 2 root root 4096 Feb&nbsp; 6 05:26 libct_test_devpts<o:p></o:p></p>
<p class="MsoNormal">---------- 1 root root&nbsp;&nbsp;&nbsp; 0 Feb&nbsp; 6 05:26 libct_test_file_ns<o:p></o:p></p>
<p class="MsoNormal">---------- 1 root root&nbsp;&nbsp;&nbsp; 0 Feb&nbsp; 6 05:26 new<o:p></o:p></p>
<p class="MsoNormal">drw------- 2 root root 4096 Feb&nbsp; 6 05:26 proc<o:p></o:p></p>
<p class="MsoNormal">drw------- 2 root root 4096 Feb&nbsp; 6 05:26 secret-dir<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">root@ubuntu-mona:/home/monali/libct/master-19Jan/libct-master/test# ls -al libct_test_root_ns/<o:p></o:p></p>
<p class="MsoNormal">total 32<o:p></o:p></p>
<p class="MsoNormal">drw------- 8 root root 4096 Feb&nbsp; 6 05:26 .<o:p></o:p></p>
<p class="MsoNormal">drwxr-xr-x 5 root root 4096 Feb&nbsp; 6 06:26 ..<o:p></o:p></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow">drwxr-xr-x 2 root root 4096 Feb&nbsp; 6 05:26 bin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow">drwxr-xr-x 2 root root 4096 Feb&nbsp; 6 05:26 lib<o:p></o:p></span></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow">drwxr-xr-x 2 root root 4096 Feb&nbsp; 6 05:26 lib64</span><o:p></o:p></p>
<p class="MsoNormal">drwxr-xr-x 2 root root 4096 Feb&nbsp; 6 05:26 libct_test_devpts<o:p></o:p></p>
<p class="MsoNormal">---------- 1 root root&nbsp;&nbsp;&nbsp; 0 Feb&nbsp; 6 05:26 libct_test_file_ns<o:p></o:p></p>
<p class="MsoNormal">---------- 1 root root&nbsp;&nbsp;&nbsp; 0 Feb&nbsp; 6 05:26 new<o:p></o:p></p>
<p class="MsoNormal">drw------- 2 root root 4096 Feb&nbsp; 6 05:26 proc<o:p></o:p></p>
<p class="MsoNormal">drw------- 2 root root 4096 Feb&nbsp; 6 05:26 secret-dir<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Thanking you in advance. <o:p></o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Monali.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>