storage: unify permission formatting

Volume and pool formatting functions took different approaches to
unspecified uids/gids.  When unknown, it is always parsed as -1, but one
of the functions formatted it as unsigned int (wrong) and one as
int (better).  Due to that, our two of our XML files from tests cannot
be parsed on 32-bit machines.

RNG schema needs to be modified as well, but because both
storagepool.rng and storagevol.rng need same schema for permission
element, save some space by moving it to storagecommon.rng.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander
2014-12-10 13:54:10 +01:00
parent e3435caf6a
commit d2632d60aa
9 changed files with 73 additions and 61 deletions

View File

@@ -0,0 +1,17 @@
<volume type='netdir'>
<name>dir</name>
<key>vol/dir</key>
<source>
</source>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<target>
<path>gluster://example.com/vol/dir</path>
<format type='dir'/>
<permissions>
<mode>0600</mode>
<owner>-1</owner>
<group>-1</group>
</permissions>
</target>
</volume>

View File

@@ -10,8 +10,8 @@
<format type='dir'/>
<permissions>
<mode>0600</mode>
<owner>4294967295</owner>
<group>4294967295</group>
<owner>-1</owner>
<group>-1</group>
</permissions>
</target>
</volume>

View File

@@ -9,8 +9,8 @@
<format type='unknown'/>
<permissions>
<mode>0600</mode>
<owner>4294967295</owner>
<group>4294967295</group>
<owner>-1</owner>
<group>-1</group>
</permissions>
</target>
</volume>