Changeset 16380


Ignore:
Timestamp:
Jul 22, 2016, 3:42:40 PM (3 years ago)
Author:
dcorreia
Message:

Refactored addUserMapping function in config module
Reorganized main module

Location:
internals/2016/linuxloginsmartcardwizard
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • internals/2016/linuxloginsmartcardwizard/.idea/estagiopycharm.iml

    r16354 r16380  
    55      <sourceFolder url="file://$MODULE_DIR$/trunk/project1" isTestSource="false" />
    66    </content>
    7     <orderEntry type="inheritedJdk" />
     7    <orderEntry type="jdk" jdkName="Python 3.4.3 (/usr/bin/python3.4)" jdkType="Python SDK" />
    88    <orderEntry type="sourceFolder" forTests="false" />
    99  </component>
  • internals/2016/linuxloginsmartcardwizard/.idea/misc.xml

    r16302 r16380  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<project version="4">
    3   <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    4     <OptionsSetting value="true" id="Add" />
    5     <OptionsSetting value="true" id="Remove" />
    6     <OptionsSetting value="true" id="Checkout" />
    7     <OptionsSetting value="true" id="Update" />
    8     <OptionsSetting value="true" id="Status" />
    9     <OptionsSetting value="true" id="Edit" />
    10     <ConfirmationsSetting value="0" id="Add" />
    11     <ConfirmationsSetting value="0" id="Remove" />
    12   </component>
    133  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.4.3 (/usr/bin/python3.4)" project-jdk-type="Python SDK" />
    144  <component name="SvnBranchConfigurationManager">
    15     <option name="myConfigurationMap">
    16       <map>
    17         <entry key="$PROJECT_DIR$">
    18           <value>
    19             <SvnBranchConfiguration>
    20               <option name="trunkUrl" value="http://contribsoft.caixamagica.pt/repo/internals/2016/linuxloginsmartcardwizard" />
    21             </SvnBranchConfiguration>
    22           </value>
    23         </entry>
    24       </map>
    25     </option>
    265    <option name="mySupportsUserInfoFilter" value="true" />
    276  </component>
  • internals/2016/linuxloginsmartcardwizard/.idea/workspace.xml

    r16364 r16380  
    33  <component name="ChangeListManager">
    44    <list default="true" readonly="true" id="fbd8e757-714d-41c6-a2b9-8558c09dbd04" name="Default" comment="">
     5      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/estagiopycharm.iml" afterPath="$PROJECT_DIR$/.idea/estagiopycharm.iml" />
     6      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
    57      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
    68      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/trunk/project1/config.py" afterPath="$PROJECT_DIR$/trunk/project1/config.py" />
    79      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/trunk/project1/main.py" afterPath="$PROJECT_DIR$/trunk/project1/main.py" />
     10      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/trunk/project1/tests.py" afterPath="$PROJECT_DIR$/trunk/project1/tests.py" />
    811    </list>
    912    <ignored path="estagiopycharm.iws" />
     
    1619    <option name="LAST_RESOLUTION" value="IGNORE" />
    1720  </component>
    18   <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
    1921  <component name="CreatePatchCommitExecutor">
    2022    <option name="PATCH_PATH" value="" />
     
    2931        <entry file="file://$PROJECT_DIR$/trunk/project1/config.py">
    3032          <provider selected="true" editor-type-id="text-editor">
    31             <state relative-caret-position="131">
    32               <caret line="280" column="4" selection-start-line="280" selection-start-column="4" selection-end-line="280" selection-end-column="4" />
     33            <state relative-caret-position="217">
     34              <caret line="256" column="8" selection-start-line="256" selection-start-column="8" selection-end-line="256" selection-end-column="8" />
    3335              <folding>
    34                 <element signature="e#19#28#0" expanded="true" />
    35                 <element signature="e#1211#1777#0" expanded="false" />
    36                 <element signature="e#1211#1409#1" expanded="true" />
    37                 <element signature="e#1856#2252#0" expanded="false" />
    38                 <element signature="e#1856#2126#1" expanded="true" />
    39                 <element signature="e#2290#2484#0" expanded="false" />
    40                 <element signature="e#2290#2402#1" expanded="true" />
    41                 <element signature="e#2524#2705#0" expanded="false" />
    42                 <element signature="e#2524#2643#1" expanded="true" />
    43                 <element signature="e#2746#2866#1" expanded="true" />
    44                 <element signature="e#3092#3381#0" expanded="false" />
    45                 <element signature="e#3092#3257#1" expanded="true" />
    46                 <element signature="e#3418#3624#0" expanded="false" />
    47                 <element signature="e#3418#3576#1" expanded="true" />
    48                 <element signature="e#3663#3855#0" expanded="false" />
    49                 <element signature="e#3663#3810#1" expanded="true" />
    50                 <element signature="e#3907#4107#0" expanded="false" />
    51                 <element signature="e#3907#4060#1" expanded="true" />
    52                 <element signature="e#4155#4368#0" expanded="false" />
    53                 <element signature="e#4155#4317#1" expanded="true" />
    54                 <element signature="e#4421#4640#0" expanded="false" />
    55                 <element signature="e#4421#4593#1" expanded="true" />
    56                 <element signature="e#4681#4870#0" expanded="false" />
    57                 <element signature="e#4681#4807#1" expanded="true" />
    58                 <element signature="e#4920#5161#0" expanded="false" />
    59                 <element signature="e#4920#5091#1" expanded="true" />
    60                 <element signature="e#5230#5767#0" expanded="false" />
    61                 <element signature="e#5230#5528#1" expanded="true" />
    62                 <element signature="e#5823#6212#0" expanded="false" />
    63                 <element signature="e#5823#6046#1" expanded="true" />
    64                 <element signature="e#6257#6532#0" expanded="false" />
    65                 <element signature="e#6257#6440#1" expanded="true" />
    66                 <element signature="e#6597#7034#0" expanded="false" />
    67                 <element signature="e#6597#6821#1" expanded="true" />
    68                 <element signature="e#7085#7356#0" expanded="false" />
    69                 <element signature="e#7085#7288#1" expanded="true" />
    70                 <element signature="e#7409#7679#0" expanded="false" />
    71                 <element signature="e#7409#7609#1" expanded="true" />
    72                 <element signature="e#7716#8037#0" expanded="false" />
    73                 <element signature="e#7716#7819#1" expanded="true" />
    74                 <element signature="e#8093#8304#1" expanded="true" />
    75                 <element signature="e#8688#8775#1" expanded="true" />
     36                <element signature="e#8093#8254#1" expanded="true" />
    7637              </folding>
    7738            </state>
     
    8243        <entry file="file://$PROJECT_DIR$/trunk/project1/main.py">
    8344          <provider selected="true" editor-type-id="text-editor">
    84             <state relative-caret-position="-9">
    85               <caret line="75" column="38" selection-start-line="75" selection-start-column="38" selection-end-line="75" selection-end-column="38" />
     45            <state relative-caret-position="841">
     46              <caret line="87" column="0" selection-start-line="87" selection-start-column="0" selection-end-line="87" selection-end-column="0" />
    8647              <folding>
    8748                <element signature="e#19#32#0" expanded="true" />
    8849              </folding>
     50            </state>
     51          </provider>
     52        </entry>
     53      </file>
     54      <file leaf-file-name="tests.py" pinned="false" current-in-tab="false">
     55        <entry file="file://$PROJECT_DIR$/trunk/project1/tests.py">
     56          <provider selected="true" editor-type-id="text-editor">
     57            <state relative-caret-position="126">
     58              <caret line="7" column="37" selection-start-line="7" selection-start-column="37" selection-end-line="7" selection-end-column="37" />
     59              <folding />
    8960            </state>
    9061          </provider>
     
    10980        <option value="$PROJECT_DIR$/trunk/sudotests.py" />
    11081        <option value="$PROJECT_DIR$/trunk/project1/configpart1.py" />
    111         <option value="$PROJECT_DIR$/trunk/project1/tests.py" />
    11282        <option value="$PROJECT_DIR$/trunk/project1/editfiles.py" />
    11383        <option value="$PROJECT_DIR$/trunk/backup/pam_pkcs11.conf" />
     
    11585        <option value="$PROJECT_DIR$/trunk/project1/pkcs11.example" />
    11686        <option value="$PROJECT_DIR$/trunk/project1/configpkcs11.py" />
     87        <option value="$PROJECT_DIR$/.idea/workspace.xml" />
     88        <option value="$PROJECT_DIR$/trunk/project1/main.py" />
    11789        <option value="$PROJECT_DIR$/trunk/project1/config.py" />
    118         <option value="$PROJECT_DIR$/trunk/project1/main.py" />
     90        <option value="$PROJECT_DIR$/trunk/project1/tests.py" />
    11991      </list>
    12092    </option>
     
    155127    <ConfirmationsSetting value="0" id="Remove" />
    156128  </component>
     129  <component name="ProjectReloadState">
     130    <option name="STATE" value="1" />
     131  </component>
    157132  <component name="ProjectView">
    158133    <navigator currentView="ProjectPane" proportions="" version="1">
     
    171146    <panes>
    172147      <pane id="Scratches" />
     148      <pane id="Scope" />
    173149      <pane id="ProjectPane">
    174         <subPane />
     150        <subPane>
     151          <PATH>
     152            <PATH_ELEMENT>
     153              <option name="myItemId" value="estagiopycharm" />
     154              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
     155            </PATH_ELEMENT>
     156          </PATH>
     157          <PATH>
     158            <PATH_ELEMENT>
     159              <option name="myItemId" value="estagiopycharm" />
     160              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
     161            </PATH_ELEMENT>
     162            <PATH_ELEMENT>
     163              <option name="myItemId" value="estagiopycharm" />
     164              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
     165            </PATH_ELEMENT>
     166            <PATH_ELEMENT>
     167              <option name="myItemId" value="trunk" />
     168              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
     169            </PATH_ELEMENT>
     170          </PATH>
     171          <PATH>
     172            <PATH_ELEMENT>
     173              <option name="myItemId" value="estagiopycharm" />
     174              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
     175            </PATH_ELEMENT>
     176            <PATH_ELEMENT>
     177              <option name="myItemId" value="estagiopycharm" />
     178              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
     179            </PATH_ELEMENT>
     180            <PATH_ELEMENT>
     181              <option name="myItemId" value="trunk" />
     182              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
     183            </PATH_ELEMENT>
     184            <PATH_ELEMENT>
     185              <option name="myItemId" value="project1" />
     186              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
     187            </PATH_ELEMENT>
     188          </PATH>
     189          <PATH>
     190            <PATH_ELEMENT>
     191              <option name="myItemId" value="estagiopycharm" />
     192              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
     193            </PATH_ELEMENT>
     194            <PATH_ELEMENT>
     195              <option name="myItemId" value="estagiopycharm" />
     196              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
     197            </PATH_ELEMENT>
     198          </PATH>
     199        </subPane>
    175200      </pane>
    176       <pane id="Scope" />
    177201    </panes>
    178202  </component>
    179203  <component name="PropertiesComponent">
    180204    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
    181     <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
     205    <property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
    182206    <property name="settings.editor.splitter.proportion" value="0.2" />
    183207  </component>
     
    543567      <updated>1469026465841</updated>
    544568    </task>
    545     <option name="localTasksCounter" value="16" />
     569    <task id="LOCAL-00016" summary="Added reset to default configuration feature&#10;">
     570      <created>1469117053932</created>
     571      <option name="number" value="00016" />
     572      <option name="presentableId" value="LOCAL-00016" />
     573      <option name="project" value="LOCAL" />
     574      <updated>1469117053932</updated>
     575    </task>
     576    <option name="localTasksCounter" value="17" />
    546577    <servers />
    547578  </component>
     
    557588  <component name="ToolWindowManager">
    558589    <frame x="-1" y="27" width="1282" height="773" extended-state="6" />
    559     <editor active="false" />
     590    <editor active="true" />
    560591    <layout>
    561       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.19411297" sideWeight="0.49195403" order="0" side_tool="false" content_ui="combo" />
     592      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20206842" sideWeight="0.49195403" order="0" side_tool="false" content_ui="combo" />
    562593      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32921174" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
    563       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3164179" sideWeight="0.5046875" order="7" side_tool="true" content_ui="tabs" />
    564       <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32766616" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
    565       <window_info id="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23802164" sideWeight="0.49752998" order="7" side_tool="false" content_ui="tabs" />
    566       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24980111" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
    567       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32766616" sideWeight="0.4953125" order="7" side_tool="false" content_ui="tabs" />
     594      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.23802164" sideWeight="0.50676215" order="7" side_tool="true" content_ui="tabs" />
     595      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32921174" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
     596      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23802164" sideWeight="0.49323785" order="11" side_tool="false" content_ui="tabs" />
     597      <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32766616" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
     598      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24940239" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
     599      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32766616" sideWeight="0.4953125" order="9" side_tool="false" content_ui="tabs" />
    568600      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.17263326" sideWeight="0.508046" order="2" side_tool="true" content_ui="tabs" />
    569       <window_info id="SVN Repositories" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32921174" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
     601      <window_info id="SVN Repositories" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32921174" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
    570602      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
    571603      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
     
    574606      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2797527" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
    575607      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
    576       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32921174" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
    577608      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
    578609      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39922482" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
     
    584615      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
    585616      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
    586       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3164179" sideWeight="0.5046875" order="8" side_tool="true" content_ui="tabs" />
     617      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.23802164" sideWeight="0.50676215" order="8" side_tool="true" content_ui="tabs" />
    587618      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
    588       <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32766616" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
    589       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.23802164" sideWeight="0.49752998" order="10" side_tool="false" content_ui="tabs" />
     619      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23802164" sideWeight="0.49323785" order="9" side_tool="false" content_ui="tabs" />
     620      <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32766616" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
    590621      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2797527" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
    591       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32766616" sideWeight="0.4953125" order="11" side_tool="false" content_ui="tabs" />
    592       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.19411297" sideWeight="0.49195403" order="0" side_tool="false" content_ui="combo" />
     622      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32766616" sideWeight="0.4953125" order="11" side_tool="false" content_ui="tabs" />
     623      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20206842" sideWeight="0.49195403" order="0" side_tool="false" content_ui="combo" />
    593624      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
    594625      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32921174" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
    595       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24980111" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
     626      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24940239" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
    596627      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
    597628      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.17263326" sideWeight="0.508046" order="2" side_tool="true" content_ui="tabs" />
     
    630661    <MESSAGE value="IDE file&#10;&#10;" />
    631662    <MESSAGE value="Added final step of configuration: pam-auth-update execution&#10;Changed user-certificate mapping logic&#10;Added documentation to config module&#10;Code refactoring in config module&#10;" />
    632     <option name="LAST_COMMIT_MESSAGE" value="Added final step of configuration: pam-auth-update execution&#10;Changed user-certificate mapping logic&#10;Added documentation to config module&#10;Code refactoring in config module&#10;" />
     663    <MESSAGE value="Added reset to default configuration feature&#10;" />
     664    <option name="LAST_COMMIT_MESSAGE" value="Added reset to default configuration feature&#10;" />
    633665  </component>
    634666  <component name="XDebuggerManager">
    635667    <breakpoint-manager>
    636       <option name="time" value="20" />
     668      <option name="time" value="22" />
    637669    </breakpoint-manager>
    638670    <watches-manager />
     
    641673    <entry file="file://$PROJECT_DIR$/trunk/project1/config.py">
    642674      <provider selected="true" editor-type-id="text-editor">
     675        <state relative-caret-position="5076">
     676          <caret line="282" column="45" selection-start-line="282" selection-start-column="45" selection-end-line="282" selection-end-column="45" />
     677          <folding>
     678            <element signature="e#8093#8254#1" expanded="true" />
     679          </folding>
     680        </state>
     681      </provider>
     682    </entry>
     683    <entry file="file://$PROJECT_DIR$/trunk/project1/main.py">
     684      <provider selected="true" editor-type-id="text-editor">
    643685        <state relative-caret-position="0">
    644686          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
    645687          <folding>
    646             <element signature="e#19#28#0" expanded="true" />
    647             <element signature="e#1211#1777#0" expanded="false" />
    648             <element signature="e#1211#1409#1" expanded="true" />
    649             <element signature="e#1856#2252#0" expanded="false" />
    650             <element signature="e#1856#2126#1" expanded="true" />
    651             <element signature="e#2290#2484#0" expanded="false" />
    652             <element signature="e#2290#2402#1" expanded="true" />
    653             <element signature="e#2524#2705#0" expanded="false" />
    654             <element signature="e#2524#2643#1" expanded="true" />
    655             <element signature="e#2746#2866#1" expanded="true" />
    656             <element signature="e#3092#3381#0" expanded="false" />
    657             <element signature="e#3092#3257#1" expanded="true" />
    658             <element signature="e#3418#3624#0" expanded="false" />
    659             <element signature="e#3418#3576#1" expanded="true" />
    660             <element signature="e#3663#3855#0" expanded="false" />
    661             <element signature="e#3663#3810#1" expanded="true" />
    662             <element signature="e#3907#4107#0" expanded="false" />
    663             <element signature="e#3907#4060#1" expanded="true" />
    664             <element signature="e#4155#4368#0" expanded="false" />
    665             <element signature="e#4155#4317#1" expanded="true" />
    666             <element signature="e#4421#4640#0" expanded="false" />
    667             <element signature="e#4421#4593#1" expanded="true" />
    668             <element signature="e#4681#4870#0" expanded="false" />
    669             <element signature="e#4681#4807#1" expanded="true" />
    670             <element signature="e#4920#5161#0" expanded="false" />
    671             <element signature="e#4920#5091#1" expanded="true" />
    672             <element signature="e#5230#5767#0" expanded="false" />
    673             <element signature="e#5230#5528#1" expanded="true" />
    674             <element signature="e#5823#6212#0" expanded="false" />
    675             <element signature="e#5823#6046#1" expanded="true" />
    676             <element signature="e#6257#6532#0" expanded="false" />
    677             <element signature="e#6257#6440#1" expanded="true" />
    678             <element signature="e#6597#7034#0" expanded="false" />
    679             <element signature="e#6597#6821#1" expanded="true" />
    680             <element signature="e#7085#7356#0" expanded="false" />
    681             <element signature="e#7085#7288#1" expanded="true" />
    682             <element signature="e#7409#7679#0" expanded="false" />
    683             <element signature="e#7409#7609#1" expanded="true" />
    684             <element signature="e#7716#8037#0" expanded="false" />
    685             <element signature="e#7716#7819#1" expanded="true" />
    686             <element signature="e#8093#8304#1" expanded="true" />
    687             <element signature="e#8688#8775#1" expanded="true" />
     688            <element signature="e#19#32#0" expanded="true" />
     689          </folding>
     690        </state>
     691      </provider>
     692    </entry>
     693    <entry file="file://$PROJECT_DIR$/trunk/project1/config.py">
     694      <provider selected="true" editor-type-id="text-editor">
     695        <state relative-caret-position="0">
     696          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
     697          <folding>
     698            <element signature="e#8093#8254#1" expanded="true" />
     699          </folding>
     700        </state>
     701      </provider>
     702    </entry>
     703    <entry file="file://$PROJECT_DIR$/trunk/project1/main.py">
     704      <provider selected="true" editor-type-id="text-editor">
     705        <state relative-caret-position="1548">
     706          <caret line="86" column="4" selection-start-line="86" selection-start-column="4" selection-end-line="86" selection-end-column="4" />
     707          <folding>
     708            <element signature="e#19#32#0" expanded="true" />
     709          </folding>
     710        </state>
     711      </provider>
     712    </entry>
     713    <entry file="file://$PROJECT_DIR$/trunk/project1/config.py">
     714      <provider selected="true" editor-type-id="text-editor">
     715        <state relative-caret-position="0">
     716          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
     717          <folding>
     718            <element signature="e#8093#8254#1" expanded="true" />
     719          </folding>
     720        </state>
     721      </provider>
     722    </entry>
     723    <entry file="file://$PROJECT_DIR$/trunk/project1/main.py">
     724      <provider selected="true" editor-type-id="text-editor">
     725        <state relative-caret-position="1332">
     726          <caret line="75" column="38" selection-start-line="75" selection-start-column="38" selection-end-line="75" selection-end-column="38" />
     727          <folding>
     728            <element signature="e#19#32#0" expanded="true" />
     729          </folding>
     730        </state>
     731      </provider>
     732    </entry>
     733    <entry file="file://$PROJECT_DIR$/trunk/project1/config.py">
     734      <provider selected="true" editor-type-id="text-editor">
     735        <state relative-caret-position="4806">
     736          <caret line="267" column="7" selection-start-line="267" selection-start-column="7" selection-end-line="267" selection-end-column="7" />
     737          <folding>
     738            <element signature="e#8093#8254#1" expanded="true" />
     739          </folding>
     740        </state>
     741      </provider>
     742    </entry>
     743    <entry file="file://$PROJECT_DIR$/.idea/workspace.xml">
     744      <provider selected="true" editor-type-id="text-editor">
     745        <state relative-caret-position="5292">
     746          <caret line="294" column="4" selection-start-line="294" selection-start-column="4" selection-end-line="294" selection-end-column="4" />
     747        </state>
     748      </provider>
     749    </entry>
     750    <entry file="file://$PROJECT_DIR$/trunk/project1/main.py">
     751      <provider selected="true" editor-type-id="text-editor">
     752        <state relative-caret-position="1350">
     753          <caret line="75" column="38" selection-start-line="75" selection-start-column="38" selection-end-line="75" selection-end-column="38" />
     754          <folding>
     755            <element signature="e#19#32#0" expanded="true" />
     756          </folding>
     757        </state>
     758      </provider>
     759    </entry>
     760    <entry file="file://$PROJECT_DIR$/trunk/project1/config.py">
     761      <provider selected="true" editor-type-id="text-editor">
     762        <state relative-caret-position="2052">
     763          <caret line="267" column="7" selection-start-line="267" selection-start-column="7" selection-end-line="267" selection-end-column="7" />
     764          <folding>
     765            <element signature="e#8093#8254#1" expanded="true" />
     766          </folding>
     767        </state>
     768      </provider>
     769    </entry>
     770    <entry file="file://$PROJECT_DIR$/.idea/workspace.xml">
     771      <provider selected="true" editor-type-id="text-editor">
     772        <state relative-caret-position="0">
     773          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
     774        </state>
     775      </provider>
     776    </entry>
     777    <entry file="file://$PROJECT_DIR$/trunk/project1/main.py">
     778      <provider selected="true" editor-type-id="text-editor">
     779        <state relative-caret-position="1332">
     780          <caret line="75" column="38" selection-start-line="75" selection-start-column="38" selection-end-line="75" selection-end-column="38" />
     781          <folding>
     782            <element signature="e#19#32#0" expanded="true" />
     783          </folding>
     784        </state>
     785      </provider>
     786    </entry>
     787    <entry file="file://$PROJECT_DIR$/trunk/project1/config.py">
     788      <provider selected="true" editor-type-id="text-editor">
     789        <state relative-caret-position="0">
     790          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
     791          <folding>
     792            <element signature="e#8093#8254#1" expanded="true" />
     793          </folding>
     794        </state>
     795      </provider>
     796    </entry>
     797    <entry file="file://$PROJECT_DIR$/trunk/project1/main.py">
     798      <provider selected="true" editor-type-id="text-editor">
     799        <state relative-caret-position="1332">
     800          <caret line="75" column="38" selection-start-line="75" selection-start-column="38" selection-end-line="75" selection-end-column="38" />
     801          <folding>
     802            <element signature="e#19#32#0" expanded="true" />
     803          </folding>
     804        </state>
     805      </provider>
     806    </entry>
     807    <entry file="file://$PROJECT_DIR$/trunk/project1/config.py">
     808      <provider selected="true" editor-type-id="text-editor">
     809        <state relative-caret-position="0">
     810          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
     811          <folding>
     812            <element signature="e#8093#8254#1" expanded="true" />
     813          </folding>
     814        </state>
     815      </provider>
     816    </entry>
     817    <entry file="file://$PROJECT_DIR$/trunk/project1/main.py">
     818      <provider selected="true" editor-type-id="text-editor">
     819        <state relative-caret-position="1332">
     820          <caret line="75" column="38" selection-start-line="75" selection-start-column="38" selection-end-line="75" selection-end-column="38" />
     821          <folding>
     822            <element signature="e#19#32#0" expanded="true" />
     823          </folding>
     824        </state>
     825      </provider>
     826    </entry>
     827    <entry file="file://$PROJECT_DIR$/trunk/project1/config.py">
     828      <provider selected="true" editor-type-id="text-editor">
     829        <state relative-caret-position="0">
     830          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
     831          <folding>
     832            <element signature="e#8093#8254#1" expanded="true" />
    688833          </folding>
    689834        </state>
     
    695840          <caret line="5" column="14" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
    696841          <folding>
    697             <element signature="e#19#28#0" expanded="true" />
    698             <element signature="e#1211#1777#0" expanded="false" />
    699             <element signature="e#1211#1409#1" expanded="true" />
    700             <element signature="e#1856#2252#0" expanded="false" />
    701             <element signature="e#1856#2126#1" expanded="true" />
    702             <element signature="e#2290#2484#0" expanded="false" />
    703             <element signature="e#2290#2402#1" expanded="true" />
    704             <element signature="e#2524#2705#0" expanded="false" />
    705             <element signature="e#2524#2643#1" expanded="true" />
    706             <element signature="e#2746#2866#1" expanded="true" />
    707             <element signature="e#3092#3381#0" expanded="false" />
    708             <element signature="e#3092#3257#1" expanded="true" />
    709             <element signature="e#3418#3624#0" expanded="false" />
    710             <element signature="e#3418#3576#1" expanded="true" />
    711             <element signature="e#3663#3855#0" expanded="false" />
    712             <element signature="e#3663#3810#1" expanded="true" />
    713             <element signature="e#3907#4107#0" expanded="false" />
    714             <element signature="e#3907#4060#1" expanded="true" />
    715             <element signature="e#4155#4368#0" expanded="false" />
    716             <element signature="e#4155#4317#1" expanded="true" />
    717             <element signature="e#4421#4640#0" expanded="false" />
    718             <element signature="e#4421#4593#1" expanded="true" />
    719             <element signature="e#4681#4870#0" expanded="false" />
    720             <element signature="e#4681#4807#1" expanded="true" />
    721             <element signature="e#4920#5161#0" expanded="false" />
    722             <element signature="e#4920#5091#1" expanded="true" />
    723             <element signature="e#5230#5767#0" expanded="false" />
    724             <element signature="e#5230#5528#1" expanded="true" />
    725             <element signature="e#5823#6212#0" expanded="false" />
    726             <element signature="e#5823#6046#1" expanded="true" />
    727             <element signature="e#6257#6532#0" expanded="false" />
    728             <element signature="e#6257#6440#1" expanded="true" />
    729             <element signature="e#6597#7034#0" expanded="false" />
    730             <element signature="e#6597#6821#1" expanded="true" />
    731             <element signature="e#7085#7356#0" expanded="false" />
    732             <element signature="e#7085#7288#1" expanded="true" />
    733             <element signature="e#7409#7679#0" expanded="false" />
    734             <element signature="e#7409#7609#1" expanded="true" />
    735             <element signature="e#7716#8037#0" expanded="false" />
    736             <element signature="e#7716#7819#1" expanded="true" />
    737             <element signature="e#8093#8304#1" expanded="true" />
    738             <element signature="e#8688#8775#1" expanded="true" />
     842            <element signature="e#8093#8254#1" expanded="true" />
    739843          </folding>
    740844        </state>
     
    748852    <entry file="file://$PROJECT_DIR$/trunk/sudotxt1" />
    749853    <entry file="file://$PROJECT_DIR$/trunk/sudotests.py" />
    750     <entry file="file://$PROJECT_DIR$/trunk/project1/tests.py">
    751       <provider selected="true" editor-type-id="text-editor">
    752         <state relative-caret-position="144">
    753           <caret line="8" column="0" selection-start-line="8" selection-start-column="0" selection-end-line="8" selection-end-column="0" />
    754         </state>
    755       </provider>
    756     </entry>
    757854    <entry file="file://$PROJECT_DIR$/trunk/project1/expfile.txt" />
    758855    <entry file="file://$PROJECT_DIR$/trunk/project1/editfiles.py" />
     
    772869      </provider>
    773870    </entry>
     871    <entry file="file://$PROJECT_DIR$/.idea/workspace.xml">
     872      <provider selected="true" editor-type-id="text-editor">
     873        <state relative-caret-position="18">
     874          <caret line="294" column="4" selection-start-line="294" selection-start-column="4" selection-end-line="294" selection-end-column="4" />
     875        </state>
     876      </provider>
     877    </entry>
     878    <entry file="file://$PROJECT_DIR$/trunk/project1/tests.py">
     879      <provider selected="true" editor-type-id="text-editor">
     880        <state relative-caret-position="126">
     881          <caret line="7" column="37" selection-start-line="7" selection-start-column="37" selection-end-line="7" selection-end-column="37" />
     882          <folding />
     883        </state>
     884      </provider>
     885    </entry>
    774886    <entry file="file://$PROJECT_DIR$/trunk/project1/main.py">
    775887      <provider selected="true" editor-type-id="text-editor">
    776         <state relative-caret-position="-9">
    777           <caret line="75" column="38" selection-start-line="75" selection-start-column="38" selection-end-line="75" selection-end-column="38" />
     888        <state relative-caret-position="841">
     889          <caret line="87" column="0" selection-start-line="87" selection-start-column="0" selection-end-line="87" selection-end-column="0" />
    778890          <folding>
    779891            <element signature="e#19#32#0" expanded="true" />
     
    784896    <entry file="file://$PROJECT_DIR$/trunk/project1/config.py">
    785897      <provider selected="true" editor-type-id="text-editor">
    786         <state relative-caret-position="131">
    787           <caret line="280" column="4" selection-start-line="280" selection-start-column="4" selection-end-line="280" selection-end-column="4" />
    788           <folding>
    789             <element signature="e#19#28#0" expanded="true" />
    790             <element signature="e#1211#1777#0" expanded="false" />
    791             <element signature="e#1211#1409#1" expanded="true" />
    792             <element signature="e#1856#2252#0" expanded="false" />
    793             <element signature="e#1856#2126#1" expanded="true" />
    794             <element signature="e#2290#2484#0" expanded="false" />
    795             <element signature="e#2290#2402#1" expanded="true" />
    796             <element signature="e#2524#2705#0" expanded="false" />
    797             <element signature="e#2524#2643#1" expanded="true" />
    798             <element signature="e#2746#2866#1" expanded="true" />
    799             <element signature="e#3092#3381#0" expanded="false" />
    800             <element signature="e#3092#3257#1" expanded="true" />
    801             <element signature="e#3418#3624#0" expanded="false" />
    802             <element signature="e#3418#3576#1" expanded="true" />
    803             <element signature="e#3663#3855#0" expanded="false" />
    804             <element signature="e#3663#3810#1" expanded="true" />
    805             <element signature="e#3907#4107#0" expanded="false" />
    806             <element signature="e#3907#4060#1" expanded="true" />
    807             <element signature="e#4155#4368#0" expanded="false" />
    808             <element signature="e#4155#4317#1" expanded="true" />
    809             <element signature="e#4421#4640#0" expanded="false" />
    810             <element signature="e#4421#4593#1" expanded="true" />
    811             <element signature="e#4681#4870#0" expanded="false" />
    812             <element signature="e#4681#4807#1" expanded="true" />
    813             <element signature="e#4920#5161#0" expanded="false" />
    814             <element signature="e#4920#5091#1" expanded="true" />
    815             <element signature="e#5230#5767#0" expanded="false" />
    816             <element signature="e#5230#5528#1" expanded="true" />
    817             <element signature="e#5823#6212#0" expanded="false" />
    818             <element signature="e#5823#6046#1" expanded="true" />
    819             <element signature="e#6257#6532#0" expanded="false" />
    820             <element signature="e#6257#6440#1" expanded="true" />
    821             <element signature="e#6597#7034#0" expanded="false" />
    822             <element signature="e#6597#6821#1" expanded="true" />
    823             <element signature="e#7085#7356#0" expanded="false" />
    824             <element signature="e#7085#7288#1" expanded="true" />
    825             <element signature="e#7409#7679#0" expanded="false" />
    826             <element signature="e#7409#7609#1" expanded="true" />
    827             <element signature="e#7716#8037#0" expanded="false" />
    828             <element signature="e#7716#7819#1" expanded="true" />
    829             <element signature="e#8093#8304#1" expanded="true" />
    830             <element signature="e#8688#8775#1" expanded="true" />
     898        <state relative-caret-position="217">
     899          <caret line="256" column="8" selection-start-line="256" selection-start-column="8" selection-end-line="256" selection-end-column="8" />
     900          <folding>
     901            <element signature="e#8093#8254#1" expanded="true" />
    831902          </folding>
    832903        </state>
  • internals/2016/linuxloginsmartcardwizard/trunk/project1/config.py

    r16364 r16380  
    253253    :param mappingConfigPath: path of the mapping configurations file
    254254    :param username: name of the user
    255     :return: True on success and False on failure
    256255    """
    257256    certificate = getCardAuthCertificate()
    258     if certificate is None:
    259         printDebugInfo("No certificate found. Make sure the card is inserted and the PIN is correct")
    260         return False
    261     else:
     257    try:
    262258        combo = certificate.strip() + " -> " + username + "\n"
    263259        appendStringToFile(mappingConfigPath, combo)
    264         return True
     260        printDebugInfo("Added mapping for user '%s'" % username)
     261    except AttributeError as error:
     262        printDebugInfo(error)
     263        printDebugInfo("Failed to add mapping for user '%s'" % username)
    265264
    266265
  • internals/2016/linuxloginsmartcardwizard/trunk/project1/main.py

    r16364 r16380  
    2828PAMCONFIG = "/usr/share/pam-configs/pkcs11"
    2929
     30
    3031# Part 1 - Configuration of PKCS#11 module for PAM
     32def configurePamPkcs11():
     33    # Install PKCS#11 module for PAM
     34    config.installPackage(PAMPKCS11_PACKAGE)
    3135
    32 # Install PKCS#11 module for PAM
    33 config.installPackage(PAMPKCS11_PACKAGE)
     36    # Create directories to support configuration files
     37    config.makeDirectory(PAMPKCS11_DIRPATH)
     38    config.makeDirectory(CACERTS_DIRPATH)
     39    config.makeDirectory(CRLS_DIRPATH)
    3440
    35 # Create directories to support configuration files
    36 config.makeDirectory(PAMPKCS11_DIRPATH)
    37 config.makeDirectory(CACERTS_DIRPATH)
    38 config.makeDirectory(CRLS_DIRPATH)
     41    # Copy pteid module data file to general directory
     42    config.copyFileToDirectory(PTEID_MODULE, PAMPKCS11_DIRPATH)
    3943
    40 # Copy pteid module data file to general directory
    41 config.copyFileToDirectory(PTEID_MODULE, PAMPKCS11_DIRPATH)
     44    # Copy certificate files to cacerts directory and make hash links
     45    config.copyFileToDirectory(ECRAIZ_CERT, CACERTS_DIRPATH)
     46    config.copyFileToDirectory(CC001_CERT, CACERTS_DIRPATH)
     47    config.makeHashLinks(CACERTS_DIRPATH)
    4248
    43 # Copy certificate files to cacerts directory and make hash links
    44 config.copyFileToDirectory(ECRAIZ_CERT, CACERTS_DIRPATH)
    45 config.copyFileToDirectory(CC001_CERT, CACERTS_DIRPATH)
    46 config.makeHashLinks(CACERTS_DIRPATH)
     49    # Get crl file from web link
     50    if not os.path.exists(os.path.join(CRLS_DIRPATH, CRL_FILENAME)):
     51        config.getCRLFile(CC_CRL_HTTP, CRLS_DIRPATH)
    4752
    48 # Get crl file from web link
    49 if not os.path.exists(os.path.join(CRLS_DIRPATH, CRL_FILENAME)):
    50     config.getCRLFile(CC_CRL_HTTP, CRLS_DIRPATH)
     53    # Generate pam_pkcs11.conf file
     54    config.makeConfigFile(GUNZIP_DIRPATH, PAMPKCS11_CONFIG, PAMPKCS11_DIRPATH)
    5155
    52 # Generate pam_pkcs11.conf file
    53 config.makeConfigFile(GUNZIP_DIRPATH, PAMPKCS11_CONFIG, PAMPKCS11_DIRPATH)
     56    # Add portuguese CC module to pam_pkcs11.conf file
     57    if "pteid" not in "".join(open(PAMPKCS11_CONFIG, mode="r").readlines()):
     58        config.addConfigModule(PTEID_MODULE, PAMPKCS11_CONFIG)
    5459
    55 # Add portuguese CC module to pam_pkcs11.conf file
    56 if "pteid" not in "".join(open(PAMPKCS11_CONFIG, mode="r").readlines()):
    57     config.addConfigModule(PTEID_MODULE, PAMPKCS11_CONFIG)
     60    # Change pkcs11 module to be used in pam_pkcs11.conf file
     61    config.changeUseModule("pteid", PAMPKCS11_CONFIG)
    5862
    59 # Change pkcs11 module to be used in pam_pkcs11.conf file
    60 config.changeUseModule("pteid", PAMPKCS11_CONFIG)
    61 
    62 # Test this phase of configuration by running pkcs11_inspect
    6363
    6464# Part 2 - User mapping configuration
     65def configureUserMapping():
     66    # Change use_mappers to subject in pam_pkcs11.conf
     67    config.changeUseMappers("subject", PAMPKCS11_CONFIG)
    6568
    66 # Change use_mappers to subject in pam_pkcs11.conf
    67 config.changeUseMappers("subject", PAMPKCS11_CONFIG)
     69    # Copy subject_mapping file to main configuration folder
     70    config.copyFileToDirectory(SUBJECTMAPPING_EXAMPLE, PAMPKCS11_MAPPING)
    6871
    69 # Copy subject_mapping file to main configuration folder
    70 config.copyFileToDirectory(SUBJECTMAPPING_EXAMPLE, PAMPKCS11_MAPPING)
     72    # Add certificate->user mapping to subject_mapping file
     73    username = input("Please write the username to be used in the mapping\n")
     74    config.addUserMapping(PAMPKCS11_MAPPING, username)
    7175
    72 # Extract user authentication certificate from pkcs11_inspect execution
    73 # Add certificate->user mapping to subject_mapping file
    74 username = input("Please write the username to used in the mapping\n")
    75 if config.addUserMapping(PAMPKCS11_MAPPING, username):
    76     print("Added mapping for user '%s'" % username)
    77 else:
    78     print("Failed to add mapping for user '%s'" % username)
     76    # Create the pkcs11 file with configuration info
     77    config.copyFileToDirectory(PAMCONFIG_EXAMPLE, PAMCONFIG)
    7978
    80 # Create the pkcs11 file with configuration info
    81 config.copyFileToDirectory(PAMCONFIG_EXAMPLE, PAMCONFIG)
    82 
    83 # Simulate pam-auth-update manually to change content of common-auth
    84 config.runPamAuthUpdate()
     79    # Simulate pam-auth-update manually to change content of common-auth
     80    config.runPamAuthUpdate()
    8581
    8682
     
    9086    config.resetPamAuth()
    9187    config.deleteTemporaryData()
    92 
  • internals/2016/linuxloginsmartcardwizard/trunk/project1/tests.py

    r16327 r16380  
    11#!/usr/bin/python3
    2 import configpkcs11
     2import config
    33
    44# TODO tests for package installation
     
    77
    88# TODO tests for copying certificates
    9 
Note: See TracChangeset for help on using the changeset viewer.