Browse Source

Agent: check count of 'cmd' tags

master
Pekka Helenius 3 years ago
parent
commit
b6c2aff0d1
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      tools/pamusb-agent

+ 4
- 0
tools/pamusb-agent View File

@ -186,6 +186,10 @@ def userDeviceThread(user):
for hotplug in user.findall('agent'):
henvs = {}
if len(hotplug.findall('cmd')) != 1:
logger.error('one command for an agent must be determined in user "%s" configuration.' % userName)
return 1
for henv in hotplug.findall('env'):
henv_var = re.sub(r'^(.*?)=.*$', '\\1', henv.text)
henv_arg = re.sub(r'^.*?=(.*)$', '\\1', henv.text)


Loading…
Cancel
Save