Compare commits

..

13 Commits

Author SHA1 Message Date
William Hubbs
de05267bdc update ChangeLog 2016-11-17 12:10:47 -06:00
Jason Zaman
a8b79601c8 selinux: fix SIGSEGV with invalid contexts
Fixes: https://github.com/openrc/openrc/issues/104
2016-11-17 12:05:34 -06:00
William Hubbs
09a62f2c26 version 0.22.4 2016-11-17 12:05:17 -06:00
William Hubbs
ea047033c4 update ChangeLog 2016-11-03 16:27:33 -05:00
William Hubbs
2bad4da891 init.d/loopback.in: drop the route to the loopback interface on Linux
This is related to #103.
2016-11-03 13:26:19 -05:00
William Hubbs
3c5244fb6a init.d/mount-ro: do not remount /usr read only if it is premounted
X-Gentoo-Bug: 573760
X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573760
2016-11-03 13:20:48 -05:00
William Hubbs
f1134f4efe conf.d/net-online: clarify comment about interfaces setting
This setting refers to all interfaces that support ethernet
2016-11-03 13:20:48 -05:00
William Hubbs
9f68514f8a init.d/net-online: remove interfaces and timeout from local declarations
X-Gentoo-Bug:  598621
X-Gentoo-Bug-URL:  https://bugs.gentoo.org/show_bug.cgi?id=598621
2016-11-03 13:20:48 -05:00
William Hubbs
b16625e625 src/rc/rc: do not try to start services if fork fails 2016-11-03 13:20:48 -05:00
Robin H. Johnson
5dc13a0ff2 init.d/loopback: drop scope on loopback
Busybox does not support the 'scope' argument on 'ip address add' or 'ip
route add', this is documented in BUSYBOX.md, but is no longer actually
needed, as the kernel does get it right without manual specification,
and the ifconfig variant already relies on the kernel to get it right.
This is part of #103.

X-Gentoo-Bug: 487208
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487208
2016-11-03 13:20:48 -05:00
William Hubbs
c094c75f34 src/rc/rc-misc.c: report error if call to flock() fails
X-Gentoo-Bug: 597390
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=597390
2016-11-03 13:20:48 -05:00
Sven Wegener
0e925c511d do_service: Initialize idx to 0
If index is not explicitly specified for service_started_daemon, it will
look for daemons by random index.

This fixes #100.
2016-11-03 13:20:48 -05:00
William Hubbs
9ae469289d version 0.22.3 2016-11-03 12:39:02 -05:00
11 changed files with 133 additions and 236 deletions

View File

@@ -22,9 +22,6 @@ or recognize the nofail option in fstab.
CONFIG_SETFONT -- The setfont applet does not support the -u option from kbd.
CONFIG_IP -- The ip applet doesn't support the "scope" modifier for
"ip route add" and "ip address add".
CONFIG_BB_SYSCTL -- The sysctl applet does not support the --system command
line switch.

330
ChangeLog
View File

@@ -1,3 +1,110 @@
commit a8b79601c86232fe942c7a5aa6725799ba25aed2
Author: Jason Zaman <jason@perfinion.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
selinux: fix SIGSEGV with invalid contexts
Fixes: https://github.com/openrc/openrc/issues/104
commit 09a62f2c260dccf835d29f31da7c9c0709cebff7
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.22.4
commit ea047033c40d7e014317b149566014d56e5e42bb
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit 2bad4da89119c0385f9c92baef148590fb576c88
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
init.d/loopback.in: drop the route to the loopback interface on Linux
This is related to #103.
commit 3c5244fb6acaed01cd186c356e2730f12c77ca99
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
init.d/mount-ro: do not remount /usr read only if it is premounted
X-Gentoo-Bug: 573760
X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573760
commit f1134f4efefdc9b71b2e2c68aacf9b3f3b0ad7c0
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
conf.d/net-online: clarify comment about interfaces setting
This setting refers to all interfaces that support ethernet
commit 9f68514f8ab9a2d4bf7e095b3a41b3c2043d07fe
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
init.d/net-online: remove interfaces and timeout from local declarations
X-Gentoo-Bug: 598621
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=598621
commit b16625e62502c2924f9c00ab144845b93857f6c7
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
src/rc/rc: do not try to start services if fork fails
commit 5dc13a0ff21f2e0a0b23e32e864a19f7f0a2766f
Author: Robin H. Johnson <robbat2@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
init.d/loopback: drop scope on loopback
Busybox does not support the 'scope' argument on 'ip address add' or 'ip
route add', this is documented in BUSYBOX.md, but is no longer actually
needed, as the kernel does get it right without manual specification,
and the ifconfig variant already relies on the kernel to get it right.
This is part of #103.
X-Gentoo-Bug: 487208
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487208
commit c094c75f34776ccae2a89dcb8b6c19d7a8155f56
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
src/rc/rc-misc.c: report error if call to flock() fails
X-Gentoo-Bug: 597390
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=597390
commit 0e925c511d202257b04b27a6ff2a4563bf2f1469
Author: Sven Wegener <swegener@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
do_service: Initialize idx to 0
If index is not explicitly specified for service_started_daemon, it will
look for daemons by random index.
This fixes #100.
commit 9ae469289d89313dc3e6076f089a87015852a788
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.22.3
commit d8ed89971bd2a9fa7cc5014f4d791220a915a3d6
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit a537bd7abb8d3d1841635c78f9163e6d1abad0ba
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
@@ -1333,226 +1440,3 @@ Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
rc-functions.sh: add support for user-defined want dependencies
commit 33d3f33b3ca7dd2ce616b8182d588d0743c2f124
Author: Ian Stakenvicius <axs@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Implement "want" dependency
The want dependency is similar to the use dependency. If a service
script, for example called service1, adds "want service2" to its depend
function, OpenRC will attempt to start service2, if it exists on the
system, when service1 is started.
However, service1 will start regardless of the status of
service2.
X-Gentoo-Bug: 406021
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406021
commit ddb895b355e02c9c07b00bfaf00d1bf8a7abbc03
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
conf.d/netmount: typo fix
X-Gentoo-Bug: 564846
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=564846
commit 085d77f17e3bedd23ffa96fe7e4eb8515ae8bfc6
Author: Benda Xu <heroxbd@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Standardize macro tests for gnu hurd
This also fixes breakage of GNU/hurd builds introduced by commit 3f82edbeb92.
commit c831f1f994e187afd8edfff15e4063b99440bbcb
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
librc: rework overriding rc.conf options from the kcl
Rename the rc_conf_override function to describe its purpose better,
drop one conditional compile by making it available everywhere, and move
the call to it after the optional rc.conf.d directory is processed.
commit 591aea28215a8b5ad8660184dc6f6f15ff0c18b4
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
librc: Remove redundant code from rc_config_load
commit c09eeca49145b034df6527c500099ba22f28e824
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Add rc.conf.d support
This makes it possible to override settings in rc.conf by adding a
directory @SYSCONFDIR@/rc.conf.d and putting files in this directory.
The files will be processed in lexical order, and the last setting in
these files will be used.
commit 4cf6b0ecf7f5b35a6d80d76c60e77c3e1c7fee5c
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
consolefont: add after modules to dependencies
X-Gentoo-Bug: 559540
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=559540
commit ee944553a9ea35622046bd1ab5657fd416a7019a
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
bootmisc: optionally save the previous dmesg log
X-Gentoo-Bug: 561204
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561204
commit 6cae41a4e63510cdcf3af1153d6e8300435e1838
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
etc/rc.conf: Clean up documentation for rc_hotplug
X-Gentoo-Bug: 554540
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=554540
commit 960881fcfe974178c0846a816663a258cdd488cc
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Add net-online service
commit d26013494db8ea8699db9815ef4c4b0eb2f55e7f
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
mtab: typo fix
commit b29b2fb3cb3e73b4453483ced908f0ef10e47e9c
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
mtab: make /etc/mtab as a file configurable
commit 7da72ce487a8d92d992e7fd3db881c198ae02609
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
openrc-run.sh: fix new required_* tests to exit properly
commit fc777aeaf3e6e2d47f4599acfe6c8d1bf5bc760a
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
typo fix
X-Gentoo-Bug: 563010
X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=563010
commit 9d53d436ae22d6f0f6fc1537e836dd1b4d31cf35
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
sysfs: consolidate cgroup processing code in a single function
commit b81317bdf8e3eed8b8ff2bef757ba29f362ed297
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
mountinfo: make sure the netdev variable is initialized on Linux
This fixes the following regression:
X-Gentoo-Bug: 562668
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562668
commit 29f7e335927d4c1fb151124de8cdf01fb87723fa
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
openrc-run.sh: allow spaces in required_{files,dirs}
X-Gentoo-Bug: 562320
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562320
commit 850ca030777cb0c3e2fb03d9ab1f0ccee7b89e93
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
increment version number
commit 050ddfae4ad1ad0dc5993766e0bd90739bd41de9
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Update ChangeLog
commit d5116cc697c9eb275ab8497939ab41504e5ce578
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
localmount: white space cleanup
commit b86d170037197d7bdcda57c7d4c09c17bda97f31
Author: Ian Stakenvicius <axs@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
localmount: clean up handling of aufs branches
X-Gentoo-Bug: 560008
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=560008
commit 6fa0d6318bcd5c98548cff2ff840bca116892ca5
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
mtab: fix update logic
This advises users to remove mtab from their runlevels if /etc/mtab is a
symlink, and it creates the symlink if /etc/mtab does not exist on a
system.
X-Gentoo-Bug: 560060
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=560060
commit 80d3928b0d13f09a9c1e82bd27c9fff943d84d43
Author: Austin S. Hemmelgarn <ahferroin7@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
cgroups: Add the hugetlb, net_cls and pids controllers
Note from WilliamH: I slightly rearranged the code and added the
settings in rc.conf.
X-Gentoo-Bug: 555488
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=555488
commit 17ef205bc63a4e231dccee719394a7a8563f8c3f
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
sysfs: use printf instead of echo to write to cgroup files
This is needed for compatibility with musl and printf is also posix.
X-Gentoo-Bug: 562334
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562334
commit b20a1951adf9a705a903fb3047b7ef26c013103c
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
rc-cgroup.sh: Do not add leading spaces to cgroup values
We were starting the value we write to the cgroup setting file with
leading spaces and this was causing issues. This change makes sure that
we aren't adding leading spaces to the value.
X-Gentoo-Bug: 562354
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562354

View File

@@ -1,3 +1,3 @@
NAME= openrc
VERSION= 0.22.2
VERSION= 0.22.4
PKG= ${NAME}-${VERSION}

View File

@@ -1,6 +1,6 @@
# The interfaces setting controls which interfaces the net-online
# service considers in deciding whether the network is active. By
# default, it is all ethernet or wireless LAN interfaces.
# service considers in deciding whether the network is active. The
# default is all interfaces that support ethernet.
#interfaces=""
# This setting controls whether a ping to the default gateway is

View File

@@ -21,12 +21,10 @@ start()
if [ "$RC_UNAME" = Linux ]; then
ebegin "Bringing up network interface lo"
if command -v ip > /dev/null 2>&1; then
ip addr add 127.0.0.1/8 dev lo brd + scope host
ip route add 127.0.0.0/8 dev lo scope host
ip addr add 127.0.0.1/8 dev lo brd +
ip link set lo up
else
ifconfig lo 127.0.0.1 netmask 255.0.0.0
route add -net 127.0.0.0 netmask 255.0.0.0 gw 127.0.0.1
fi
else
ebegin "Bringing up network interface lo0"

View File

@@ -34,6 +34,9 @@ start()
local m="/dev|/dev/.*|/proc|/proc.*|/sys|/sys/.*|/run|${rc_svcdir}" x= fs=
m="$m|/bin|/sbin|/lib(32|64)?|/libexec"
if [ -e "$rc_svcdir"/usr_premounted ]; then
m="$m|/usr"
fi
# RC_NO_UMOUNTS is an env var that can be set by plugins
local IFS="$IFS:"
for x in $no_umounts $RC_NO_UMOUNTS; do

View File

@@ -42,8 +42,8 @@ get_default_gateway()
start ()
{
local carriers configured dev gateway ifcount infinite interfaces
local rc state timeout x
local carriers configured dev gateway ifcount infinite
local rc state x
ebegin "Checking to see if the network is online"
rc=0

View File

@@ -36,7 +36,7 @@ int main(int argc, char **argv)
bool ok = false;
char *service;
char *exec;
int idx;
int idx = 0;
RC_SERVICE state, bit;
applet = basename_c(argv[0]);

View File

@@ -228,6 +228,7 @@ svc_lock(const char *applet)
if (fd == -1)
return -1;
if (flock(fd, LOCK_EX | LOCK_NB) == -1) {
eerror("Call to flock failed: %s", strerror(errno));
close(fd);
return -1;
}

View File

@@ -334,7 +334,19 @@ void selinux_setup(char **argv)
/* extract the type from the context */
curr_con = context_new(curr_context);
curr_t = xstrdup(context_type_get(curr_con));
if (!curr_con) {
free(curr_context);
goto out;
}
curr_t = context_type_get(curr_con);
if (!curr_t) {
context_free(curr_con);
free(curr_context);
goto out;
}
curr_t = xstrdup(curr_t);
/* dont need them anymore so free() now */
context_free(curr_con);
free(curr_context);

View File

@@ -683,6 +683,8 @@ do_start_services(const RC_STRINGLIST *start_services, bool parallel)
}
pid = service_start(service->value);
if (pid == -1)
break;
/* Remember the pid if we're running in parallel */
if (pid > 0) {
add_pid(pid);