[sysadmin-bin] The new Prosody release made the configuration files readable by either root or the prosody group, m
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] The new Prosody release made the configuration files readable by either root or the prosody group, m
- Date: Sun, 17 May 2015 16:21:58 +0000 (UTC)
commit eb4e11bfdee7786e668822c2ffc9a8e592b86260
Author: Andrea Veri <av gnome org>
Date: Sun May 17 18:21:51 2015 +0200
The new Prosody release made the configuration files readable by either root or the prosody group, make
sure the script is ran as root
prosody.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/prosody.py b/prosody.py
index 56f59fc..4b5b7ed 100755
--- a/prosody.py
+++ b/prosody.py
@@ -9,6 +9,11 @@ import pexpect
from email.mime.text import MIMEText
import smtplib
import sys
+import os
+
+if os.getuid() != 0:
+ sys.exit("The script has to be run as root")
+
def create_prosody_account():
@@ -17,7 +22,7 @@ def create_prosody_account():
username = raw_input('Desired username: ')
email = raw_input('Email to send instructions to: ')
- s = string.lowercase+string.digits
+ s = string.lowercase+string.digits
random_password = ''.join(random.sample(s, 10))
child = pexpect.spawn ('prosodyctl adduser %s jabber gnome org' % (username))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]