Landscape Client all user shouldn't be case-sensitive

Bug #480249 reported by Kevin McDermott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Low
Kevin McDermott

Bug Description

Entering "all" instead of "ALL" doesn't grant all users permissions to run scripts.

We should do one of the following:

If the username is not ALL, verify the existence of all users in the list of users and prevent users that aren't known to the system from being listed

Changed in landscape-client:
assignee: nobody → Kevin McDermott (bigkevmcd)
importance: Undecided → Low
status: New → Confirmed
Changed in landscape-client:
milestone: none → 1.4.2
status: Confirmed → In Progress
Changed in landscape-client:
milestone: 1.4.2 → 1.4.3
tags: added: review
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Is this supposed to work also with the user list passed in the command line? Like this:

landscape-config -a andreas.hasenack -t karmic-alluser-test --script-users=all --silent

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I think you are missing a save somewhere. It also doesn't work via the wizard.

Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

[1]

+ def _get_invalid_users(self, users):

Please would add a docstring to this method?

[2]

+ users = users.replace("all", "ALL")

This looks a bit loose to me, for example somebody could specify "allison" as user and that would be replaced with "ALLison?

Thanks!

Revision history for this message
Kevin McDermott (bigkevmcd) wrote :

#1

Added a docstring

#2

I removed the "all" functionality alrogether, we are asking for a special marker, so ALL it is :-)

tags: removed: review
tags: added: review
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

Nice branch, looks better now, thanks. +1!

[3]

+ if users is not None:

This if doesn't seem to be tested.

Revision history for this message
Thomas Herve (therve) wrote :

+1, with the ticket description fixed!

tags: removed: review
description: updated
Changed in landscape-client:
status: In Progress → Fix Committed
tags: added: needs-testing
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I still have the same failure described in comment #1. Was "all" supposed to be translated into "ALL"?

root@karmic-vm:~# rm -rf /var/lib/landscape/* /var/log/landscape/*
root@karmic-vm:~# landscape-config -a andreas.hasenack -t karmic-alluser-test --script-users=all --silent
 * Stopping landscape-client daemon [fail]
 * Starting the landscape-client daemon [ OK ]
Please wait... System successfully registered.

root@karmic-vm:~# cat /etc/landscape/client.conf
[client]
url = https://staging.landscape.canonical.com/message-system
computer_title = karmic-alluser-test
data_path = /var/lib/landscape/client
registration_password =
ping_url = http://staging.landscape.canonical.com/ping
include_manager_plugins = ScriptExecution
script_users = all <-------
account_name = andreas.hasenack

This package was built today from the staging branch of landscape-client (rev61)

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Ok, there was some mixup and the fix was not in trunk nor staging. After merging and rebuilding, it's working as expected:
root@karmic-vm:~# landscape-config -a andreas.hasenack -t karmic-alluser-test --script-users=All --silent
Unknown system users: All
Aborting Landscape configuration

root@karmic-vm:~# landscape-config -a andreas.hasenack -t karmic-alluser-test --script-users=all --silent
Unknown system users: all
Aborting Landscape configuration

root@karmic-vm:~# landscape-config -a andreas.hasenack -t karmic-alluser-test --script-users=ALL --silent
 * Stopping landscape-client daemon [ OK ]
 * Starting the landscape-client daemon [ OK ]
Please wait...
System successfully registered.

root@karmic-vm:~# cat /etc/landscape/client.conf
[client]
url = https://staging.landscape.canonical.com/message-system
computer_title = karmic-alluser-test
data_path = /var/lib/landscape/client
registration_password =
ping_url = http://staging.landscape.canonical.com/ping
include_manager_plugins = ScriptExecution
script_users = ALL
account_name = andreas.hasenack

tags: removed: needs-testing
Changed in landscape-client:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.