<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sssd.git/src/providers/proxy/proxy_auth.c, 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>PROXY: Do not register signal with SA_SIGINFO</title>
<updated>2015-05-31T17:35:57+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2015-05-28T14:28:08+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=df233bce93c6e6752cf22cd4244c85c94d68b17b'/>
<id>df233bce93c6e6752cf22cd4244c85c94d68b17b</id>
<content type='text'>
Argument "siginfo_t *siginfo" (void *__siginfo) was not used in
signal handlers pc_init_sig_handler, proxy_child_sig_handler.

siginfo is mostly used for additional information for about signal
and precesses (@see man 2 sigaction) and we store needed information
in custom context (private_data); It's tevent style.

Why backend crashed:
proxy_child_init_send creates request; forks a process and register
handler for signal SIGCHLD. Talloc parent of tevent_signal is previously
created request.

If proxy_child fails (return code is not 0) then SIGCHLD is received
handler pc_init_sig_handler is called. However pc_init_sig_handler can call
tevent_req_error for request which calls request callback and released
request.

tevent_signal_destructor was called as a part of releasing
tevent_signal. The destructor cleared siginfo in ring buffer for first time.
Then tevent tried to clear the same siginfo in ring buffer for the secont time
after returning from signal hander (pc_init_sig_handler). But it was already
cleared and it caused dereference of NULL pointer.

Resolves:
https://fedorahosted.org/sssd/ticket/2654

Reviewed-by: Michal Židek &lt;mzidek@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Argument "siginfo_t *siginfo" (void *__siginfo) was not used in
signal handlers pc_init_sig_handler, proxy_child_sig_handler.

siginfo is mostly used for additional information for about signal
and precesses (@see man 2 sigaction) and we store needed information
in custom context (private_data); It's tevent style.

Why backend crashed:
proxy_child_init_send creates request; forks a process and register
handler for signal SIGCHLD. Talloc parent of tevent_signal is previously
created request.

If proxy_child fails (return code is not 0) then SIGCHLD is received
handler pc_init_sig_handler is called. However pc_init_sig_handler can call
tevent_req_error for request which calls request callback and released
request.

tevent_signal_destructor was called as a part of releasing
tevent_signal. The destructor cleared siginfo in ring buffer for first time.
Then tevent tried to clear the same siginfo in ring buffer for the secont time
after returning from signal hander (pc_init_sig_handler). But it was already
cleared and it caused dereference of NULL pointer.

Resolves:
https://fedorahosted.org/sssd/ticket/2654

Reviewed-by: Michal Židek &lt;mzidek@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix warning: equality comparison with extraneous parentheses</title>
<updated>2015-02-11T19:38:42+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2014-09-15T14:05:30+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=5085d263f2f084778b1314fc5e808668c3758d82'/>
<id>5085d263f2f084778b1314fc5e808668c3758d82</id>
<content type='text'>
Example of warning:
src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23:
  error: equality comparison with extraneous parentheses
  [-Werror,-Wparentheses-equality]
    if (((wbc_status) == WBC_ERR_SUCCESS)) {
         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23:
  note: remove extraneous parentheses around the comparison
  to silence this warning
    if (((wbc_status) == WBC_ERR_SUCCESS)) {
        ~             ^                 ~
src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23:
  note: use '=' to turn this equality comparison into an assignment
    if (((wbc_status) == WBC_ERR_SUCCESS)) {
                      ^~
                      =

The reason is definition of some macros which were used in if conditions.

Reviewed-by: Michal Židek &lt;mzidek@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Example of warning:
src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23:
  error: equality comparison with extraneous parentheses
  [-Werror,-Wparentheses-equality]
    if (((wbc_status) == WBC_ERR_SUCCESS)) {
         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23:
  note: remove extraneous parentheses around the comparison
  to silence this warning
    if (((wbc_status) == WBC_ERR_SUCCESS)) {
        ~             ^                 ~
src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23:
  note: use '=' to turn this equality comparison into an assignment
    if (((wbc_status) == WBC_ERR_SUCCESS)) {
                      ^~
                      =

The reason is definition of some macros which were used in if conditions.

Reviewed-by: Michal Židek &lt;mzidek@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sbus: Use constants to make dbus calls</title>
<updated>2014-02-24T10:15:06+00:00</updated>
<author>
<name>Stef Walter</name>
<email>stefw@redhat.com</email>
</author>
<published>2014-01-10T10:23:33+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=b668c77874c6fed325471bdcf5954979a0d734e2'/>
<id>b668c77874c6fed325471bdcf5954979a0d734e2</id>
<content type='text'>
This allows us to remove duplicated information, and have the
compiler check that when an method name is changed or removed
the callers are updated.

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Sumit Bose &lt;sbose@redhat.com&gt;
Reviewed-by: Lukáš Slebodník &lt;lslebodn@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>
This allows us to remove duplicated information, and have the
compiler check that when an method name is changed or removed
the callers are updated.

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Sumit Bose &lt;sbose@redhat.com&gt;
Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
Reviewed-by: Simo Sorce &lt;simo@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>SYSDB: Drop the sysdb_ctx parameter - module sysdb_ops (part 2)</title>
<updated>2013-11-15T19:20:19+00:00</updated>
<author>
<name>Michal Zidek</name>
<email>mzidek@redhat.com</email>
</author>
<published>2013-10-17T12:17:56+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=d115f40c7a3999e3cbe705a2ff9cf0fd493f80fb'/>
<id>d115f40c7a3999e3cbe705a2ff9cf0fd493f80fb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix formating of variables with type: unsigned long</title>
<updated>2013-09-11T17:44:53+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2013-07-13T13:40:29+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=de3705b32718db199789580ed2e6299967753974'/>
<id>de3705b32718db199789580ed2e6299967753974</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>Making the authtok structure really opaque.</title>
<updated>2013-04-02T15:01:08+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2013-03-14T08:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=9acfb09f7969a69f58bd45c856b01700541853ca'/>
<id>9acfb09f7969a69f58bd45c856b01700541853ca</id>
<content type='text'>
Definition of structure sss_auth_token was removed from header file
authtok.h and there left only declaration of this structure.
Therefore only way how to use this structure is to use accessory function from
same header file.

To creating new empty authotok can only be used newly created function
sss_authtok_new(). TALLOC context was removed from copy and setter functions,
because pointer to stuct sss_auth_token is used as a memory context.

All declaration of struct sss_auth_token variables was replaced with
pointer to this structure and related changes was made in source code.

Function copy_pam_data can copy from argument src which was dynamically
allocated with function create_pam_data() or zero initialized struct pam_data
allocated on stack.

https://fedorahosted.org/sssd/ticket/1830
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Definition of structure sss_auth_token was removed from header file
authtok.h and there left only declaration of this structure.
Therefore only way how to use this structure is to use accessory function from
same header file.

To creating new empty authotok can only be used newly created function
sss_authtok_new(). TALLOC context was removed from copy and setter functions,
because pointer to stuct sss_auth_token is used as a memory context.

All declaration of struct sss_auth_token variables was replaced with
pointer to this structure and related changes was made in source code.

Function copy_pam_data can copy from argument src which was dynamically
allocated with function create_pam_data() or zero initialized struct pam_data
allocated on stack.

https://fedorahosted.org/sssd/ticket/1830
</pre>
</div>
</content>
</entry>
<entry>
<title>Add be_req_get_data() helper funciton.</title>
<updated>2013-01-21T21:17:34+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2013-01-11T23:13:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=cbaba2f47da96c4191971bce86f03afb3f88864a'/>
<id>cbaba2f47da96c4191971bce86f03afb3f88864a</id>
<content type='text'>
In preparation for making struct be_req opaque.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation for making struct be_req opaque.
</pre>
</div>
</content>
</entry>
</feed>
