Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-08 Thread Jakub Hrozek
On Wed, Nov 07, 2012 at 09:03:43AM -0500, Stephen Gallagher wrote: On Wed 07 Nov 2012 05:07:14 AM EST, Ondrej Kos wrote: On 11/06/2012 11:07 PM, Dmitri Pal wrote: On 11/06/2012 02:09 PM, Simo Sorce wrote: On Tue, 2012-11-06 at 14:00 -0500, Stephen Gallagher wrote: On Tue 06 Nov 2012 01:54:46

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-07 Thread Ondrej Kos
On 11/06/2012 11:07 PM, Dmitri Pal wrote: On 11/06/2012 02:09 PM, Simo Sorce wrote: On Tue, 2012-11-06 at 14:00 -0500, Stephen Gallagher wrote: On Tue 06 Nov 2012 01:54:46 PM EST, Dmitri Pal wrote: On 11/06/2012 01:45 PM, Simo Sorce wrote: • If all lists are empty, access

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-07 Thread Stephen Gallagher
On Wed 07 Nov 2012 05:07:14 AM EST, Ondrej Kos wrote: On 11/06/2012 11:07 PM, Dmitri Pal wrote: On 11/06/2012 02:09 PM, Simo Sorce wrote: On Tue, 2012-11-06 at 14:00 -0500, Stephen Gallagher wrote: On Tue 06 Nov 2012 01:54:46 PM EST, Dmitri Pal wrote: On 11/06/2012 01:45 PM, Simo Sorce

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-06 Thread Ondrej Kos
On 11/02/2012 11:50 AM, Jakub Hrozek wrote: On Thu, Nov 01, 2012 at 03:04:11PM -0400, Simo Sorce wrote: It's because the DB cannot hold an empty value. With the current interface empty value = No value. You can easily check for an option being present with confdb_get_param(). Then look at

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-06 Thread Simo Sorce
On Tue, 2012-11-06 at 14:46 +0100, Ondrej Kos wrote: On 11/02/2012 05:32 PM, Simo Sorce wrote: On Fri, 2012-11-02 at 10:10 -0400, Dmitri Pal wrote: On 11/02/2012 09:50 AM, Stef Walter wrote: On 11/02/2012 01:57 PM, Dmitri Pal wrote: First let us define a general rule about how we treat

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-06 Thread Ondrej Kos
On 11/06/2012 02:52 PM, Simo Sorce wrote: On Tue, 2012-11-06 at 14:46 +0100, Ondrej Kos wrote: On 11/02/2012 05:32 PM, Simo Sorce wrote: On Fri, 2012-11-02 at 10:10 -0400, Dmitri Pal wrote: On 11/02/2012 09:50 AM, Stef Walter wrote: On 11/02/2012 01:57 PM, Dmitri Pal wrote: First let us

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-06 Thread Simo Sorce
On Tue, 2012-11-06 at 15:10 +0100, Ondrej Kos wrote: On 11/06/2012 02:52 PM, Simo Sorce wrote: On Tue, 2012-11-06 at 14:46 +0100, Ondrej Kos wrote: On 11/02/2012 05:32 PM, Simo Sorce wrote: On Fri, 2012-11-02 at 10:10 -0400, Dmitri Pal wrote: On 11/02/2012 09:50 AM, Stef Walter wrote:

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-06 Thread Dmitri Pal
On 11/06/2012 09:24 AM, Simo Sorce wrote: On Tue, 2012-11-06 at 15:10 +0100, Ondrej Kos wrote: On 11/06/2012 02:52 PM, Simo Sorce wrote: On Tue, 2012-11-06 at 14:46 +0100, Ondrej Kos wrote: On 11/02/2012 05:32 PM, Simo Sorce wrote: On Fri, 2012-11-02 at 10:10 -0400, Dmitri Pal wrote: On

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-06 Thread Simo Sorce
On Tue, 2012-11-06 at 10:26 -0500, Dmitri Pal wrote: On 11/06/2012 09:24 AM, Simo Sorce wrote: On Tue, 2012-11-06 at 15:10 +0100, Ondrej Kos wrote: On 11/06/2012 02:52 PM, Simo Sorce wrote: On Tue, 2012-11-06 at 14:46 +0100, Ondrej Kos wrote: On 11/02/2012 05:32 PM, Simo Sorce wrote: On

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-06 Thread Dmitri Pal
On 11/06/2012 10:50 AM, Simo Sorce wrote: On Tue, 2012-11-06 at 10:26 -0500, Dmitri Pal wrote: On 11/06/2012 09:24 AM, Simo Sorce wrote: On Tue, 2012-11-06 at 15:10 +0100, Ondrej Kos wrote: On 11/06/2012 02:52 PM, Simo Sorce wrote: On Tue, 2012-11-06 at 14:46 +0100, Ondrej Kos wrote: On

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-06 Thread Stephen Gallagher
On Tue 06 Nov 2012 01:54:46 PM EST, Dmitri Pal wrote: On 11/06/2012 01:45 PM, Simo Sorce wrote: • If all lists are empty, access is granted • If any list is provided, the order of evaluation is allow,deny. This means that any matching deny rule

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-06 Thread Dmitri Pal
On 11/06/2012 02:09 PM, Simo Sorce wrote: On Tue, 2012-11-06 at 14:00 -0500, Stephen Gallagher wrote: On Tue 06 Nov 2012 01:54:46 PM EST, Dmitri Pal wrote: On 11/06/2012 01:45 PM, Simo Sorce wrote: • If all lists are empty, access is granted • If any list is

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-02 Thread Ondrej Kos
On 11/01/2012 09:51 PM, Simo Sorce wrote: On Thu, 2012-11-01 at 16:09 -0400, Dmitri Pal wrote: On 11/01/2012 03:04 PM, Simo Sorce wrote: On Thu, 2012-11-01 at 10:53 -0400, Dmitri Pal wrote: On 11/01/2012 09:11 AM, Simo Sorce wrote: On Thu, 2012-11-01 at 12:03 +0100, Michal Židek wrote: On

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-02 Thread Jakub Hrozek
On Thu, Nov 01, 2012 at 03:04:11PM -0400, Simo Sorce wrote: It's because the DB cannot hold an empty value. With the current interface empty value = No value. You can easily check for an option being present with confdb_get_param(). Then look at its value to determine if there is any (and if

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-02 Thread Jakub Hrozek
On Fri, Nov 02, 2012 at 10:09:53AM +0100, Ondrej Kos wrote: On 11/01/2012 09:51 PM, Simo Sorce wrote: On Thu, 2012-11-01 at 16:09 -0400, Dmitri Pal wrote: On 11/01/2012 03:04 PM, Simo Sorce wrote: On Thu, 2012-11-01 at 10:53 -0400, Dmitri Pal wrote: On 11/01/2012 09:11 AM, Simo Sorce wrote:

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-02 Thread Dmitri Pal
On 11/02/2012 06:51 AM, Jakub Hrozek wrote: On Fri, Nov 02, 2012 at 10:09:53AM +0100, Ondrej Kos wrote: On 11/01/2012 09:51 PM, Simo Sorce wrote: On Thu, 2012-11-01 at 16:09 -0400, Dmitri Pal wrote: On 11/01/2012 03:04 PM, Simo Sorce wrote: On Thu, 2012-11-01 at 10:53 -0400, Dmitri Pal wrote:

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-02 Thread Stef Walter
On 11/02/2012 01:57 PM, Dmitri Pal wrote: First let us define a general rule about how we treat the cases: X = Is it treated as X being undefined or X having an empty value. It should be a general documented rule for the application. Current behavior is to ignore and I think it is the right

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-02 Thread Jakub Hrozek
On Fri, Nov 02, 2012 at 02:50:45PM +0100, Stef Walter wrote: On 11/02/2012 01:57 PM, Dmitri Pal wrote: First let us define a general rule about how we treat the cases: X = Is it treated as X being undefined or X having an empty value. It should be a general documented rule for the

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-02 Thread Dmitri Pal
On 11/02/2012 09:50 AM, Stef Walter wrote: On 11/02/2012 01:57 PM, Dmitri Pal wrote: First let us define a general rule about how we treat the cases: X = Is it treated as X being undefined or X having an empty value. It should be a general documented rule for the application. Current

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-02 Thread Simo Sorce
On Fri, 2012-11-02 at 10:10 -0400, Dmitri Pal wrote: On 11/02/2012 09:50 AM, Stef Walter wrote: On 11/02/2012 01:57 PM, Dmitri Pal wrote: First let us define a general rule about how we treat the cases: X = Is it treated as X being undefined or X having an empty value. It should be a

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-01 Thread Simo Sorce
On Thu, 2012-11-01 at 12:03 +0100, Michal Židek wrote: On 10/30/2012 04:53 PM, Ondrej Kos wrote: On 10/17/2012 03:28 PM, Michal Židek wrote: On 10/16/2012 03:45 PM, Stef Walter wrote: On 10/16/2012 02:04 PM, Jakub Hrozek wrote: I was wondering for a while whether to change the behaviour

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-01 Thread Simo Sorce
On Thu, 2012-11-01 at 10:53 -0400, Dmitri Pal wrote: On 11/01/2012 09:11 AM, Simo Sorce wrote: On Thu, 2012-11-01 at 12:03 +0100, Michal Židek wrote: On 10/30/2012 04:53 PM, Ondrej Kos wrote: On 10/17/2012 03:28 PM, Michal Židek wrote: On 10/16/2012 03:45 PM, Stef Walter wrote: On

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-01 Thread Dmitri Pal
On 11/01/2012 03:04 PM, Simo Sorce wrote: On Thu, 2012-11-01 at 10:53 -0400, Dmitri Pal wrote: On 11/01/2012 09:11 AM, Simo Sorce wrote: On Thu, 2012-11-01 at 12:03 +0100, Michal Židek wrote: On 10/30/2012 04:53 PM, Ondrej Kos wrote: On 10/17/2012 03:28 PM, Michal Židek wrote: On 10/16/2012

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-11-01 Thread Simo Sorce
On Thu, 2012-11-01 at 16:09 -0400, Dmitri Pal wrote: On 11/01/2012 03:04 PM, Simo Sorce wrote: On Thu, 2012-11-01 at 10:53 -0400, Dmitri Pal wrote: On 11/01/2012 09:11 AM, Simo Sorce wrote: On Thu, 2012-11-01 at 12:03 +0100, Michal Židek wrote: On 10/30/2012 04:53 PM, Ondrej Kos wrote:

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-10-30 Thread Ondrej Kos
On 10/17/2012 03:28 PM, Michal Židek wrote: On 10/16/2012 03:45 PM, Stef Walter wrote: On 10/16/2012 02:04 PM, Jakub Hrozek wrote: I was wondering for a while whether to change the behaviour directly in confdb_get_string_as_list() but I think the attached patch takes a better approach because

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-10-17 Thread Michal Židek
On 10/16/2012 03:45 PM, Stef Walter wrote: On 10/16/2012 02:04 PM, Jakub Hrozek wrote: I was wondering for a while whether to change the behaviour directly in confdb_get_string_as_list() but I think the attached patch takes a better approach because the other consumers of

[SSSD] Unexpected behavior with 'simple_allow_users ='

2012-10-16 Thread Stef Walter
When I have the following in a domain in sssd.conf: access_provider = simple simple_allow_users = ... any user is allowed to log in, despite the list being empty. The documentation states: · If either or both allow lists are provided, all users are denied unless they appear in the

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-10-16 Thread Jakub Hrozek
On Tue, Oct 16, 2012 at 11:47:12AM +0200, Stef Walter wrote: When I have the following in a domain in sssd.conf: access_provider = simple simple_allow_users = ... any user is allowed to log in, despite the list being empty. The documentation states: · If either or both allow lists

Re: [SSSD] Unexpected behavior with 'simple_allow_users ='

2012-10-16 Thread Stef Walter
On 10/16/2012 02:04 PM, Jakub Hrozek wrote: I was wondering for a while whether to change the behaviour directly in confdb_get_string_as_list() but I think the attached patch takes a better approach because the other consumers of confdb_get_string_as_list() do not see any difference between