Changeset 16567


Ignore:
Timestamp:
Aug 24, 2016, 7:58:53 PM (3 years ago)
Author:
dcorreia
Message:

Updated check if user+card combo exists to catch disabled combos.
Added more docs.

Location:
internals/2016/linuxloginsmartcardwizard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • internals/2016/linuxloginsmartcardwizard/.idea/workspace.xml

    r16562 r16567  
    33  <component name="ChangeListManager">
    44    <list default="true" readonly="true" id="fbd8e757-714d-41c6-a2b9-8558c09dbd04" name="Default" comment="">
     5      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/trunk/proto1/settingswin.py" />
    56      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
    67      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/trunk/proto1/config.py" afterPath="$PROJECT_DIR$/trunk/proto1/config.py" />
    7       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/trunk/proto1/main.py" afterPath="$PROJECT_DIR$/trunk/proto1/main.py" />
    88      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/trunk/proto1/mainwin.py" afterPath="$PROJECT_DIR$/trunk/proto1/mainwin.py" />
    99    </list>
     
    2626  <component name="FileEditorManager">
    2727    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
    28       <file leaf-file-name="mainwin.py" pinned="false" current-in-tab="true">
     28      <file leaf-file-name="mainwin.py" pinned="false" current-in-tab="false">
    2929        <entry file="file://$PROJECT_DIR$/trunk/proto1/mainwin.py">
    3030          <provider selected="true" editor-type-id="text-editor">
    31             <state relative-caret-position="414">
    32               <caret line="76" column="57" selection-start-line="76" selection-start-column="57" selection-end-line="76" selection-end-column="57" />
     31            <state relative-caret-position="504">
     32              <caret line="82" column="0" selection-start-line="82" selection-start-column="0" selection-end-line="82" selection-end-column="0" />
    3333              <folding>
    3434                <element signature="e#19#61#0" expanded="true" />
     35              </folding>
     36            </state>
     37          </provider>
     38        </entry>
     39      </file>
     40      <file leaf-file-name="settingswin.py" pinned="false" current-in-tab="false">
     41        <entry file="file://$PROJECT_DIR$/trunk/proto1/settingswin.py">
     42          <provider selected="true" editor-type-id="text-editor">
     43            <state relative-caret-position="108">
     44              <caret line="6" column="14" selection-start-line="6" selection-start-column="6" selection-end-line="6" selection-end-column="28" />
     45              <folding>
     46                <element signature="e#19#54#0" expanded="true" />
    3547              </folding>
    3648            </state>
     
    4153        <entry file="file://$PROJECT_DIR$/trunk/proto1/checksystem.py">
    4254          <provider selected="true" editor-type-id="text-editor">
    43             <state relative-caret-position="1314">
    44               <caret line="74" column="90" selection-start-line="74" selection-start-column="90" selection-end-line="74" selection-end-column="90" />
    45               <folding />
     55            <state relative-caret-position="1278">
     56              <caret line="72" column="56" selection-start-line="72" selection-start-column="56" selection-end-line="72" selection-end-column="56" />
     57              <folding>
     58                <element signature="e#0#42#0" expanded="true" />
     59              </folding>
    4660            </state>
    4761          </provider>
     
    5165        <entry file="file://$PROJECT_DIR$/trunk/proto1/carduser.py">
    5266          <provider selected="true" editor-type-id="text-editor">
    53             <state relative-caret-position="558">
    54               <caret line="33" column="8" selection-start-line="33" selection-start-column="8" selection-end-line="33" selection-end-column="71" />
     67            <state relative-caret-position="2448">
     68              <caret line="138" column="35" selection-start-line="138" selection-start-column="35" selection-end-line="138" selection-end-column="35" />
    5569              <folding />
    56             </state>
    57           </provider>
    58         </entry>
    59       </file>
    60       <file leaf-file-name="welcome.py" pinned="false" current-in-tab="false">
    61         <entry file="file://$PROJECT_DIR$/trunk/proto1/welcome.py">
    62           <provider selected="true" editor-type-id="text-editor">
    63             <state relative-caret-position="414">
    64               <caret line="23" column="83" selection-start-line="23" selection-start-column="83" selection-end-line="23" selection-end-column="83" />
    65               <folding />
    66             </state>
    67           </provider>
    68         </entry>
    69       </file>
    70       <file leaf-file-name="w4pages.py" pinned="false" current-in-tab="false">
    71         <entry file="file://$PROJECT_DIR$/trunk/proto1/w4pages.py">
    72           <provider selected="true" editor-type-id="text-editor">
    73             <state relative-caret-position="1044">
    74               <caret line="60" column="14" selection-start-line="60" selection-start-column="14" selection-end-line="60" selection-end-column="14" />
    75               <folding>
    76                 <element signature="e#0#42#0" expanded="true" />
    77               </folding>
    7870            </state>
    7971          </provider>
     
    8375        <entry file="file://$PROJECT_DIR$/trunk/proto1/main.py">
    8476          <provider selected="true" editor-type-id="text-editor">
    85             <state relative-caret-position="239">
     77            <state relative-caret-position="1026">
    8678              <caret line="57" column="34" selection-start-line="57" selection-start-column="34" selection-end-line="57" selection-end-column="34" />
    8779              <folding />
     
    10294        </entry>
    10395      </file>
    104       <file leaf-file-name="config.py" pinned="false" current-in-tab="false">
     96      <file leaf-file-name="config.py" pinned="false" current-in-tab="true">
    10597        <entry file="file://$PROJECT_DIR$/trunk/proto1/config.py">
    10698          <provider selected="true" editor-type-id="text-editor">
    107             <state relative-caret-position="131">
    108               <caret line="241" column="25" selection-start-line="241" selection-start-column="25" selection-end-line="241" selection-end-column="25" />
     99            <state relative-caret-position="-489">
     100              <caret line="430" column="43" selection-start-line="430" selection-start-column="43" selection-end-line="430" selection-end-column="43" />
    109101              <folding>
    110                 <element signature="e#19#28#0" expanded="true" />
    111                 <element signature="e#7072#7282#1" expanded="true" />
     102                <element signature="e#19#29#0" expanded="true" />
     103                <element signature="e#1780#1887#1" expanded="true" />
     104                <element signature="e#2020#2129#1" expanded="true" />
     105                <element signature="e#2431#2554#1" expanded="true" />
     106                <element signature="e#2669#2769#1" expanded="true" />
     107                <element signature="e#3060#3162#1" expanded="true" />
     108                <element signature="e#3274#3358#1" expanded="true" />
     109                <element signature="e#3685#3798#1" expanded="true" />
     110                <element signature="e#4201#4384#1" expanded="true" />
     111                <element signature="e#4541#4711#1" expanded="true" />
     112                <element signature="e#4997#5146#1" expanded="true" />
     113                <element signature="e#5243#5389#1" expanded="true" />
     114                <element signature="e#5477#5583#1" expanded="true" />
     115                <element signature="e#5743#5851#1" expanded="true" />
     116                <element signature="e#5987#6105#1" expanded="true" />
     117                <element signature="e#6979#7141#1" expanded="true" />
     118                <element signature="e#7630#7840#1" expanded="true" />
     119                <element signature="e#8537#8693#1" expanded="true" />
     120                <element signature="e#8837#8924#1" expanded="true" />
     121                <element signature="e#9575#9674#1" expanded="true" />
     122                <element signature="e#9738#9836#1" expanded="true" />
     123                <element signature="e#9902#10016#1" expanded="true" />
     124                <element signature="e#10197#10322#1" expanded="true" />
     125                <element signature="e#10401#10493#1" expanded="true" />
     126                <element signature="e#10693#10786#1" expanded="true" />
     127                <element signature="e#10894#10967#1" expanded="true" />
     128                <element signature="e#11184#11257#1" expanded="true" />
     129                <element signature="e#11495#11670#1" expanded="true" />
     130                <element signature="e#11762#11926#1" expanded="true" />
     131                <element signature="e#12122#12215#1" expanded="true" />
     132                <element signature="e#12638#12816#1" expanded="true" />
    112133              </folding>
    113             </state>
    114           </provider>
    115         </entry>
    116       </file>
    117       <file leaf-file-name="cardHelper.py" pinned="false" current-in-tab="false">
    118         <entry file="file://$PROJECT_DIR$/trunk/proto1/cardHelper.py">
    119           <provider selected="true" editor-type-id="text-editor">
    120             <state relative-caret-position="2970">
    121               <caret line="203" column="0" selection-start-line="203" selection-start-column="0" selection-end-line="203" selection-end-column="0" />
    122               <folding>
    123                 <element signature="e#1320#2817#0" expanded="false" />
    124                 <element signature="e#6457#8304#0" expanded="false" />
    125               </folding>
    126             </state>
    127           </provider>
    128         </entry>
    129       </file>
    130       <file leaf-file-name="simple_example.py" pinned="false" current-in-tab="false">
    131         <entry file="file://$PROJECT_DIR$/trunk/proto1/eidlibPython_Wrapper/examples/simple_example.py">
    132           <provider selected="true" editor-type-id="text-editor">
    133             <state relative-caret-position="1098">
    134               <caret line="61" column="0" selection-start-line="61" selection-start-column="0" selection-end-line="61" selection-end-column="0" />
    135               <folding />
    136134            </state>
    137135          </provider>
     
    188186        <option value="$PROJECT_DIR$/trunk/proto1/welcome.py" />
    189187        <option value="$PROJECT_DIR$/trunk/proto1/fileHelper.py" />
     188        <option value="$PROJECT_DIR$/trunk/proto1/w4pages.py" />
     189        <option value="$PROJECT_DIR$/trunk/proto1/main.py" />
    190190        <option value="$PROJECT_DIR$/trunk/proto1/checksystem.py" />
    191         <option value="$PROJECT_DIR$/trunk/proto1/w4pages.py" />
     191        <option value="$PROJECT_DIR$/trunk/proto1/mainwin.py" />
     192        <option value="$PROJECT_DIR$/trunk/proto1/settingswin.py" />
    192193        <option value="$PROJECT_DIR$/trunk/proto1/config.py" />
    193         <option value="$PROJECT_DIR$/trunk/proto1/main.py" />
    194         <option value="$PROJECT_DIR$/trunk/proto1/mainwin.py" />
    195194      </list>
    196195    </option>
     
    249248    </navigator>
    250249    <panes>
     250      <pane id="Scratches" />
    251251      <pane id="ProjectPane">
    252252        <subPane />
    253253      </pane>
    254254      <pane id="Scope" />
    255       <pane id="Scratches" />
    256255    </panes>
    257256  </component>
     
    798797      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24547803" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
    799798      <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="9" side_tool="true" content_ui="tabs" />
     799      <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="2" side_tool="false" content_ui="tabs" />
    800800      <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.23647605" sideWeight="0.49323785" order="12" side_tool="false" content_ui="tabs" />
    801801      <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.32612056" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
     802      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.28748068" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
    802803      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24900557" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
    803804      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.23029366" sideWeight="0.4953125" order="10" side_tool="false" content_ui="tabs" />
    804805      <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="1" side_tool="true" content_ui="tabs" />
     806      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39876354" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
    805807      <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="11" side_tool="false" content_ui="tabs" />
    806808      <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="5" side_tool="false" content_ui="tabs" />
     
    809811      <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" />
    810812      <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="6" side_tool="false" content_ui="tabs" />
    811       <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.28748068" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
    812813      <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" />
    813814      <window_info id="Inspection Results" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32945737" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
    814       <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="2" side_tool="false" content_ui="tabs" />
    815815      <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" />
    816       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39876354" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
    817816    </layout>
    818817  </component>
     
    862861  <component name="XDebuggerManager">
    863862    <breakpoint-manager>
    864       <option name="time" value="30" />
     863      <option name="time" value="31" />
    865864    </breakpoint-manager>
    866865    <watches-manager />
    867866  </component>
    868867  <component name="editorHistoryManager">
    869     <entry file="file://$PROJECT_DIR$/trunk/project1/configmapper.py" />
    870     <entry file="file://$PROJECT_DIR$/trunk/project1/pkcs11.example">
    871       <provider selected="true" editor-type-id="text-editor">
    872         <state relative-caret-position="72">
    873           <caret line="4" column="74" selection-start-line="4" selection-start-column="74" selection-end-line="4" selection-end-column="74" />
    874         </state>
    875       </provider>
    876     </entry>
    877868    <entry file="file://$PROJECT_DIR$/trunk/project1/tests.py">
    878869      <provider selected="true" editor-type-id="text-editor">
     
    10391030      </provider>
    10401031    </entry>
     1032    <entry file="file://$PROJECT_DIR$/trunk/proto1/cardHelper.py">
     1033      <provider selected="true" editor-type-id="text-editor">
     1034        <state relative-caret-position="2970">
     1035          <caret line="203" column="0" selection-start-line="203" selection-start-column="0" selection-end-line="203" selection-end-column="0" />
     1036        </state>
     1037      </provider>
     1038    </entry>
     1039    <entry file="file://$PROJECT_DIR$/trunk/proto1/eidlibPython_Wrapper/examples/simple_example.py">
     1040      <provider selected="true" editor-type-id="text-editor">
     1041        <state relative-caret-position="1098">
     1042          <caret line="61" column="0" selection-start-line="61" selection-start-column="0" selection-end-line="61" selection-end-column="0" />
     1043        </state>
     1044      </provider>
     1045    </entry>
    10411046    <entry file="file://$PROJECT_DIR$/trunk/proto1/final.py">
    10421047      <provider selected="true" editor-type-id="text-editor">
     
    10461051      </provider>
    10471052    </entry>
    1048     <entry file="file://$PROJECT_DIR$/trunk/proto1/cardHelper.py">
    1049       <provider selected="true" editor-type-id="text-editor">
    1050         <state relative-caret-position="2970">
    1051           <caret line="203" column="0" selection-start-line="203" selection-start-column="0" selection-end-line="203" selection-end-column="0" />
    1052           <folding>
    1053             <element signature="e#1320#2817#0" expanded="false" />
    1054             <element signature="e#6457#8304#0" expanded="false" />
    1055           </folding>
    1056         </state>
    1057       </provider>
    1058     </entry>
    1059     <entry file="file://$PROJECT_DIR$/trunk/proto1/eidlibPython_Wrapper/examples/simple_example.py">
    1060       <provider selected="true" editor-type-id="text-editor">
    1061         <state relative-caret-position="1098">
    1062           <caret line="61" column="0" selection-start-line="61" selection-start-column="0" selection-end-line="61" selection-end-column="0" />
    1063           <folding />
     1053    <entry file="file://$PROJECT_DIR$/trunk/proto1/welcome.py">
     1054      <provider selected="true" editor-type-id="text-editor">
     1055        <state relative-caret-position="414">
     1056          <caret line="23" column="83" selection-start-line="23" selection-start-column="83" selection-end-line="23" selection-end-column="83" />
    10641057        </state>
    10651058      </provider>
     
    10751068      </provider>
    10761069    </entry>
    1077     <entry file="file://$PROJECT_DIR$/trunk/proto1/welcome.py">
    1078       <provider selected="true" editor-type-id="text-editor">
    1079         <state relative-caret-position="414">
    1080           <caret line="23" column="83" selection-start-line="23" selection-start-column="83" selection-end-line="23" selection-end-column="83" />
     1070    <entry file="file://$PROJECT_DIR$/trunk/proto1/carduser.py">
     1071      <provider selected="true" editor-type-id="text-editor">
     1072        <state relative-caret-position="2448">
     1073          <caret line="138" column="35" selection-start-line="138" selection-start-column="35" selection-end-line="138" selection-end-column="35" />
    10811074          <folding />
    10821075        </state>
    10831076      </provider>
    10841077    </entry>
     1078    <entry file="file://$PROJECT_DIR$/trunk/proto1/main.py">
     1079      <provider selected="true" editor-type-id="text-editor">
     1080        <state relative-caret-position="1026">
     1081          <caret line="57" column="34" selection-start-line="57" selection-start-column="34" selection-end-line="57" selection-end-column="34" />
     1082          <folding />
     1083        </state>
     1084      </provider>
     1085    </entry>
    10851086    <entry file="file://$PROJECT_DIR$/trunk/proto1/checksystem.py">
    10861087      <provider selected="true" editor-type-id="text-editor">
    1087         <state relative-caret-position="1314">
    1088           <caret line="74" column="90" selection-start-line="74" selection-start-column="90" selection-end-line="74" selection-end-column="90" />
    1089           <folding />
    1090         </state>
    1091       </provider>
    1092     </entry>
    1093     <entry file="file://$PROJECT_DIR$/trunk/proto1/carduser.py">
    1094       <provider selected="true" editor-type-id="text-editor">
    1095         <state relative-caret-position="558">
    1096           <caret line="33" column="8" selection-start-line="33" selection-start-column="8" selection-end-line="33" selection-end-column="71" />
    1097           <folding />
    1098         </state>
    1099       </provider>
    1100     </entry>
    1101     <entry file="file://$PROJECT_DIR$/trunk/proto1/w4pages.py">
    1102       <provider selected="true" editor-type-id="text-editor">
    1103         <state relative-caret-position="1044">
    1104           <caret line="60" column="14" selection-start-line="60" selection-start-column="14" selection-end-line="60" selection-end-column="14" />
     1088        <state relative-caret-position="1278">
     1089          <caret line="72" column="56" selection-start-line="72" selection-start-column="56" selection-end-line="72" selection-end-column="56" />
    11051090          <folding>
    11061091            <element signature="e#0#42#0" expanded="true" />
     
    11091094      </provider>
    11101095    </entry>
    1111     <entry file="file://$PROJECT_DIR$/trunk/proto1/config.py">
    1112       <provider selected="true" editor-type-id="text-editor">
    1113         <state relative-caret-position="131">
    1114           <caret line="241" column="25" selection-start-line="241" selection-start-column="25" selection-end-line="241" selection-end-column="25" />
     1096    <entry file="file://$PROJECT_DIR$/trunk/proto1/w4pages.py">
     1097      <provider selected="true" editor-type-id="text-editor">
     1098        <state relative-caret-position="1098">
     1099          <caret line="63" column="13" selection-start-line="63" selection-start-column="13" selection-end-line="63" selection-end-column="13" />
     1100          <folding />
     1101        </state>
     1102      </provider>
     1103    </entry>
     1104    <entry file="file://$PROJECT_DIR$/trunk/proto1/img/business-cards-database.png">
     1105      <provider selected="true" editor-type-id="images">
     1106        <state />
     1107      </provider>
     1108    </entry>
     1109    <entry file="file://$PROJECT_DIR$/trunk/proto1/settingswin.py">
     1110      <provider selected="true" editor-type-id="text-editor">
     1111        <state relative-caret-position="108">
     1112          <caret line="6" column="14" selection-start-line="6" selection-start-column="6" selection-end-line="6" selection-end-column="28" />
    11151113          <folding>
    1116             <element signature="e#19#28#0" expanded="true" />
    1117             <element signature="e#7072#7282#1" expanded="true" />
     1114            <element signature="e#19#54#0" expanded="true" />
    11181115          </folding>
    11191116        </state>
    11201117      </provider>
    11211118    </entry>
    1122     <entry file="file://$PROJECT_DIR$/trunk/proto1/main.py">
    1123       <provider selected="true" editor-type-id="text-editor">
    1124         <state relative-caret-position="239">
    1125           <caret line="57" column="34" selection-start-line="57" selection-start-column="34" selection-end-line="57" selection-end-column="34" />
    1126           <folding />
    1127         </state>
    1128       </provider>
    1129     </entry>
    11301119    <entry file="file://$PROJECT_DIR$/trunk/proto1/mainwin.py">
    11311120      <provider selected="true" editor-type-id="text-editor">
    1132         <state relative-caret-position="414">
    1133           <caret line="76" column="57" selection-start-line="76" selection-start-column="57" selection-end-line="76" selection-end-column="57" />
     1121        <state relative-caret-position="504">
     1122          <caret line="82" column="0" selection-start-line="82" selection-start-column="0" selection-end-line="82" selection-end-column="0" />
    11341123          <folding>
    11351124            <element signature="e#19#61#0" expanded="true" />
     
    11381127      </provider>
    11391128    </entry>
     1129    <entry file="file://$PROJECT_DIR$/trunk/proto1/config.py">
     1130      <provider selected="true" editor-type-id="text-editor">
     1131        <state relative-caret-position="-489">
     1132          <caret line="430" column="43" selection-start-line="430" selection-start-column="43" selection-end-line="430" selection-end-column="43" />
     1133          <folding>
     1134            <element signature="e#19#29#0" expanded="true" />
     1135            <element signature="e#1780#1887#1" expanded="true" />
     1136            <element signature="e#2020#2129#1" expanded="true" />
     1137            <element signature="e#2431#2554#1" expanded="true" />
     1138            <element signature="e#2669#2769#1" expanded="true" />
     1139            <element signature="e#3060#3162#1" expanded="true" />
     1140            <element signature="e#3274#3358#1" expanded="true" />
     1141            <element signature="e#3685#3798#1" expanded="true" />
     1142            <element signature="e#4201#4384#1" expanded="true" />
     1143            <element signature="e#4541#4711#1" expanded="true" />
     1144            <element signature="e#4997#5146#1" expanded="true" />
     1145            <element signature="e#5243#5389#1" expanded="true" />
     1146            <element signature="e#5477#5583#1" expanded="true" />
     1147            <element signature="e#5743#5851#1" expanded="true" />
     1148            <element signature="e#5987#6105#1" expanded="true" />
     1149            <element signature="e#6979#7141#1" expanded="true" />
     1150            <element signature="e#7630#7840#1" expanded="true" />
     1151            <element signature="e#8537#8693#1" expanded="true" />
     1152            <element signature="e#8837#8924#1" expanded="true" />
     1153            <element signature="e#9575#9674#1" expanded="true" />
     1154            <element signature="e#9738#9836#1" expanded="true" />
     1155            <element signature="e#9902#10016#1" expanded="true" />
     1156            <element signature="e#10197#10322#1" expanded="true" />
     1157            <element signature="e#10401#10493#1" expanded="true" />
     1158            <element signature="e#10693#10786#1" expanded="true" />
     1159            <element signature="e#10894#10967#1" expanded="true" />
     1160            <element signature="e#11184#11257#1" expanded="true" />
     1161            <element signature="e#11495#11670#1" expanded="true" />
     1162            <element signature="e#11762#11926#1" expanded="true" />
     1163            <element signature="e#12122#12215#1" expanded="true" />
     1164            <element signature="e#12638#12816#1" expanded="true" />
     1165          </folding>
     1166        </state>
     1167      </provider>
     1168    </entry>
    11401169  </component>
    11411170</project>
  • internals/2016/linuxloginsmartcardwizard/trunk/proto1/config.py

    r16564 r16567  
    11#!/usr/bin/python3
    2 import os, grp
    3 import cardHelper, fileHelper
     2import grp
     3import os
     4
     5import cardHelper
     6import fileHelper
    47
    58# Commands
     
    5053def installPKCS11Package():
    5154    """
    52     Installs package using apt-get
    53     :return: no return value
     55    Installs PAM-PKCS#11 package using apt-get
     56    :return: True on success and False otherwise
    5457    """
    5558    return fileHelper.executeCommand(INSTALL_COMMAND + PAMPKCS11_PACKAGE, TRASH_OUTPUT)
     
    5760
    5861def createConfigurationDirectories():
     62    """
     63    Creates pam_pkcs11 configuration directories
     64    :return: True on success and False otherwise
     65    """
    5966    fileHelper.makeDirectory(PAMPKCS11_DIRPATH)
    6067    fileHelper.makeDirectory(CACERTS_DIRPATH)
     
    7481
    7582def copyCacertsAndCrls():
     83    """
     84    Copy cacerts and crls to the configuration directories.
     85    :return: no return value
     86    """
    7687    fileHelper.copyFileToDirectory(ECRAIZ_CERT, CACERTS_DIRPATH)
    7788    fileHelper.copyFileToDirectory(CC001_CERT, CACERTS_DIRPATH)
    78 
    7989    # Get crl file from web link
    8090    if not os.path.exists(os.path.join(CRLS_DIRPATH, CRL_FILENAME)):
     
    156166
    157167def makeMappingFile():
     168    """
     169    Creates a subject mapping file in the configuration directory
     170    :return: no return value
     171    """
    158172    if not os.path.exists(PAMPKCS11_MAPPING):
    159173        fileHelper.copyFileToDirectory(SUBJECTMAPPING_EXAMPLE, PAMPKCS11_MAPPING)
     
    161175
    162176def makePamConfigFile():
     177    """
     178    Creates a pam_pkcs11 config file in the configuration directory
     179    :return: no return value
     180    """
    163181    if not os.path.exists(PAMCONFIG):
    164182        fileHelper.copyFileToDirectory(PAMCONFIG_EXAMPLE, PAMCONFIG)
     
    167185def getCardSubject():
    168186    """
    169     Extracts subject mapper information from card inserted in the reader.
     187    Extracts subject mapper information from the card inserted in the reader.
    170188    :return: no return value
    171189    """
     
    199217    mappings = fileHelper.readFileToList(PAMPKCS11_MAPPING)
    200218    for line in mappings:
    201         if line == combo:
     219        disabledCombo = "#x" + combo
     220        if line == combo or line == disabledCombo:
    202221            return True
    203222    return False
     
    235254
    236255def getCommonAuthStart(listData):
     256    """
     257    Finds the start of the configurations in the common-auth file
     258    :param listData: list of common-auth lines
     259    :return: index of the start
     260    """
    237261    for index in range(0, len(listData)):
    238262        if "auth" == listData[index][:4]:
     
    262286def disablePkcs11Login():
    263287    """
    264     Resets pam-auth-update to default settings.
     288    Disables smartcard login feature using pam-auth-update
    265289    :return: no return value
    266290    """
     
    269293
    270294def enablePkcs11Login():
     295    """
     296    Enables smartcard login feature using pam-auth-update
     297    :return: no return value
     298    """
    271299    runPamAuthUpdate("enable")
    272300
    273301
    274 def isPkcs11LoginActive():
     302def isPkcs11LoginEnabled():
     303    """
     304    Checks if smartcard login feature is enabled
     305    :return: True if it is enable and False otherwise
     306    """
    275307    authData = fileHelper.readFileToList(COMMONAUTH)
    276308    pkcs11Index = getIndexOfToken("pam_pkcs11.so", authData)
     
    279311
    280312def isPkcs11Installed():
     313    """
     314    Checks if smartcard login is installed in the system
     315    :return: True if it is installed and False otherwise
     316    """
    281317    return os.path.exists(PAMPKCS11_CONFIG)
    282318
    283319
    284320def deleteConfigurations():
     321    """
     322    Deletes all smartcard login configuration files
     323    :return: no return value
     324    """
    285325    print("Deleting smartcard login files and resetting login configurations")
    286326    fileHelper.deleteDirectory(PAMPKCS11_DIRPATH)
     
    316356
    317357def hasAdminPermissions(currentUser):
     358    """
     359    Checks if current user has administrator permissions
     360    :param currentUser: name of current user
     361    :return: True if user has permissions and False otherwise
     362    """
    318363    return currentUser in grp.getgrnam("adm").gr_mem
    319364
    320365
    321366def filterAdminUsers(userList):
     367    """
     368    Filters list of local usernames if user doesn't have administrator permissions
     369    :param userList: list of usernames
     370    :return: the filtered list
     371    """
    322372    currentUser = os.getlogin()
    323373    if not hasAdminPermissions(currentUser):
     
    340390
    341391def filterAdminCombos(combosList):
     392    """
     393    Filters list of user + card combos if user doesn't have administrator permissions
     394    :param combosList: list of user + card combos
     395    :return: the filtered list
     396    """
    342397    currentUser = os.getlogin()
    343398    if not hasAdminPermissions(currentUser):
     
    391446
    392447
     448def deleteDisabledCombos(indexList):
     449    combos = listDisabledCombos()
     450    for index in indexList:
     451        number, username = combos[index][0], combos[index][2]
     452        deleteLocalCombo(number, username)
     453
     454
    393455def disableLocalCombo(cardNumber, username):
    394456    mappingsData = fileHelper.readFileToList(PAMPKCS11_MAPPING)
     
    418480
    419481
    420 def enableSelectedLocalCombos(indexList):
     482def enableSelectedCombos(indexList):
    421483    combos = listDisabledCombos()
    422484    for index in indexList:
Note: See TracChangeset for help on using the changeset viewer.