<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sssd.git/src/sss_client, branch nonroot-libcap</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>PAM: Add domains= option to pam_sss</title>
<updated>2014-09-29T16:27:16+00:00</updated>
<author>
<name>Daniel Gollub</name>
<email>dgollub at brocade.com</email>
</author>
<published>2014-09-27T11:06:44+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=663fd9bcdcc6b299785ba3434532cd7e6c462bff'/>
<id>663fd9bcdcc6b299785ba3434532cd7e6c462bff</id>
<content type='text'>
Design document:
https://fedorahosted.org/sssd/wiki/DesignDocs/RestrictDomainsInPAM

Fixes:
https://fedorahosted.org/sssd/ticket/1021

Signed-off-by: Pavel Reichl &lt;preichl@redhat.com&gt;

Reviewed-by: Sven-Thorsten Dietrich &lt;sven@brocade.com&gt;
Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Design document:
https://fedorahosted.org/sssd/wiki/DesignDocs/RestrictDomainsInPAM

Fixes:
https://fedorahosted.org/sssd/ticket/1021

Signed-off-by: Pavel Reichl &lt;preichl@redhat.com&gt;

Reviewed-by: Sven-Thorsten Dietrich &lt;sven@brocade.com&gt;
Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libwbclient: avoid collision with Samba version</title>
<updated>2014-09-08T18:09:46+00:00</updated>
<author>
<name>Sumit Bose</name>
<email>sbose@redhat.com</email>
</author>
<published>2014-09-05T10:30:43+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=f3c85d900c4663854cc7bbae7d9f77867ed1f69b'/>
<id>f3c85d900c4663854cc7bbae7d9f77867ed1f69b</id>
<content type='text'>
Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Doxygen: replace &lt;pre&gt; with markdown table</title>
<updated>2014-09-02T12:33:05+00:00</updated>
<author>
<name>Sumit Bose</name>
<email>sbose@redhat.com</email>
</author>
<published>2014-08-29T08:44:00+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=316ff9ad6f959443ddadd54e9fe9ebf6c8052214'/>
<id>316ff9ad6f959443ddadd54e9fe9ebf6c8052214</id>
<content type='text'>
Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFSv4 client: (private) headers from libnfsidmap</title>
<updated>2014-09-02T08:56:40+00:00</updated>
<author>
<name>Noam Meltzer</name>
<email>tsnoam@gmail.com</email>
</author>
<published>2014-06-27T05:44:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=4466604d78e5ffd017e69e6861f7d78242b351fb'/>
<id>4466604d78e5ffd017e69e6861f7d78242b351fb</id>
<content type='text'>
The private headers are needed in order to:
nfsidmap_internal.h:
* definition of struct trans_func
* prototype for logger function
cfg.h + queue.h:
* prototype(s) for accessing rpc.idmpad configuration file

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Roland Mainz &lt;rmainz@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The private headers are needed in order to:
nfsidmap_internal.h:
* definition of struct trans_func
* prototype for logger function
cfg.h + queue.h:
* prototype(s) for accessing rpc.idmpad configuration file

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Roland Mainz &lt;rmainz@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NEW CLIENT: plugin for NFSv4 rpc.idmapd</title>
<updated>2014-09-02T08:56:07+00:00</updated>
<author>
<name>Noam Meltzer</name>
<email>tsnoam@gmail.com</email>
</author>
<published>2014-06-27T05:44:35+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=e9553c2961fa4f25b9d004a6a65b90837a13d8e1'/>
<id>e9553c2961fa4f25b9d004a6a65b90837a13d8e1</id>
<content type='text'>
Implementation of design document:
https://fedorahosted.org/sssd/wiki/DesignDocs/rpc.idmapd%20plugin

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Roland Mainz &lt;rmainz@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implementation of design document:
https://fedorahosted.org/sssd/wiki/DesignDocs/rpc.idmapd%20plugin

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Roland Mainz &lt;rmainz@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sss_client: Fix "struct sss_cli_mc_ctx" reinitialize-on-errors</title>
<updated>2014-08-22T14:31:10+00:00</updated>
<author>
<name>Nalin Dahyabhai</name>
<email>nalin@redhat.com</email>
</author>
<published>2014-08-18T21:40:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=5a4df83d769ace54f92513f0be78e753e0985a25'/>
<id>5a4df83d769ace54f92513f0be78e753e0985a25</id>
<content type='text'>
When we have difficulty setting up an sss_cli_mc_ctx structure, we try
to clean things up so that we'll be ready to try again the next time
we're called.

Part of that is closing the descriptor of the file if we've opened it
and using memset() to clear the structure.

Now that sss_nss_mc_get_ctx() does its work in two phases, and each one
may end up doing the cleanup, each needs to be careful to reset the
descriptor field so that the new value provided by memset() (0) isn't
mistakenly treated as a file which should be closed by the other.

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

Reviewed-by: Simo Sorce &lt;simo@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we have difficulty setting up an sss_cli_mc_ctx structure, we try
to clean things up so that we'll be ready to try again the next time
we're called.

Part of that is closing the descriptor of the file if we've opened it
and using memset() to clear the structure.

Now that sss_nss_mc_get_ctx() does its work in two phases, and each one
may end up doing the cleanup, each needs to be careful to reset the
descriptor field so that the new value provided by memset() (0) isn't
mistakenly treated as a file which should be closed by the other.

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

Reviewed-by: Simo Sorce &lt;simo@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libwbclient: SSSD implementation</title>
<updated>2014-08-21T16:00:38+00:00</updated>
<author>
<name>Sumit Bose</name>
<email>sbose@redhat.com</email>
</author>
<published>2014-07-15T16:13:24+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=885386b7e3f1c3e74b354576b98a092b0835d64e'/>
<id>885386b7e3f1c3e74b354576b98a092b0835d64e</id>
<content type='text'>
This patch implements the libwbclient API for Samba daemons and
utilities. The main purpose is to map Active Directory users and groups
identified by their SID to POSIX users and groups identified by their
POSIX UIDs and GIDs respectively.

The API is not fully implemented because SSSD does not support some AD
features like WINS or NTLM. Additionally this implementation has its
focus on the file-server use case and hence does not implement some
features which might be needed for a domain controller use case.

Some API calls are generic and independent of the backend like e.g.
converting binary SIDs and GUIDs into a string representation and back
or memory allocation and deallocation. These parts are taken from the
original Samba sources together with copyright and authors. Files
with'_sssd' as part of the name contain the SSSD related calls.

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

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements the libwbclient API for Samba daemons and
utilities. The main purpose is to map Active Directory users and groups
identified by their SID to POSIX users and groups identified by their
POSIX UIDs and GIDs respectively.

The API is not fully implemented because SSSD does not support some AD
features like WINS or NTLM. Additionally this implementation has its
focus on the file-server use case and hence does not implement some
features which might be needed for a domain controller use case.

Some API calls are generic and independent of the backend like e.g.
converting binary SIDs and GUIDs into a string representation and back
or memory allocation and deallocation. These parts are taken from the
original Samba sources together with copyright and authors. Files
with'_sssd' as part of the name contain the SSSD related calls.

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

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PAC: krb5_pac_verify failures should not be fatal</title>
<updated>2014-08-06T08:36:53+00:00</updated>
<author>
<name>Jakub Hrozek</name>
<email>jhrozek@redhat.com</email>
</author>
<published>2014-08-04T11:36:42+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=6e51d44a65b15c2f0491b0a8b452caac0bc00584'/>
<id>6e51d44a65b15c2f0491b0a8b452caac0bc00584</id>
<content type='text'>
As noted in the MIT KRB5 documentation, some servers send PAC with no
checksum, therefire the PAC validation should not be fatal, instead, we
should treat a failure from krb5_pac_verify as if there was no PAC at
all.

Reported on sssd-devel by Thomas Sondergaard
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As noted in the MIT KRB5 documentation, some servers send PAC with no
checksum, therefire the PAC validation should not be fatal, instead, we
should treat a failure from krb5_pac_verify as if there was no PAC at
all.

Reported on sssd-devel by Thomas Sondergaard
</pre>
</div>
</content>
</entry>
<entry>
<title>sss_client: Fix memory leak in nss_mc_{group,passwd}</title>
<updated>2014-07-23T19:08:39+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2014-07-09T17:03:30+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=9d876108620931e0941a115adf60bfd8d67459d9'/>
<id>9d876108620931e0941a115adf60bfd8d67459d9</id>
<content type='text'>
Memory leak can happen with long living clients where there are records with
colliding hashes; usually LDAP servers with many  users or groups.

Function sss_nss_mc_get_record allocates memory that is stored into "rec",
with next iteration variable rec is overriden with new record and old
one is lost and cannot be freed.

Example code flow:
src/sss_client/nss_mc_group.c:133: alloc_arg: "sss_nss_mc_get_record" allocates memory that is stored into "rec".
src/sss_client/nss_mc_common.c:216:13: alloc_fn: Storage is returned from allocation function "malloc".
src/sss_client/nss_mc_common.c:216:13: var_assign: Assigning: "copy_rec" = "malloc(rec_len)".
src/sss_client/nss_mc_common.c:225:9: noescape: Resource "copy_rec" is not freed or pointed-to in function "memcpy". [Note: The source code implementation of the function has been overridden by a builtin model.]
src/sss_client/nss_mc_common.c:239:5: var_assign: Assigning: "*_rec" = "copy_rec".
src/sss_client/nss_mc_group.c:163: noescape: Resource "rec" is not freed or pointed-to in "sss_nss_mc_next_slot_with_hash".
src/sss_client/nss_mc_common.c:294:60: noescape: "sss_nss_mc_next_slot_with_hash(struct sss_mc_rec *, uint32_t)" does not free or save its pointer parameter "rec".
src/sss_client/nss_mc_group.c:133: overwrite_var: Overwriting "rec" in call to "sss_nss_mc_get_record" leaks the storage that "rec" points to.
src/sss_client/nss_mc_common.c:239:5: write_notnull_to_parm: Assigning: "*_rec" = "copy_rec".

Reviewed-by: Michal Židek &lt;mzidek@redhat.com&gt;
Reviewed-by: Sumit Bose &lt;sbose@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Memory leak can happen with long living clients where there are records with
colliding hashes; usually LDAP servers with many  users or groups.

Function sss_nss_mc_get_record allocates memory that is stored into "rec",
with next iteration variable rec is overriden with new record and old
one is lost and cannot be freed.

Example code flow:
src/sss_client/nss_mc_group.c:133: alloc_arg: "sss_nss_mc_get_record" allocates memory that is stored into "rec".
src/sss_client/nss_mc_common.c:216:13: alloc_fn: Storage is returned from allocation function "malloc".
src/sss_client/nss_mc_common.c:216:13: var_assign: Assigning: "copy_rec" = "malloc(rec_len)".
src/sss_client/nss_mc_common.c:225:9: noescape: Resource "copy_rec" is not freed or pointed-to in function "memcpy". [Note: The source code implementation of the function has been overridden by a builtin model.]
src/sss_client/nss_mc_common.c:239:5: var_assign: Assigning: "*_rec" = "copy_rec".
src/sss_client/nss_mc_group.c:163: noescape: Resource "rec" is not freed or pointed-to in "sss_nss_mc_next_slot_with_hash".
src/sss_client/nss_mc_common.c:294:60: noescape: "sss_nss_mc_next_slot_with_hash(struct sss_mc_rec *, uint32_t)" does not free or save its pointer parameter "rec".
src/sss_client/nss_mc_group.c:133: overwrite_var: Overwriting "rec" in call to "sss_nss_mc_get_record" leaks the storage that "rec" points to.
src/sss_client/nss_mc_common.c:239:5: write_notnull_to_parm: Assigning: "*_rec" = "copy_rec".

Reviewed-by: Michal Židek &lt;mzidek@redhat.com&gt;
Reviewed-by: Sumit Bose &lt;sbose@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sss_client: thread safe initialisation of sss_cli_mc_ctx</title>
<updated>2014-07-23T19:08:28+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2014-07-16T12:32:04+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?id=0d22416f94dff7756091e983518ed3684cc9597a'/>
<id>0d22416f94dff7756091e983518ed3684cc9597a</id>
<content type='text'>
In multi threaded application, it may happen that more threads will call
function getpwuid(or similar) and sss client will not have initialized
structure for fast memory cache. This structure is initialized just once.
There isn't any problem with multi threaded application after successful
initialisation.

The race condition will happen if more threads try to initialise structure
sss_cli_mc_ctx in function sss_nss_mc_get_ctx (ctx-&gt;initialized is false)
It takes some time to initialise mmap cache: open file, get file size, mmap
file, initialize structure sss_cli_mc_ctx. One of problems is that file with
memory cache can be opened more times (file descriptor leak), but the race
condition is with initialising structure sss_cli_mc_ctx. One tread will start
to initialise this structure; another thread will think that structure is
already initialised and will check consistency of this structure. It will fail
because 1st thread did not finish initialisation. Therefore 2nd thread will
return EINVAL and will do clean up in done section: munmap, close file and
reset structure data. The 1st thread will finish an try to use memory cache,
but structure was zero initialised by 2nd thread and it will cause dereference
of NULL pointer in 1st thread (SIGSEGV) or dividing by zero in murmurhash
function(SIGFPE)

Function sss_nss_mc_get_ctx was split into two parts for simplification
of locking and unlocking. The locking is used only in new static function
sss_nss_mc_init_ctx. This function will not be called very often therefore the
same mutex is used as in other nss functions.

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

Reviewed-by: Michal Židek &lt;mzidek@redhat.com&gt;
Reviewed-by: Sumit Bose &lt;sbose@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In multi threaded application, it may happen that more threads will call
function getpwuid(or similar) and sss client will not have initialized
structure for fast memory cache. This structure is initialized just once.
There isn't any problem with multi threaded application after successful
initialisation.

The race condition will happen if more threads try to initialise structure
sss_cli_mc_ctx in function sss_nss_mc_get_ctx (ctx-&gt;initialized is false)
It takes some time to initialise mmap cache: open file, get file size, mmap
file, initialize structure sss_cli_mc_ctx. One of problems is that file with
memory cache can be opened more times (file descriptor leak), but the race
condition is with initialising structure sss_cli_mc_ctx. One tread will start
to initialise this structure; another thread will think that structure is
already initialised and will check consistency of this structure. It will fail
because 1st thread did not finish initialisation. Therefore 2nd thread will
return EINVAL and will do clean up in done section: munmap, close file and
reset structure data. The 1st thread will finish an try to use memory cache,
but structure was zero initialised by 2nd thread and it will cause dereference
of NULL pointer in 1st thread (SIGSEGV) or dividing by zero in murmurhash
function(SIGFPE)

Function sss_nss_mc_get_ctx was split into two parts for simplification
of locking and unlocking. The locking is used only in new static function
sss_nss_mc_init_ctx. This function will not be called very often therefore the
same mutex is used as in other nss functions.

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

Reviewed-by: Michal Židek &lt;mzidek@redhat.com&gt;
Reviewed-by: Sumit Bose &lt;sbose@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
