Browse Source

pusb_check -q now shuts down debugging as well

pusb_hotplug will call pusb_check using -q
master
Andrea Luzzardi 17 years ago
parent
commit
3574caeea7
2 changed files with 10 additions and 5 deletions
  1. +5
    -1
      pam_usb/src/pusb_check.c
  2. +5
    -4
      pam_usb/tools/pusb_hotplug

+ 5
- 1
pam_usb/src/pusb_check.c View File

@ -120,7 +120,11 @@ int main(int argc, char **argv)
pusb_conf_init(&opts);
if (!pusb_conf_parse(conf_file, &opts, user, service))
return (1);
opts.quiet = quiet;
if (quiet)
{
opts.quiet = 1;
opts.debug = 0;
}
pusb_log_init(&opts);
if (mode == 1)
return (!pusb_check_perform_authentication(&opts, user, service));


+ 5
- 4
pam_usb/tools/pusb_hotplug View File

@ -144,10 +144,11 @@ serial = device.find('serial').text
def authChangeCallback(event):
print 'User %s is now %s' % (username, event)
retValue = os.system("%s -c %s -u %s -s pusb_hotplug -a" % (
options['path'], options['configFile'], username))
print retValue
if retValue == 0:
cmdLine = "%s -q -c %s -u %s -s pusb_hotplug -a" % (options['path'],
options['configFile'],
username)
print 'Executing %s' % cmdLine
if not os.system(cmdLine):
run = events['unlock']
else:
run = events['lock']


Loading…
Cancel
Save