You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kevin Darbyshire-Bryant 7765e442d0 basefiles: allow suid coredumps
Set sysctl fs.suid_dumpable = 2

This allows suid processes to dump core according to kernel.core_pattern
setting.  LEDE typically uses suid to drop root priviledge rather than
gain it but without this setting any suid process would be unable to
produce coredumps (e.g. dnsmasq)

Processes still need to set a non zero core file process limit ('ulimit
-c unlimited' or if procd used 'procd_set_param limits
core="unlimited"') in order to produce a core.  This setting removes an
obscure stumbling block along the way.

>From https://www.kernel.org/doc/Documentation/sysctl/fs.txt

suid_dumpable:

This value can be used to query and set the core dump mode for setuid
or otherwise protected/tainted binaries. The modes are

0 - (default) - traditional behaviour. Any process which has changed
	privilege levels or is execute only will not be dumped.
1 - (debug) - all processes dump core when possible. The core dump is
	owned by the current user and no security is applied. This is
	intended for system debugging situations only. Ptrace is unchecked.
	This is insecure as it allows regular users to examine the memory
	contents of privileged processes.
2 - (suidsafe) - any binary which normally would not be dumped is dumped
	anyway, but only if the "core_pattern" kernel sysctl is set to
	either a pipe handler or a fully qualified path. (For more details
	on this limitation, see CVE-2006-2451.) This mode is appropriate
	when administrators are attempting to debug problems in a normal
	environment, and either have a core dump pipe handler that knows
	to treat privileged core dumps with care, or specific directory
	defined for catching core dumps. If a core dump happens without
	a pipe handler or fully qualifid path, a message will be emitted
	to syslog warning about the lack of a correct setting.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
7 years ago
..
board.d base-files: remove default /etc/config/network, generate it via board.d instead 9 years ago
hotplug.d/net sysctl: read settings from /etc/sysctl.d/*.conf 9 years ago
init.d base-files, mac80211, broadcom-wl: wifi detection and configuration 8 years ago
iproute2 base-files: add /etc/iproute2/rt_protos 8 years ago
rc.button base-files: Ensure reset only works if an overlay exists 8 years ago
sysctl.d sysctl: read settings from /etc/sysctl.d/*.conf 9 years ago
uci-defaults base-files: fix user creation on sysupgrade with few opkg control files 7 years ago
banner build: adjust version number handling 8 years ago
banner.failsafe failsafe-mode: print short help on commandline 10 years ago
device_info base-files: add URL option for OEM manufacturer info 9 years ago
diag.sh base-files: make diag.sh stub working in bash 15 years ago
fstab base-files: remove fstab symlink 8 years ago
group base-files: add "tty" user group 7 years ago
hosts base-files: add /etc/hosts entries for ::1, ff02::1 and ff02::2 9 years ago
inittab image / basefiles: make console password configurable 8 years ago
openwrt_release base-files: add ARCH_PACKAGES to openwrt_release and os-release 8 years ago
openwrt_version build: adjust version number handling 8 years ago
os-release base-files: Add standard os-release file 8 years ago
passwd base-files: prime root password with "x" to notify programs that there is a shadow record, fix /bin/login.sh password detection accordingly. Solves broken key based dropbear login with empty password after r28935. 13 years ago
preinit preinit: use only the image config options 8 years ago
profile base-files: fix message of initscript wrapper 8 years ago
protocols base-files: add DCCP to /etc/protocols 9 years ago
rc.common base-files: fix default procd reload 7 years ago
rc.local base-files: introduce a ready-to-use /etc/rc.local to let users run custom commands on init without creating custom init scripts 15 years ago
services base-files: add submission service port 7 years ago
shadow the root password should be empty for real, like before 10 years ago
shells rename default/ to files/ 18 years ago
sysctl.conf basefiles: allow suid coredumps 7 years ago
sysupgrade.conf base-files: - add sysupgrade support for keepfile hints * introduces /lib/upgrade/keep.d/ for per-package keepfile lists * introduces /etc/sysupgrade.conf for user defined keepfile hints - prime /lib/upgrade/keep.d/base-files-essential to keep sysupgrade usable for images without opkg - change sysupgrade to build the keepfile list from /lib/upgrade/keep.d/, /etc/sysupgrade.conf and opkg list-changed-conffiles 14 years ago