diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-16 13:19:21 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-16 13:19:21 -0400 |
commit | 10dffc3ed32844de28b28c7db6f97849c7e4f01a (patch) | |
tree | 3aee9fae5748c9abddfcb2a3adc1a6ee0562720f | |
parent | 15fbd71774a67ad84b52b3908733259844429024 (diff) |
add parabolaweb-changepassword as a setuid program.v20140616
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | parabolaweb-changepassword | 24 |
2 files changed, 28 insertions, 0 deletions
@@ -6,6 +6,7 @@ confdir = /etc/conf.d all: depends.txt install: \ + $(DESTDIR)$(sbindir)/parabolaweb-changepassword \ $(DESTDIR)$(sbindir)/parabolaweb-fcgi \ $(DESTDIR)$(sbindir)/parabolaweb-reporead-inotify \ $(DESTDIR)$(sbindir)/parabolaweb-update \ @@ -22,6 +23,9 @@ depends.txt: list-depends depends_static.txt $(DESTDIR)$(sbindir)/%: % install -Dm755 $< $@ +$(DESTDIR)$(sbindir)/parabolaweb-changepassword: parabolaweb-changepassword + install -Dm7755 $< $@ + $(DESTDIR)$(systemddir)/%.service: %.service install -Dm644 $< $@ diff --git a/parabolaweb-changepassword b/parabolaweb-changepassword new file mode 100644 index 0000000..96c285a --- /dev/null +++ b/parabolaweb-changepassword @@ -0,0 +1,24 @@ +#!/bin/bash -e + +# Copyright (c) 2014 Luke Shumaker <lukeshu@sbcglobal.net> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +. /etc/conf.d/parabolaweb + +[[ -e "${WEBDIR}/manage.py" ]] +[[ -n "${WEBUSER}" ]] +[[ $# -eq 0 ]] + +sudo -u "${WEBUSER}" python2 "${WEBDIR}/manage.py" changepassword "${USER}" |