<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:00:37 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-13361] setregid or setreuid does not work as expected when cli2mdt SSK is on</title>
                <link>https://jira.whamcloud.com/browse/LU-13361</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;During tests of gocryptfs 1.7 I found that it didn&apos;t work on-top of Lustre with cli2mdt SSK. After a bit of tracing I found that after some setreuid/setregid calls it hadn&apos;t got permission to open files.&lt;/p&gt;

&lt;p&gt;I&apos;ve attached a test program that causes the issue. The 501 uid/gid is arbitrary, but it must be run in a directory with with the same uid/gid as chosen here.&lt;/p&gt;

&lt;p&gt;When cli2mdt SSK is of it works as expected. When cli2mdt SSK is on it returns:&lt;/p&gt;

&lt;p&gt;&quot;open: Permission denied&quot;&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Hans Henrik&lt;/p&gt;</description>
                <environment>Centos 7.7. ZFS on both MDTs and OSTs. TCP network.</environment>
        <key id="58379">LU-13361</key>
            <summary>setregid or setreuid does not work as expected when cli2mdt SSK is on</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="sebastien">Sebastien Buisson</assignee>
                                    <reporter username="happe">Hans Henrik Happe</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Mar 2020 13:31:51 +0000</created>
                <updated>Fri, 15 May 2020 07:17:01 +0000</updated>
                                            <version>Lustre 2.12.3</version>
                    <version>Lustre 2.12.4</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="270241" author="sebastien" created="Thu, 14 May 2020 18:31:44 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I am able to reproduce this behavior. It stems from the fact that when using SSK, Lustre makes use of the identity upcall that is defined for the MDT targets. You can check with the command:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# lctl get_param mdt.*.identity_upcall
mdt.lustre-MDT0000.identity_upcall=/usr/sbin/l_getidentity
mdt.lustre-MDT0001.identity_upcall=/usr/sbin/l_getidentity
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;By default, as shown above, l_getidentity is defined as the identity upcall. For it to handle permissions, you have to create a file named &lt;tt&gt;/etc/lustre/perm.conf&lt;/tt&gt; on your MDS nodes, with the following syntax for each line:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;permission file format is like this:
{nid} {uid} {perms}

&apos;*&apos; nid means any nid
&apos;*&apos; uid means any uid
the valid values for perms are:
setuid/setgid/setgrp		-- enable corresponding perm
nosetuid/nosetgid/nosetgrp	-- disable corresponding perm
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In the case of your test program, you can insert a line with:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;* 0 setuid,setgid
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It will grant setuid and setgid permissions to user root, from any client node.&lt;/p&gt;

&lt;p&gt;Once you have created the file, remember to flush the identity cache on your MDS nodes by doing:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;lctl set_param mdt.*.identity_flush=-1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This way, new content in &lt;tt&gt;/etc/lustre/perm.conf&lt;/tt&gt; will be taken into account.&lt;/p&gt;

&lt;p&gt;Alternatively, you can disable identity upcall by doing:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;lctl set_param mdt.*.identity_upcall=NONE
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In this case, Lustre grants setuid, setgid and setgrp permissions.&lt;/p&gt;</comment>
                            <comment id="270285" author="happe" created="Fri, 15 May 2020 06:46:47 +0000"  >&lt;p&gt;Thanks Sebastien, that works for me.&lt;/p&gt;

&lt;p&gt;I would love to help document this, but I&apos;m not sure why there is a difference when turning on SSK?&lt;/p&gt;</comment>
                            <comment id="270286" author="sebastien" created="Fri, 15 May 2020 07:17:01 +0000"  >&lt;p&gt;This is because when SSK is enabled, credentials checking is carried out a little bit differently on server side.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="34456" name="test.c" size="239" author="happe" created="Mon, 16 Mar 2020 13:29:15 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i00vjb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>