<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sssd.git/src/python, branch sudo1-13</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/'/>
<entry>
<title>pysss_nss_idmap: Fix typos in python documentation</title>
<updated>2017-09-13T07:46:35+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2017-09-06T08:28:49+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=0e3091daa2864e9217e9f3925a36255e66a198b5'/>
<id>0e3091daa2864e9217e9f3925a36255e66a198b5</id>
<content type='text'>
s/dictonary/dictionary/g

Reviewed-by: Sumit Bose &lt;sbose@redhat.com&gt;
(cherry picked from commit e7fd33642a16cbb2cd814d3578c28affcf16f68c)
(cherry picked from commit 0d5e92b3ce507f8c46d3605729abc69d8310ff93)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
s/dictonary/dictionary/g

Reviewed-by: Sumit Bose &lt;sbose@redhat.com&gt;
(cherry picked from commit e7fd33642a16cbb2cd814d3578c28affcf16f68c)
(cherry picked from commit 0d5e92b3ce507f8c46d3605729abc69d8310ff93)
</pre>
</div>
</content>
</entry>
<entry>
<title>pysss_nss_idmap: return same type as it is in module constants</title>
<updated>2017-09-13T07:45:49+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2017-09-06T08:19:58+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=26222cae53b1d0ac13a6ca00e13a0bf142775a12'/>
<id>26222cae53b1d0ac13a6ca00e13a0bf142775a12</id>
<content type='text'>
The python module pysss_nss_idmap contains few module constants
which should be used (based on python documentation) for checking
type of results.

e.g.
    getsidbyid(...)
        getsidbyid(id or list/tuple of id) -&gt; dict(id =&gt; dict(results))
        Returns a dictionary with a dictionary of results for each given
        POSIX ID. The result dictionary contains the SID and the type of the
        object which can be accessed with the key constants SID_KEY and
        TYPE_KEY, respectively.

However, type of module constant and type of returned key had different type
with python3 due to different handling of strings. This patch unifies it
to string. The same as it is in python2.

Resolves:
https://pagure.io/SSSD/sssd/issue/3491

Reviewed-by: Sumit Bose &lt;sbose@redhat.com&gt;
(cherry picked from commit cc4d6435ef49738a02ddfc6072f1197d7f8f7319)
(cherry picked from commit 76d0f9091c43676957ae8f62f1c84fb3c25ce563)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The python module pysss_nss_idmap contains few module constants
which should be used (based on python documentation) for checking
type of results.

e.g.
    getsidbyid(...)
        getsidbyid(id or list/tuple of id) -&gt; dict(id =&gt; dict(results))
        Returns a dictionary with a dictionary of results for each given
        POSIX ID. The result dictionary contains the SID and the type of the
        object which can be accessed with the key constants SID_KEY and
        TYPE_KEY, respectively.

However, type of module constant and type of returned key had different type
with python3 due to different handling of strings. This patch unifies it
to string. The same as it is in python2.

Resolves:
https://pagure.io/SSSD/sssd/issue/3491

Reviewed-by: Sumit Bose &lt;sbose@redhat.com&gt;
(cherry picked from commit cc4d6435ef49738a02ddfc6072f1197d7f8f7319)
(cherry picked from commit 76d0f9091c43676957ae8f62f1c84fb3c25ce563)
</pre>
</div>
</content>
</entry>
<entry>
<title>Suppres implicit-fallthrough from gcc 7</title>
<updated>2017-09-01T14:15:12+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2017-01-30T11:17:25+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=44a96543957234a5d450e140565a60c488e43d14'/>
<id>44a96543957234a5d450e140565a60c488e43d14</id>
<content type='text'>
Some kind of comments are recognized by gcc7 but they are ignored with
-Wimplicit-fallthrough=5 and only attributes disable the warning.

Reviewed-by: Fabiano Fidêncio &lt;fidencio@redhat.com&gt;
(cherry picked from commit 2e505786d6d9d537f5b6631099862f6b93e2e687)
(cherry picked from commit ff9d6533654d4529e681fbbfa6f118f975e5a333)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some kind of comments are recognized by gcc7 but they are ignored with
-Wimplicit-fallthrough=5 and only attributes disable the warning.

Reviewed-by: Fabiano Fidêncio &lt;fidencio@redhat.com&gt;
(cherry picked from commit 2e505786d6d9d537f5b6631099862f6b93e2e687)
(cherry picked from commit ff9d6533654d4529e681fbbfa6f118f975e5a333)
</pre>
</div>
</content>
</entry>
<entry>
<title>pyhbac: Fix warning Wsign-compare</title>
<updated>2016-10-17T14:41:13+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2015-11-19T14:17:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=085746864de710adfa506c342434722ad69c3d85'/>
<id>085746864de710adfa506c342434722ad69c3d85</id>
<content type='text'>
src/python/pyhbac.c: In function ‘HbacRuleElement_repr’:
src/python/pyhbac.c:506:59: error: comparison between
    signed and unsigned integer expressions [-Werror=sign-compare]
     if (strnames == NULL || strgroups == NULL || category == -1) {
                                                           ^
src/python/pyhbac.c: In function ‘HbacRuleElement_to_native’:
src/python/pyhbac.c:614:51: error: comparison between
    signed and unsigned integer expressions [-Werror=sign-compare]
     if (!el-&gt;names || !el-&gt;groups || el-&gt;category == -1) {
                                                   ^

The static function native_category had type of terurn value uint32_t
But it also could return -1 which indicated an error.

It's better to don't mix return code with returned value.

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
(cherry picked from commit f47a339d7794cd5a24d368b3b3640452686e45a5)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
src/python/pyhbac.c: In function ‘HbacRuleElement_repr’:
src/python/pyhbac.c:506:59: error: comparison between
    signed and unsigned integer expressions [-Werror=sign-compare]
     if (strnames == NULL || strgroups == NULL || category == -1) {
                                                           ^
src/python/pyhbac.c: In function ‘HbacRuleElement_to_native’:
src/python/pyhbac.c:614:51: error: comparison between
    signed and unsigned integer expressions [-Werror=sign-compare]
     if (!el-&gt;names || !el-&gt;groups || el-&gt;category == -1) {
                                                   ^

The static function native_category had type of terurn value uint32_t
But it also could return -1 which indicated an error.

It's better to don't mix return code with returned value.

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
(cherry picked from commit f47a339d7794cd5a24d368b3b3640452686e45a5)
</pre>
</div>
</content>
</entry>
<entry>
<title>pysss_murmur: Fix warning Wsign-compare</title>
<updated>2016-10-17T14:41:05+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2015-11-19T13:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=9341809d4428cd187aefdb2871afffb327447002'/>
<id>9341809d4428cd187aefdb2871afffb327447002</id>
<content type='text'>
src/python/pysss_murmur.c: In function ‘py_murmurhash3’:
src/python/pysss_murmur.c:47:17: error: comparison between
     signed and unsigned integer expressions [-Werror=sign-compare]
         key_len &gt; strlen(key)) {
                 ^

uint32_t murmurhash3(const char *key, int len, uint32_t seed)
The second argument of the function murmurhash3 has type int.
But the code expects to be unsigned integer.

There is code in python wrapper py_murmurhash3
which check boundaries of that argument.
It should be an unsigned "key_len &gt; INT_MAX || key_len &lt; 0".
An exception should be thrown for negative number.

Moreover, the length should be shorter then a length of input string.
The strlen returns size_t which is unsigned and key_len is signed long.
We already checked that value is unsigned so
we can safely cast key_len to size_t

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
(cherry picked from commit 2ff8131cf02decaf0dd0754e843732fe7774fc59)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
src/python/pysss_murmur.c: In function ‘py_murmurhash3’:
src/python/pysss_murmur.c:47:17: error: comparison between
     signed and unsigned integer expressions [-Werror=sign-compare]
         key_len &gt; strlen(key)) {
                 ^

uint32_t murmurhash3(const char *key, int len, uint32_t seed)
The second argument of the function murmurhash3 has type int.
But the code expects to be unsigned integer.

There is code in python wrapper py_murmurhash3
which check boundaries of that argument.
It should be an unsigned "key_len &gt; INT_MAX || key_len &lt; 0".
An exception should be thrown for negative number.

Moreover, the length should be shorter then a length of input string.
The strlen returns size_t which is unsigned and key_len is signed long.
We already checked that value is unsigned so
we can safely cast key_len to size_t

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
(cherry picked from commit 2ff8131cf02decaf0dd0754e843732fe7774fc59)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos reported by lintian</title>
<updated>2016-02-23T11:07:30+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2016-02-12T21:05:21+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=7870820e8b188d755fef9fb31ef95b518c0f905b'/>
<id>7870820e8b188d755fef9fb31ef95b518c0f905b</id>
<content type='text'>
Reviewed-by: Pavel Březina &lt;pbrezina@redhat.com&gt;
(cherry picked from commit 42604cc8d11743febf5aa892cb3a7d3c32bfed48)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed-by: Pavel Březina &lt;pbrezina@redhat.com&gt;
(cherry picked from commit 42604cc8d11743febf5aa892cb3a7d3c32bfed48)
</pre>
</div>
</content>
</entry>
<entry>
<title>UTIL: Remove python wrapper sss_python_unicode_from_string</title>
<updated>2015-02-25T07:38:29+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2015-02-09T18:38:42+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=e4796d5ed8e08be7f3767e12753389b18a2ce9f0'/>
<id>e4796d5ed8e08be7f3767e12753389b18a2ce9f0</id>
<content type='text'>
The function PyUnicode_FromString is available in python &gt;= 2.6

Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function PyUnicode_FromString is available in python &gt;= 2.6

Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UTIL: Remove python wrapper sss_python_set_check</title>
<updated>2015-02-25T07:38:25+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2015-02-09T18:30:39+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=a63b368a025a61edf41a3d5ce34f325b03295cf6'/>
<id>a63b368a025a61edf41a3d5ce34f325b03295cf6</id>
<content type='text'>
The macro PySet_Check is defined in python &gt;= 2.6

Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The macro PySet_Check is defined in python &gt;= 2.6

Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UTIL: Remove python wrapper sss_python_set_add</title>
<updated>2015-02-25T07:38:23+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2015-02-09T18:23:44+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=887edd6b7c53fde44eb9f9060e09db5cd981ba37'/>
<id>887edd6b7c53fde44eb9f9060e09db5cd981ba37</id>
<content type='text'>
The function PySet_Add is available in python &gt;= 2.6

Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function PySet_Add is available in python &gt;= 2.6

Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UTIL: Remove python wrapper sss_python_set_new</title>
<updated>2015-02-25T07:38:20+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2015-02-09T18:19:55+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=9eabaad5e0f3f20a6bcec0629342584c244a79bc'/>
<id>9eabaad5e0f3f20a6bcec0629342584c244a79bc</id>
<content type='text'>
The function PySet_New is available in python &gt;= 2.6

Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function PySet_New is available in python &gt;= 2.6

Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
