Commit Graph

2874 Commits

Author SHA1 Message Date
William Hubbs
e860b7cb4f Revert "sysfs: fix permissions on cgroup mounts"
This reverts commit 7a25491ced.
This was broken; I need to look further into it.
2014-09-16 17:44:30 -05:00
William Hubbs
7a25491ced sysfs: fix permissions on cgroup mounts 2014-09-16 15:14:12 -05:00
Roy Marples
50658449bd Use exception-based approach for cgroup/ulimit setup
Note from William Hubbs:
I spoke with Roy about this, and he pointed out that user-defined
functions may need the limits applied, so it is better to go with a
method that uses exceptions to determine which functions apply the
limits.

X-Gentoo-Bug: 522408
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=522408
2014-09-11 13:26:58 -05:00
William Hubbs
de60ffeebe runscript: move verbose mode setting near debug setting 2014-09-11 12:02:51 -05:00
Joe M
d032b17897 savecache: check permissions on the correct directory 2014-08-29 09:10:58 -05:00
Andrew Gregory
d4204a97a2 tmpfiles.sh: add support for C action
Recursively copies files or directories.  Added by systemd in 849958d1.
2014-08-27 17:49:00 -05:00
Andrew Gregory
6f3f50d453 tmpfiles.sh: add support for + modifier
systemd added support for b+, c+, p+, and L+ in 2e78fa79 and 1554afae to
remove the target path if it already exists.
2014-08-27 17:48:34 -05:00
William Hubbs
4f4f00d612 cgroups: fix cgroup subsystem mounting
Originally, we aborted all of the cgroup setup if /sys/fs/cgroup/openrc
was already mounted. This  caused an issue in lxc containers, so we
should always allow the subsystems to be mounted.

X-Gentoo-Bug: 520606
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=520606
2014-08-22 14:01:20 -05:00
William Hubbs
7b9fe5fced start work on 0.14 2014-08-17 16:06:32 -05:00
William Hubbs
c60ef5c381 mtab: add verbose level deprecation warnings 2014-08-17 11:23:52 -05:00
William Hubbs
bee3f8463c README: Clarify devfs changes
I was informed that the previous explanation of the devfs changes could
be interpreted to mean that we mount a second /dev on top of the one
that was mounted by the kernel or initramfs. This change makes it clear
that is not the case.
2014-08-17 00:11:14 -05:00
William Hubbs
72b7b32502 README: add notes about devfs changes 2014-08-16 17:16:20 -05:00
William Hubbs
645f7b6947 adjust deprecation schedule for mtab
- Quiet the deprecation messages forr now
- update the feature removal schedule to reflect that it will be removed
  in 2.0.
2014-08-16 15:07:48 -05:00
William Hubbs
1b26d547a5 Deprecate the mtab service script
The mtab service script is no longer needed on modern Linux systems, so
we can remove it in 1.0. However, we need to set a deprecation notice
first.
2014-08-14 13:50:48 -05:00
William Hubbs
c8018d04a7 tmpfiles: fix relabel to run restorecon before chown and chmod 2014-08-13 15:26:37 -05:00
Jason Zaman
6f080e9c1a tmpfiles: Move relabelling before any other calls for device nodes
Device nodes are normally never device_t so this type does not
have many permissions. After the mknod, the device should have
its label corrected before any other operations (like chmod).
2014-08-13 10:02:20 -05:00
William Hubbs
2c265e13c6 README: expand information about rc and runscript deprecation 2014-08-11 13:17:33 -05:00
William Hubbs
24d82d9ff1 rc.conf: document rc_verbose 2014-08-11 12:57:23 -05:00
William Hubbs
d1e71b07af Show rc and runscript deprecation warnings in verbose mode
These messages are being changed for this release to show in verbose
mode because of the number of times they display.
2014-08-11 12:32:44 -05:00
William Hubbs
7b744befac bootmisc: do not run the clean_run function in an LXC container 2014-08-10 17:15:05 -05:00
William Hubbs
faaaab4bf5 hwclock: fix comments about the usage of clock_hctosys
The clock_hctosys variable should be set to YES if you are not using NTP to
synchronize your system time; it doesn't have anything to do with the
kernel configuration.
2014-08-10 13:00:39 -05:00
William Hubbs
d29db70efb sysctl.linux.in: use the --system option
According to the sysctl man page, the --system option causes sysctl to
process all system configuration files, which include the following:

/run/sysctl.d/*.conf
/etc/sysctl.d/*.conf
/usr/local/lib/sysctl.d/*.conf
/usr/lib/sysctl.d/*.conf
/lib/sysctl.d/*.conf
/etc/sysctl.conf

X-Gentoo-Bug: 484796
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=484796
2014-08-09 12:35:04 -05:00
William Hubbs
6a337ff6c5 devfs: several small clarifications
- Rename the static_dev switch in conf.d/devfs to skip_mount_dev since
  this is a better description of what the switch does.

- Clarify the error messages in the devfs service script based on the
  new name of the switch.
2014-08-08 14:49:00 -05:00
Jason Zaman
647e08eb91 tmpfiles.sh: do not use install
install is in /usr which causes problems if /usr is not mounted.
Instead, checkpath and "mkdir -p" can do everything required and are
both available before /usr is mounted.
Since checkpath also handles selinux labels correctly,
_restorecon after is not required.

X-Gentoo-Bug: 503408
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=503408
2014-08-07 12:54:04 -05:00
William Hubbs
2624a8c8a7 checkpath: apply ownership to all paths given on command line
The stat structure was not being initialized correctly in do_check. This
was causing the owner adjustment to be skipped if the first path had the
correct owner.

Also, the "correcting owner" message should always be printed when the
owner is being changed.

X-Gentoo-Bug: 518042
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=518042
2014-07-28 10:41:24 -05:00
William Hubbs
275714bdc7 checkpath: style fix 2014-07-25 11:04:57 -05:00
William Hubbs
e3bfb68aec hwclock: always set the kernel's timezone
The hwclock service should set the time zone regardless of the setting
of the clock_hctosys variable. This needs to be done to prevent issues
when the system time is being synchronized using ntp.

X-Gentoo-Bug: 434410
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=434410
2014-07-24 17:40:14 -05:00
William Hubbs
1f7582c78b src/librc/librc-daemon.c: style fix 2014-07-19 13:03:00 -05:00
William Hubbs
cc1bc6a4ce src/rc/Makefile: typo fix 2014-07-19 12:59:35 -05:00
William Hubbs
40f42ced21 rc-status: fix infinite loop when using stacked runlevels
Remove the recursive call in print_stacked_services which was causing an
infinite loop when using stacked runlevels.
I would like to thank Doug Freed and Jason Zaman for assisting with
tracking this down.

X-Gentoo-Bug: 514972
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=514972
2014-07-17 23:10:28 -05:00
Jason Zaman
1a1d53335b devfs: fix restorecon ebegin message to match sys
X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16 18:22:33 -05:00
Jason Zaman
99939b9839 sysfs: restorecon after mounting /sys
X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16 18:21:59 -05:00
Jason Zaman
89907b60ba move the selinux_setup function into rc-selinux
X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16 17:59:25 -05:00
William Hubbs
a94a9740d5 checkpath: style fixes 2014-07-16 15:03:11 -05:00
William Hubbs
8b8edc2970 style fixes 2014-07-16 14:48:03 -05:00
William Hubbs
010c2ab18b Rename SELinux source files
The name rc-selinux-util.* is a bit long, so I renamed the source files
to rc-selinux.*

X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16 14:14:37 -05:00
Jason Zaman
9c689542c3 checkpath: restore the SELinux context
X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16 13:09:38 -05:00
Jason Zaman
525d7140b1 devfs: fix SELinux contexts
SELinux contexts in /dev need to be fixed after it is mounted

X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16 11:58:11 -05:00
Jason Zaman
4f784bd469 tmpfiles: set the proper SELinux context
Restore the label on the created file / dir based on the policy
fcontexts.

X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16 10:53:25 -05:00
William Hubbs
4a1afa694c Add SELinux support to the build system
X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-15 11:38:19 -05:00
William Hubbs
25c229cf83 sysfs.in: fix indentation 2014-07-14 15:58:50 -05:00
William Hubbs
71d6d61b28 checkpath: fix logic for the writable option
The -W option does not need an argument of its own; it can take the
first path after all other options are processed on the command line.

Also, move the processing for the -W option out of the switch so it will
be in the same loop as the other processing.
2014-07-13 14:12:36 -05:00
William Hubbs
40141244e3 man/openrc-run.8: more updates and clarifications for checkpath
X-Gentoo-Bug: 500606
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=500606
2014-07-13 11:23:43 -05:00
Alexander V Vershilov
d59737afb1 man/openrc.8: update checkpath documentation
X-GENTOO-BUG: 500606
X-GENTOO-BUG-URL: https://bugs.gentoo.org/show_bug.cgi?id=500606
2014-07-13 08:50:36 -05:00
Alexander V Vershilov
f66f41c4f0 typo fix 2014-07-11 16:36:35 -05:00
William Hubbs
d80482c2f4 checkpath: fix error message in previous commit 2014-07-11 15:23:38 -05:00
William Hubbs
d0040aff0a checkpath: report an error if required options were not specified
Before this commit, not specifying -d, -f, -p or -W in a checkpath
command meant the command exited successfully but actually did nothing.

This is an error condition, so report it as such.
2014-07-11 15:04:06 -05:00
William Hubbs
75e06d8558 Style Fixes 2014-07-10 10:57:56 -05:00
Alexander V Vershilov
1a44be0f16 cgroups: only run cgroup setup when starting a service
Status call should not set limits as it requires root permissions,
also this is not safe, as current process may reach limitation.

Solution is to set limits and move process to service cgroup only
on start.

X-GENTOO-BUG: 500364
X-GENTOO-BUG-URL: https://bugs.gentoo.org/show_bug.cgi?id=500364
2014-07-10 10:56:37 -05:00
William Hubbs
f265ddde97 FEATURE_REMOVAL_SCHEDULE: add entry for local_start/stop 2014-07-10 09:04:04 -05:00