Commit a0950929 authored by Daniel STAN's avatar Daniel STAN

secrets_new: profiling

On syslog les demandes de mot de passe des scripts. Histoire de savoir
qui a besoin de quoi pour limiter ensuite.
Cf /var/log/secrets_new.log sur thot.
parent 5eb2f7d5
......@@ -24,9 +24,15 @@ Recuperation des secrets depuis /etc/crans/secrets.
import sys
import os
from syslog import syslog, openlog
import getpass
def get(secret):
""" Recupere un secret. """
prog = os.path.basename(sys.argv[0])
syslog('%s (in %s) asked for %s' % (getpass.getuser(), prog, secret))
f = open("/etc/crans/secrets/" + secret)
result =
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment