Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Crans Passwords
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
Crans Passwords
Commits
b123e50c
Commit
b123e50c
authored
Oct 12, 2012
by
Daniel STAN
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://git.crans.org/git/cranspasswords
parents
26372c94
51ef42ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
21 deletions
+14
-21
config.py
config.py
+0
-11
cranspasswords-server
cranspasswords-server
+1
-1
cranspasswords-server.py
cranspasswords-server.py
+13
-9
No files found.
config.py
View file @
b123e50c
...
...
@@ -4,17 +4,6 @@
import
os
servers
=
{
'perso'
:
{
'server_cmd'
:
[
'/home/dstan/passwords/cranspasswords/cranspasswords-server.py'
],
'user'
:
'dstan'
},
'debug'
:
{
'server_cmd'
:
[
'/usr/bin/ssh'
,
'localhost'
,
\
'/home/dstan/crans/cranspasswords/cranspasswords-server.py'
],
'user'
:
'dstan'
},
'debug2'
:
{
'server_cmd'
:[
'/usr/bin/ssh'
,
'vo'
,
\
'/home/dstan/cranspasswords/cranspasswords-server'
],
'user'
:
'dstan'
},
'default'
:
{
'server_cmd'
:
[
'/usr/bin/ssh'
,
'vert.adm.crans.org'
,
\
'/root/cranspasswords/cranspasswords-server'
],
...
...
cranspasswords-server
View file @
b123e50c
#!/bin/bash
sudo
/
home/dstan
/cranspasswords/cranspasswords-server.py
$*
sudo
/
root
/cranspasswords/cranspasswords-server.py
$*
cranspasswords-server.py
View file @
b123e50c
...
...
@@ -2,8 +2,8 @@
# -*- encoding: utf-8 -*-
"""cranspasswords-server.py: Serveur pour cranspasswords"""
MYDIR
=
'/
home/dstan
/cranspasswords/'
STORE
=
MYDIR
+
'
test
/'
MYDIR
=
'/
root
/cranspasswords/'
STORE
=
MYDIR
+
'
db
/'
import
glob
import
os
...
...
@@ -20,7 +20,7 @@ if MYUID == 'root':
MYUID
=
os
.
environ
[
'SUDO_USER'
]
CRANSP_MAIL
=
"root@crans.org"
DEST_MAIL
=
"
dstan
@crans.org"
DEST_MAIL
=
"
root
@crans.org"
KEYS
=
{
"aza-vallina"
:
(
"Damien.Aza-Vallina@crans.org"
,
None
),
...
...
@@ -40,11 +40,11 @@ KEYS = {
"samir"
:
(
"samir@crans.org"
,
"41C2B76B"
),
"boilard"
:
(
"boilard@crans.org"
,
"C39EB6F4"
),
"cauderlier"
:
(
"cauderlier@crans.org"
,
None
),
#Méchant pas beau
"maioli"
:
(
"maioli@crans.org"
,
None
)
#Bis (maybe 9E5026E8)
"maioli"
:
(
"maioli@crans.org"
,
None
),
#Bis (maybe 9E5026E8)
"legallic"
:
(
"legallic@crans.org"
,
"3784CFC3"
),
}
RTC
=
[
"dandrimont"
,
"iffrig"
]
NOUNOUS
=
RTC
+
[
...
...
@@ -61,16 +61,17 @@ NOUNOUS=RTC+[
"cauderlier"
,
"maioli"
,
"samir"
,
"boilard"
"boilard"
,
"legallic"
,
]
CA
=
[
"becue"
,
"dstan"
,
"boilard"
]
CA
=
[]
ROLES
=
{
"ca"
:
CA
,
"ca-w"
:
CA
,
"nounous"
:
NOUNOUS
,
"nounous-w"
:
NOUNOUS
#Or maybe RTC ?
"nounous-w"
:
NOUNOUS
,
}
...
...
@@ -122,7 +123,10 @@ def getfile(filename):
filepath
=
getpath
(
filename
)
try
:
return
json
.
loads
(
open
(
filepath
).
read
())
obj
=
json
.
loads
(
open
(
filepath
).
read
())
if
not
validate
(
obj
[
'roles'
]):
return
False
return
obj
except
IOError
:
return
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment