From: kupcevic@sourceware.org <kupcevic@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci init.d/luci site/luci/etc/stunnel.c ...
Date: 14 Jun 2006 20:59:38 -0000 [thread overview]
Message-ID: <20060614205938.1254.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-06-14 20:59:37
Modified files:
luci/init.d : luci
luci/site/luci/etc: stunnel.conf zope.conf
luci/utils : luci_admin
Log message:
Luci: let luci run as luci user
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/init.d/luci.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/etc/stunnel.conf.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/etc/zope.conf.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/utils/luci_admin.diff?cvsroot=cluster&r1=1.6&r2=1.7
--- conga/luci/init.d/luci 2006/06/06 21:05:43 1.2
+++ conga/luci/init.d/luci 2006/06/14 20:59:37 1.3
@@ -24,8 +24,8 @@
LUCID="/var/lib/luci/bin/runzope"
PIDFILE="/var/lib/luci/var/Z2.pid"
-LUCI_USER="zope"
-LUCI_GROUP="zope"
+LUCI_USER="luci"
+LUCI_GROUP="luci"
HTTPS_PUBKEY="/var/lib/luci/var/certs/https.pem"
HTTPS_PRIVKEY="/var/lib/luci/var/certs/https.key.pem"
@@ -57,11 +57,13 @@
generate_https_certs()
{
+ echo -n "generating https SSL certificates... "
/usr/bin/openssl genrsa -out $HTTPS_PRIVKEY 2048 > /dev/null 2>&1
/usr/bin/openssl req -new -x509 -key $HTTPS_PRIVKEY -out $HTTPS_PUBKEY -days 1095 -config /var/lib/luci/var/certs/cacert.config
/bin/chown $LUCI_USER:$LUCI_GROUP $HTTPS_PRIVKEY $HTTPS_PUBKEY
/bin/chmod 600 $HTTPS_PRIVKEY
/bin/chmod 644 $HTTPS_PUBKEY
+ echo "done"
return $?
}
--- conga/luci/site/luci/etc/stunnel.conf 2006/06/06 21:05:43 1.1
+++ conga/luci/site/luci/etc/stunnel.conf 2006/06/14 20:59:37 1.2
@@ -1,6 +1,6 @@
cert = /var/lib/luci/var/certs/https.pem
key = /var/lib/luci/var/certs/https.key.pem
-setuid = zope
+setuid = luci
chroot = /var/lib/luci/var/stunnel
pid = /pid
--- conga/luci/site/luci/etc/zope.conf 2006/06/06 21:05:43 1.3
+++ conga/luci/site/luci/etc/zope.conf 2006/06/14 20:59:37 1.4
@@ -150,7 +150,7 @@
#
# effective-user chrism
-effective-user zope
+effective-user luci
# Directive: enable-product-installation
#
--- conga/luci/utils/luci_admin 2006/06/13 18:42:58 1.6
+++ conga/luci/utils/luci_admin 2006/06/14 20:59:37 1.7
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import sys, os, random, crypt, select, string
+import sys, os, stat, random, crypt, select, string
sys.path.extend((
'/usr/lib64/zope/lib/python',
@@ -18,8 +18,8 @@
import types
-LUCI_USER='zope'
-LUCI_GROUP='zope'
+LUCI_USER='luci'
+LUCI_GROUP='luci'
SSL_PRIVKEY_PATH='/var/lib/luci/var/certs/privkey.pem'
SSL_PUBKEY_PATH='/var/lib/luci/var/certs/cacert.pem'
@@ -27,6 +27,9 @@
LUCI_BACKUP_PATH='/var/lib/luci/var/luci_backup.xml'
LUCI_DB_PATH='/var/lib/luci/var/Data.fs'
+INITUSER_FILE_PATH = '/var/lib/luci/inituser'
+
+
def luci_restore(argv):
print "TODO: implement me"
@@ -375,9 +378,15 @@
pswd = '{CRYPT}' + crypt.crypt(password, salt)
return pswd
def save_password(user, password):
- inituser = file('/var/lib/luci/inituser', 'w')
+ inituser = file(INITUSER_FILE_PATH, 'w')
+ os.chmod(INITUSER_FILE_PATH, stat.S_IRUSR|stat.S_IWUSR)
inituser.write(user + ':' + password)
inituser.close()
+
+ command = '/bin/chown'
+ args = [command, LUCI_USER, INITUSER_FILE_PATH]
+ _execWithCaptureErrorStatus(command, args)
+
return
reply other threads:[~2006-06-14 20:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060614205938.1254.qmail@sourceware.org \
--to=kupcevic@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.