<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sssd.git/src/util/crypto, branch subdomfo</title>
<subtitle>sssd with jhrozek's patches</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/'/>
<entry>
<title>CRYPTO: Use unprefixed version of function stpncpy</title>
<updated>2014-05-18T03:40:57+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2014-05-17T16:34:23+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=83e1ea9e24aabe6ade180649ecfc9c253ad19395'/>
<id>83e1ea9e24aabe6ade180649ecfc9c253ad19395</id>
<content type='text'>
glibc contains two versions of finction stpncpy
sh-4.2$ nm --dynamic --defined-only /lib64/libc.so.6 | grep stpncpy
0000003ce1c89b00 i stpncpy
0000003ce1c89b00 i __stpncpy
0000003ce1d040a0 T __stpncpy_chk

We should use more portable version of stpncpy without prefix with underscores.

The function __stpncpy was used in initial veersion
e65c65fc710fa030bfb8319efc43fcdc9ce5a26f, which was based on
http://people.redhat.com/drepper/SHA-crypt.txt

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
glibc contains two versions of finction stpncpy
sh-4.2$ nm --dynamic --defined-only /lib64/libc.so.6 | grep stpncpy
0000003ce1c89b00 i stpncpy
0000003ce1c89b00 i __stpncpy
0000003ce1d040a0 T __stpncpy_chk

We should use more portable version of stpncpy without prefix with underscores.

The function __stpncpy was used in initial veersion
e65c65fc710fa030bfb8319efc43fcdc9ce5a26f, which was based on
http://people.redhat.com/drepper/SHA-crypt.txt

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CRYPTO: Fix access to uninitialized data</title>
<updated>2014-04-28T20:14:23+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2014-03-18T17:29:43+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=9faab6d48145d3a0d7b9a225ed35bdcaa32eca2c'/>
<id>9faab6d48145d3a0d7b9a225ed35bdcaa32eca2c</id>
<content type='text'>
The size of output buffer(obufsize) was longer than initialised data.
In calculation, uint32_t was used for length of the cryptotext,
but uint16_t was written into buffer. The end of buffer was not initialised
and it caused valgrind warning.

 Use of uninitialised value of size 8
    at 0x37AE40F363: pl_base64_encode_buffer (nssb64e.c:180)
    by 0x37AE40F6ED: NSSBase64_EncodeItem_Util (nssb64e.c:482)
    by 0x37AE40F87A: BTOA_DataToAscii_Util (nssb64e.c:721)
    by 0x40208A: sss_base64_encode (nss_base64.c:47)
    by 0x403305: sss_password_encrypt (nss_obfuscate.c:358)

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The size of output buffer(obufsize) was longer than initialised data.
In calculation, uint32_t was used for length of the cryptotext,
but uint16_t was written into buffer. The end of buffer was not initialised
and it caused valgrind warning.

 Use of uninitialised value of size 8
    at 0x37AE40F363: pl_base64_encode_buffer (nssb64e.c:180)
    by 0x37AE40F6ED: NSSBase64_EncodeItem_Util (nssb64e.c:482)
    by 0x37AE40F87A: BTOA_DataToAscii_Util (nssb64e.c:721)
    by 0x40208A: sss_base64_encode (nss_base64.c:47)
    by 0x403305: sss_password_encrypt (nss_obfuscate.c:358)

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Update DEBUG* invocations to use new levels</title>
<updated>2014-02-12T21:31:02+00:00</updated>
<author>
<name>Nikolai Kondrashov</name>
<email>Nikolai.Kondrashov@redhat.com</email>
</author>
<published>2014-02-12T15:12:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=83bf46f4066e3d5e838a32357c201de9bd6ecdfd'/>
<id>83bf46f4066e3d5e838a32357c201de9bd6ecdfd</id>
<content type='text'>
Use a script to update DEBUG* macro invocations, which use literal
numbers for levels, to use bitmask macros instead:

grep -rl --include '*.[hc]' DEBUG . |
    while read f; do
        mv "$f"{,.orig}
        perl -e 'use strict;
                 use File::Slurp;
                 my @map=qw"
                    SSSDBG_FATAL_FAILURE
                    SSSDBG_CRIT_FAILURE
                    SSSDBG_OP_FAILURE
                    SSSDBG_MINOR_FAILURE
                    SSSDBG_CONF_SETTINGS
                    SSSDBG_FUNC_DATA
                    SSSDBG_TRACE_FUNC
                    SSSDBG_TRACE_LIBS
                    SSSDBG_TRACE_INTERNAL
                    SSSDBG_TRACE_ALL
                 ";
                 my $text=read_file(\*STDIN);
                 my $repl;
                 $text=~s/
                            ^
                            (
                                .*
                                \b
                                (DEBUG|DEBUG_PAM_DATA|DEBUG_GR_MEM)
                                \s*
                                \(\s*
                            )(
                                [0-9]
                            )(
                                \s*,
                            )
                            (
                                \s*
                            )
                            (
                                .*
                            )
                            $
                         /
                            $repl = $1.$map[$3].$4.$5.$6,
                            length($repl) &lt;= 80
                                ? $repl
                                : $1.$map[$3].$4."\n".(" " x length($1)).$6
                         /xmge;
                 print $text;
        ' &lt; "$f.orig" &gt; "$f"
        rm "$f.orig"
    done

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
Reviewed-by: Simo Sorce &lt;simo@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a script to update DEBUG* macro invocations, which use literal
numbers for levels, to use bitmask macros instead:

grep -rl --include '*.[hc]' DEBUG . |
    while read f; do
        mv "$f"{,.orig}
        perl -e 'use strict;
                 use File::Slurp;
                 my @map=qw"
                    SSSDBG_FATAL_FAILURE
                    SSSDBG_CRIT_FAILURE
                    SSSDBG_OP_FAILURE
                    SSSDBG_MINOR_FAILURE
                    SSSDBG_CONF_SETTINGS
                    SSSDBG_FUNC_DATA
                    SSSDBG_TRACE_FUNC
                    SSSDBG_TRACE_LIBS
                    SSSDBG_TRACE_INTERNAL
                    SSSDBG_TRACE_ALL
                 ";
                 my $text=read_file(\*STDIN);
                 my $repl;
                 $text=~s/
                            ^
                            (
                                .*
                                \b
                                (DEBUG|DEBUG_PAM_DATA|DEBUG_GR_MEM)
                                \s*
                                \(\s*
                            )(
                                [0-9]
                            )(
                                \s*,
                            )
                            (
                                \s*
                            )
                            (
                                .*
                            )
                            $
                         /
                            $repl = $1.$map[$3].$4.$5.$6,
                            length($repl) &lt;= 80
                                ? $repl
                                : $1.$map[$3].$4."\n".(" " x length($1)).$6
                         /xmge;
                 print $text;
        ' &lt; "$f.orig" &gt; "$f"
        rm "$f.orig"
    done

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
Reviewed-by: Simo Sorce &lt;simo@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make DEBUG macro invocations variadic</title>
<updated>2014-02-12T21:30:55+00:00</updated>
<author>
<name>Nikolai Kondrashov</name>
<email>Nikolai.Kondrashov@redhat.com</email>
</author>
<published>2014-02-12T15:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=a3c8390d19593b1e5277d95bfb4ab206d4785150'/>
<id>a3c8390d19593b1e5277d95bfb4ab206d4785150</id>
<content type='text'>
Use a script to update DEBUG macro invocations to use it as a variadic
macro, supplying format string and its arguments directly, instead of
wrapping them in parens.

This script was used to update the code:

grep -rwl --include '*.[hc]' DEBUG . |
    while read f; do
        mv "$f"{,.orig}
        perl -e \
            'use strict;
             use File::Slurp;
             my $text=read_file(\*STDIN);
             $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs;
             print $text;' &lt; "$f.orig" &gt; "$f"
        rm "$f.orig"
    done

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
Reviewed-by: Simo Sorce &lt;simo@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a script to update DEBUG macro invocations to use it as a variadic
macro, supplying format string and its arguments directly, instead of
wrapping them in parens.

This script was used to update the code:

grep -rwl --include '*.[hc]' DEBUG . |
    while read f; do
        mv "$f"{,.orig}
        perl -e \
            'use strict;
             use File::Slurp;
             my $text=read_file(\*STDIN);
             $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs;
             print $text;' &lt; "$f.orig" &gt; "$f"
        rm "$f.orig"
    done

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Stephen Gallagher &lt;sgallagh@redhat.com&gt;
Reviewed-by: Simo Sorce &lt;simo@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Include header file in implementation module.</title>
<updated>2013-09-24T13:15:41+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2013-09-21T17:10:13+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=5cd4414fce1e0eb4133dfc6fc828bf25c8a959f9'/>
<id>5cd4414fce1e0eb4133dfc6fc828bf25c8a959f9</id>
<content type='text'>
Declarations of public functions was in header files,
but header files was not included in implementation file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Declarations of public functions was in header files,
but header files was not included in implementation file.
</pre>
</div>
</content>
</entry>
<entry>
<title>UTIL: Create new wraper header file sss_endian.h</title>
<updated>2013-08-28T20:02:49+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2013-08-28T06:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=1658c567191c35beaddffafdb079abe33248037b'/>
<id>1658c567191c35beaddffafdb079abe33248037b</id>
<content type='text'>
Some platform have header file endian.h and anothers have sys/endian.h.
We nedd to use conditional build to handle it correctly, therefore new header
file sss_endian.h was created.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some platform have header file endian.h and anothers have sys/endian.h.
We nedd to use conditional build to handle it correctly, therefore new header
file sss_endian.h was created.
</pre>
</div>
</content>
</entry>
<entry>
<title>Check for correct variable name</title>
<updated>2013-04-03T11:26:41+00:00</updated>
<author>
<name>Jakub Hrozek</name>
<email>jhrozek@redhat.com</email>
</author>
<published>2013-04-03T09:18:31+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=274fe6a4f8bcb23e31929430110c0b52e9ce233a'/>
<id>274fe6a4f8bcb23e31929430110c0b52e9ce233a</id>
<content type='text'>
https://fedorahosted.org/sssd/ticket/1864
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://fedorahosted.org/sssd/ticket/1864
</pre>
</div>
</content>
</entry>
<entry>
<title>Out-of-bounds read fix in hmac-sha-1</title>
<updated>2012-09-07T12:06:52+00:00</updated>
<author>
<name>Ondrej Kos</name>
<email>okos@redhat.com</email>
</author>
<published>2012-09-07T08:47:03+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=73505920a70e33977e84c69b4c3c598f683b7526'/>
<id>73505920a70e33977e84c69b4c3c598f683b7526</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>libcrypto fully implemented</title>
<updated>2012-06-26T13:01:26+00:00</updated>
<author>
<name>George McCollister</name>
<email>George.McCollister@gmail.com</email>
</author>
<published>2012-06-19T17:36:28+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=e07a94a66985b674c5df11ca466792902164c4e2'/>
<id>e07a94a66985b674c5df11ca466792902164c4e2</id>
<content type='text'>
Implemented working versions of the following functions for libcrypto:
 sss_base64_encode
 sss_base64_decode
 sss_hmac_sha1
 sss_password_encrypt
 sss_password_decrypt

test_encrypt_decrypt now expects EOK from libcrypto.
test_hmac_sha1 now expects EOK from libcrypto.
Added test_base64_encode to test base64 encoding implementation.
Added test_base64_decode to test base64 decoding implementation.

Signed-off-by: George McCollister &lt;George.McCollister@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implemented working versions of the following functions for libcrypto:
 sss_base64_encode
 sss_base64_decode
 sss_hmac_sha1
 sss_password_encrypt
 sss_password_decrypt

test_encrypt_decrypt now expects EOK from libcrypto.
test_hmac_sha1 now expects EOK from libcrypto.
Added test_base64_encode to test base64 encoding implementation.
Added test_base64_decode to test base64 decoding implementation.

Signed-off-by: George McCollister &lt;George.McCollister@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UTIL: Add HMAC-SHA-1 function</title>
<updated>2012-04-24T13:50:56+00:00</updated>
<author>
<name>Jan Cholasta</name>
<email>jcholast@redhat.com</email>
</author>
<published>2012-04-17T15:03:23+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=b35f20cd8ecdc8308a3201e55752fb0443ec6ae4'/>
<id>b35f20cd8ecdc8308a3201e55752fb0443ec6ae4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
