[ldap_crans/whos] Deux corrections concernant ssh, et ajout des champs à whos, avec option -s pour afficher les fpr ssh.
Ignore-this: c7d7960aad0da2f4a510b09d97eeeec7 <> sshFingerprint n'était pas un historique de type diff <> gpgexists au milieu de sshFingerprint() <> on rajoute une espace après le cinquième bloc GPG + Affichage des fpr GPG dans whos + Affichage des fpr SSH dans whos avec option -s ou --ssh + ? darcs-hash:20130112160140-b6762-824baacdb54a9dbd358d8762bda30d5511616674.gz
This commit is contained in:
parent
d6944ca03b
commit
fe958d0009
2 changed files with 17 additions and 6 deletions
|
@ -236,7 +236,7 @@ def format_mac(mac):
|
|||
def format_gpg_fingerprint(fpr):
|
||||
"""
|
||||
Formatage de fingerpring GPG pour les avoir de la forme
|
||||
XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX
|
||||
XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX
|
||||
"""
|
||||
|
||||
# longueur + fpr sans espaces
|
||||
|
@ -257,6 +257,8 @@ def format_gpg_fingerprint(fpr):
|
|||
|
||||
if i != 10:
|
||||
formattedfpr += " "
|
||||
if i == 4:
|
||||
formattedfpr += " "
|
||||
|
||||
return formattedfpr
|
||||
|
||||
|
@ -480,7 +482,7 @@ class CransLdap:
|
|||
|
||||
aid $ chbre $ mail $ mailAlias $ canonicalAlias $
|
||||
mid $ macAddress $ host $ hostAlias $ ipHostNumber $
|
||||
gpgFingerprint
|
||||
gpgFingerprint $ sshFingerprint
|
||||
|
||||
Retourne le dn du lock
|
||||
"""
|
||||
|
@ -1205,7 +1207,7 @@ class BaseClasseCrans(CransLdap):
|
|||
for champ in ['droits', 'controle', 'paiement', 'carteEtudiant',
|
||||
'mailAlias', 'hostAlias', 'exempt', 'nvram',
|
||||
'portTCPin', 'portTCPout', 'portUDPin', 'portUDPout',
|
||||
'homepageAlias', 'imprimeurClub', 'gpgFingerprint']:
|
||||
'homepageAlias', 'imprimeurClub', 'gpgFingerprint', 'sshFingerprint']:
|
||||
if champ in self.modifs:
|
||||
if champ == 'controle':
|
||||
# Ce n'est pas pareil que self._init_data.get('controle', [''])
|
||||
|
@ -3024,7 +3026,7 @@ Contactez nounou si la MAC est bien celle d'une carte.""", 3)
|
|||
else:
|
||||
index = -1
|
||||
|
||||
#if gpgexists(new):
|
||||
#if sshexists(new):
|
||||
# raise ValueError(u"FPR existant ou correspondand à un compte.")
|
||||
|
||||
if index != -1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue