INN commit: trunk (8 files)
INN Commit
rra at isc.org
Sat Feb 8 13:48:49 UTC 2014
Date: Saturday, February 8, 2014 @ 05:48:49
Author: iulius
Revision: 9598
add a valid shell when su'ing to the news user
Pass "-s /bin/sh" to "su news" to cope with the change of the news
user's shell in base-passwd 3.5.30.
Thanks to Colin Watson for the patch.
Modified:
trunk/CONTRIBUTORS
trunk/contrib/sample.init.script
trunk/contrib/sample.init.systemd
trunk/doc/pod/checklist.pod
trunk/doc/pod/install.pod
trunk/doc/pod/nnrpd.pod
trunk/doc/pod/rc.news.pod
trunk/scripts/rc.news.in
-----------------------------+
CONTRIBUTORS | 2 +-
contrib/sample.init.script | 8 ++++----
contrib/sample.init.systemd | 2 +-
doc/pod/checklist.pod | 10 +++++-----
doc/pod/install.pod | 10 +++++-----
doc/pod/nnrpd.pod | 2 +-
doc/pod/rc.news.pod | 6 +++---
scripts/rc.news.in | 4 ++--
8 files changed, 22 insertions(+), 22 deletions(-)
Modified: CONTRIBUTORS
===================================================================
--- CONTRIBUTORS 2014-01-06 04:38:51 UTC (rev 9597)
+++ CONTRIBUTORS 2014-02-08 13:48:49 UTC (rev 9598)
@@ -276,4 +276,4 @@
Edmund H. Ramm, Raphael Barrois, Bo Lindbergh, Matthias Meyser,
Dennis Preiser, Paolo Amoroso, Dennis Davis, River Tarnell, Jochen Schmitt,
Tim Fardell, Remco Rijnders, David Binderman, Tony Evans, Christian Garbs,
-Jesse Rehmer
+Jesse Rehmer, Colin Watson
Modified: contrib/sample.init.script
===================================================================
--- contrib/sample.init.script 2014-01-06 04:38:51 UTC (rev 9597)
+++ contrib/sample.init.script 2014-02-08 13:48:49 UTC (rev 9598)
@@ -11,11 +11,11 @@
start () {
ulimit -n unlimited
# Start INN.
- su news -c '<pathbin>/rc.news' >> <pathlog>/rc.news 2>&1
+ su news -s /bin/sh -c '<pathbin>/rc.news' >> <pathlog>/rc.news 2>&1
# Start another nnrpd daemon, handling initial TLS connections, on port 563.
# (The preferred way would be to use port 119 and STARTTLS but not all news
# readers support it yet.)
- #su news -c '<pathbin>/nnrpd -D -p 563 -S' >> <pathlog>/rc.news 2>&1
+ #su news -s /bin/sh -c '<pathbin>/nnrpd -D -p 563 -S' >> <pathlog>/rc.news 2>&1
}
case "$1" in
@@ -26,10 +26,10 @@
stop)
# Stop INN.
- su news -c '<pathbin>/rc.news stop' >> <pathlog>/rc.news 2>&1
+ su news -s /bin/sh -c '<pathbin>/rc.news stop' >> <pathlog>/rc.news 2>&1
# Stop possible other nnrpd daemons. One of the two following commands is enough.
#start-stop-daemon --stop --name nnrpd --quiet --oknodo
- #su news -c 'killall nnrpd' >> <pathlog>/rc.news 2>&1
+ #su news -s /bin/sh -c 'killall nnrpd' >> <pathlog>/rc.news 2>&1
;;
reload|force-reload)
Modified: contrib/sample.init.systemd
===================================================================
--- contrib/sample.init.systemd 2014-01-06 04:38:51 UTC (rev 9597)
+++ contrib/sample.init.systemd 2014-02-08 13:48:49 UTC (rev 9598)
@@ -13,7 +13,7 @@
PIDFile=/run/news/innd.pid
Type=forking
ExecStart=/usr/libexec/news/rc.news
-ExecStop=/bin/su -m news -c '/usr/libexec/news/rc.news stop'
+ExecStop=/bin/su -m news -s /bin/sh -c '/usr/libexec/news/rc.news stop'
KillMode=control-group
[Install]
Modified: doc/pod/checklist.pod
===================================================================
--- doc/pod/checklist.pod 2014-01-06 04:38:51 UTC (rev 9597)
+++ doc/pod/checklist.pod 2014-02-08 13:48:49 UTC (rev 9598)
@@ -35,9 +35,9 @@
You want to be careful that things in that directory stay owned by
C<news> S<-- but> you can't just C<chown -R news:news> after the install,
because you may have binaries that are SUID root. You can do the build
-as any user, but you need to be root when doing C<make install> so as
-to set the permissions correctly. After that point, though, you may
-want to C<su news> to avoid creating any files as root. (For routine
+as any user, but you need to be root when doing C<make install> so as to
+set the permissions correctly. After that point, though, you may want to
+C<su news -s /bin/sh> to avoid creating any files as root. (For routine
maintenance once INN is working, you can generally be root. However,
it is always better to be accustomed to doing that as the news user.)
@@ -227,7 +227,7 @@
Start B<innd> by running I<pathbin>/rc.news B<as the news user>. It
is also what you should launch in your init scripts:
- su news -c <pathbin in inn.conf>/rc.news
+ su news -s /bin/sh -c <pathbin in inn.conf>/rc.news
Check I<pathlog>/news.notice to see if everything went well; also use
C<ps> to see if B<innd> is running.
@@ -331,7 +331,7 @@
You then need to start a second B<nnrpd> to listen to these connections
to NNTPS port 563 and put something like that in your init scripts:
- su news -c '<pathbin>/nnrpd -D -c <pathetc>/readers-ssl.conf -p 563 -S'
+ su news -s /bin/sh -c '<pathbin>/nnrpd -D -c <pathetc>/readers-ssl.conf -p 563 -S'
Note that a news client which supports the STARTTLS command can also
use the conventional NNTP port 119 to initiate a TLS connection. However,
Modified: doc/pod/install.pod
===================================================================
--- doc/pod/install.pod 2014-01-06 04:38:51 UTC (rev 9597)
+++ doc/pod/install.pod 2014-02-08 13:48:49 UTC (rev 9598)
@@ -1479,7 +1479,7 @@
or, if your system does not have per-user crontabs, put the following line
into your system crontab instead:
- 0 3 * * * su -c '<pathbin in inn.conf>/news.daily expireover lowmark' news
+ 0 3 * * * su news -s /bin/sh -c '<pathbin in inn.conf>/news.daily expireover lowmark'
If you're using any non-CNFS storage methods, add C<delayrm> to the above
option list for B<news.daily>.
@@ -1559,7 +1559,7 @@
news user and not as root. To start INN on system boot, you therefore
want to put something like:
- su news -c <pathbin in inn.conf>/rc.news
+ su news -s /bin/sh -c <pathbin in inn.conf>/rc.news
in the system boot scripts. If B<innd> is stopped or killed, you can restart
it by running B<rc.news> by hand as the news user.
@@ -1567,7 +1567,7 @@
The B<rc.news> script may also be used to shut down INN, with the C<stop>
option:
- su news -c '<pathbin in inn.conf>/rc.news stop'
+ su news -s /bin/sh -c '<pathbin in inn.conf>/rc.news stop'
In the F<contrib> directory of this source tree, two sample init scripts are provided: one
for people using System V-style init.d directories, and another for people
@@ -1577,7 +1577,7 @@
B<nnrpd> to listen to these connections to NNTPS port 563 and put something
like that in your init scripts:
- su news -c '<pathbin in inn.conf>/nnrpd -D -c <pathetc in inn.conf>/readers-ssl.conf -p 563 -S'
+ su news -s /bin/sh -c '<pathbin in inn.conf>/nnrpd -D -c <pathetc in inn.conf>/readers-ssl.conf -p 563 -S'
where F<readers-ssl.conf> is the file which indicates whether a given
connection is allowed to read and post news (you can also use the
@@ -1592,7 +1592,7 @@
or if you do not have a B<start-stop-daemon> utility:
- su news -c 'killall nnrpd'
+ su news -s /bin/sh -c 'killall nnrpd'
=head1 Processing Newsgroup Control Messages
Modified: doc/pod/nnrpd.pod
===================================================================
--- doc/pod/nnrpd.pod 2014-01-06 04:38:51 UTC (rev 9597)
+++ doc/pod/nnrpd.pod 2014-02-08 13:48:49 UTC (rev 9598)
@@ -215,7 +215,7 @@
B<nnrpd> to listen on that port through some other means. This can be
done with the B<-D> flag along with C<-p 563> and put into your init scripts:
- su news -c '<pathbin>/nnrpd -D -p 563 -S'
+ su news -s /bin/sh -c '<pathbin>/nnrpd -D -p 563 -S'
but the easiest way is probably to add a line like:
Modified: doc/pod/rc.news.pod
===================================================================
--- doc/pod/rc.news.pod 2014-01-06 04:38:51 UTC (rev 9597)
+++ doc/pod/rc.news.pod 2014-02-08 13:48:49 UTC (rev 9598)
@@ -67,16 +67,16 @@
To start INN and leave certain error messages going to the terminal:
- su - news -c <pathbin in inn.conf>/rc.news
+ su - news -s /bin/sh -c <pathbin in inn.conf>/rc.news
To run INN at startup time from appropriate system boot scripts:
- su - news -c <pathbin>/rc.news >/dev/console
+ su - news -s /bin/sh -c <pathbin>/rc.news >/dev/console
To stop INN (throttling first):
<pathbin>/ctlinnd throttle reason
- su - news -c '<pathbin>/rc.news stop'
+ su - news -s /bin/sh -c '<pathbin>/rc.news stop'
=head1 BUGS
Modified: scripts/rc.news.in
===================================================================
--- scripts/rc.news.in 2014-01-06 04:38:51 UTC (rev 9597)
+++ scripts/rc.news.in 2014-02-08 13:48:49 UTC (rev 9598)
@@ -3,10 +3,10 @@
## $Revision$
## News boot script. Runs as "news" user. Run from rc.whatever as:
-## su news -c /path/to/rc.news >/dev/console
+## su news -s /bin/sh -c /path/to/rc.news >/dev/console
##
## Or to stop INN:
-## su news -c '/path/to/rc.news stop'
+## su news -s /bin/sh -c '/path/to/rc.news stop'
waitforpid()
{
More information about the inn-committers
mailing list