提交 712bb188 编写于 作者: J Joerg Jaspert

import-users

delete no longer existing users instead of just needlessly spamming us
with their names
Signed-off-by: NJoerg Jaspert <joerg@debian.org>
上级 1a7c6855
......@@ -99,8 +99,9 @@ def main ():
keys = postgres_unames.keys()
keys.sort()
for uname in keys:
if not passwd_unames.has_key(uname)and not known_postgres_unames.has_key(uname):
print "W: %s is in Postgres but not the passwd file or list of known Postgres users." % (uname)
if not passwd_unames.has_key(uname) and not known_postgres_unames.has_key(uname):
print "I: Deleting %s from Postgres, no longer in passwd or list of known Postgres users" % (uname)
q = session.execute('DROP USER "%s"' % (uname))
keys = passwd_unames.keys()
keys.sort()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册