Fix permissions on the authorized_keys file

master
Daniel Berteaud 6 years ago
parent 0d8ee519a6
commit 6c4acaee75
  1. 2
      WAPT/control
  2. 32
      WAPT/wapt.psproj
  3. 7
      deploy_keys.bat.j2

@ -1,5 +1,5 @@
package : fws-backuppc-agent package : fws-backuppc-agent
version : 1.3.4-20 version : 1.3.4-21
architecture : all architecture : all
section : base section : base
priority : optional priority : optional

@ -1,5 +1,5 @@
[PyScripter] [PyScripter]
Version=3.3.2.0 Version=3.4.2.0
[Project] [Project]
ClassName=TProjectRootNode ClassName=TProjectRootNode
@ -23,11 +23,11 @@ FileName=C:\Program Files (x86)\wapt\setuphelpers.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2] [Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2]
ClassName=TProjectFileNode ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\wapt-get.ini FileName=C:\Program Files (x86)\wapt\wapt-get.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3] [Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3]
ClassName=TProjectFileNode ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\wapt-get.py FileName=C:\Program Files (x86)\wapt\wapt-get.ini
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4] [Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4]
ClassName=TProjectFileNode ClassName=TProjectFileNode
@ -46,10 +46,14 @@ FileName=$[Project-Path]control
[Project\ChildNodes\Node0\ChildNodes\Node3] [Project\ChildNodes\Node0\ChildNodes\Node3]
ClassName=TProjectFileNode ClassName=TProjectFileNode
FileName=C:\waptdev\wapt-backuppc-agent\deploy_keys.bat.j2
[Project\ChildNodes\Node0\ChildNodes\Node4]
ClassName=TProjectFileNode
FileName=$[Project-Path]..\setup.py FileName=$[Project-Path]..\setup.py
[Project\ChildNodes\Node0\ChildNodes] [Project\ChildNodes\Node0\ChildNodes]
Count=4 Count=5
[Project\ChildNodes\Node1] [Project\ChildNodes\Node1]
ClassName=TProjectRunConfiguationsNode ClassName=TProjectRunConfiguationsNode
@ -74,8 +78,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node1] [Project\ChildNodes\Node1\ChildNodes\Node1]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -97,8 +99,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node2] [Project\ChildNodes\Node1\ChildNodes\Node2]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -120,8 +120,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node3] [Project\ChildNodes\Node1\ChildNodes\Node3]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -143,8 +141,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node4] [Project\ChildNodes\Node1\ChildNodes\Node4]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -166,8 +162,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node5] [Project\ChildNodes\Node1\ChildNodes\Node5]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -189,8 +183,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node6] [Project\ChildNodes\Node1\ChildNodes\Node6]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -212,8 +204,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node7] [Project\ChildNodes\Node1\ChildNodes\Node7]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -235,8 +225,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[Project-Path].. WorkingDirectory=$[Project-Path]..
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node8] [Project\ChildNodes\Node1\ChildNodes\Node8]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -258,8 +246,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node9] [Project\ChildNodes\Node1\ChildNodes\Node9]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -281,8 +267,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes] [Project\ChildNodes\Node1\ChildNodes]
Count=10 Count=10

@ -4,4 +4,9 @@ IF NOT EXIST "%USERPROFILE%\.ssh" mkdir "%USERPROFILE%\.ssh"
IF EXIST "%USERPROFILE%\.ssh\authorized_keys" del /q "%USERPROFILE%\.ssh\authorized_keys" IF EXIST "%USERPROFILE%\.ssh\authorized_keys" del /q "%USERPROFILE%\.ssh\authorized_keys"
{% for key in ssh_keys %} {% for key in ssh_keys %}
echo {{ key }} >> "%USERPROFILE%\.ssh\authorized_keys" echo {{ key }} >> "%USERPROFILE%\.ssh\authorized_keys"
{% endfor %} {% endfor %}
{% if ssh_keys | length > 0 %}
icacls.exe "%USERPROFILE%\.ssh\authorized_keys" /grant:r lbkp:F
icacls.exe "%USERPROFILE%\.ssh\authorized_keys" /grant:r SYSTEM:F
icacls.exe "%USERPROFILE%\.ssh\authorized_keys" /inheritance:r
{% endif %}
Loading…
Cancel
Save