Package syspolicy :: Package modules :: Module pam :: Class PAM
[hide private]
[frames] | no frames]

Class PAM

source code

module.Module --+
                |
               PAM

This module provides PAM configuration support for SysPolicy.

Instance Methods [hide private]
 
__init__(self) source code
 
cs_rem_attribute(self, group, attribute, value, diff)
This function produces a ChangeSet for removing an attribute.
source code
 
cs_set_attribute(self, group, attribute, value, diff)
This function produces a ChangeSet for setting a value in the services policy.
source code

Inherited from module.Module: append_lines_to_file, cs_check_diff, cs_new_attribute, cs_set_default, edit_configfile, execute, perform_change

Class Variables [hide private]

Inherited from module.Module: change_operations, diff_operations, event_hooks, handled_attributes, name, pt

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: module.Module.__init__

cs_rem_attribute(self, group, attribute, value, diff)

source code 

This function produces a ChangeSet for removing an attribute.

Parameters:
  • group - The group for which the attribute is being set
  • attribute - The attribute in the policy that is being set
  • value - The new value
  • diff - The difference from the old value
Returns:
A ChangeSet or None
Overrides: module.Module.cs_rem_attribute

cs_set_attribute(self, group, attribute, value, diff)

source code 

This function produces a ChangeSet for setting a value in the services policy. It handles the user/group allow and deny attributes as well as the password strenght policy using pam_cracklib.so

It will always return a ChangeSet which contains the exact lines that needed to be changed in a specific PAM configuration file.

Parameters:
  • group - The group for which the attribute is being set
  • attribute - The attribute in the policy that is being set
  • value - The new value
  • diff - The difference from the old value
Returns:
A ChangeSet or None
Overrides: module.Module.cs_set_attribute