aboutsummaryrefslogtreecommitdiff
path: root/libexec
Commit message (Collapse)AuthorAgeFilesLines
* MFC: rc.d/rctl: unbreak for distinct /usr filesystemEugene Grosbein2021-11-221-0/+1
| | | | | | | | | | | Both rctl and used xargs utility live in /usr/bin so add REQUIRE: FILESYSTEMS Approved by: re (gjb) Reported by: Peter <pmc@citylink.dinoex.sub.org> (cherry picked from commit 0c54fe172ad365e7e60d6249484a7579c18b7d2d) (cherry picked from commit 92b40444d07aeef2bf4b20109f3f90ac343b90df)
* bootp: remove the USE_BFUNCS knobKyle Evans2021-10-0610-79/+3
| | | | | | | | We'd likely be better served by converting these to the equivalent mem* calls, but just kill the knob for now. The b* macros being defined get in the way of _FORTIFY_SOURCE. (cherry picked from commit cfb9be506285cd65120f9686d532130a3757ce56)
* Revert the changes that removed support for old gcc, as stable/12 stillDimitry Andric2021-09-032-0/+7
| | | | | | | | | | | | uses gcc 4.2.1 for mips, powerpc and sparc64. Revert "Revert part of r360964" This reverts commit 2ebf10e7a1ced5d3dc4059d0595743277464d915. Revert "Remove tests for obsolete compilers in the build system" This reverts commit a606cb388f975561c37dbabc2fee82c27ef09929.
* Remove tests for obsolete compilers in the build systemEric van Gyzen2021-09-022-7/+0
| | | | | | | | | | | | Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions for older compilers. Reviewed by: imp (earlier version), emaste, jhb Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24802 (cherry picked from commit fac6dee9eb58b2b558fec2aea749460ca623f6d6)
* Revert "Do a sweep and remove most WARNS=6 settings"Dimitry Andric2021-08-295-0/+5
| | | | | | | | | This reverts commit befc47822966, as it caused various CI build errors, and we never merged the prerequisite commit fe815331bb40 ("build: provide a default WARNS for all in-tree builds"). The latter is rather intrusive, so I will avoid it. Direct commit to stable/12 since the CI bots are broken.
* Do a sweep and remove most WARNS=6 settingsKyle Evans2021-08-295-5/+0
| | | | | | | | | | | | | | Repeating the default WARNS here makes it slightly more difficult to experiment with default WARNS changes, e.g. if we did something absolutely bananas and introduced a WARNS=7 and wanted to try lifting the default to that. Drop most of them; there is one in the blake2 kernel module, but I suspect it should be dropped -- the default WARNS in the rest of the build doesn't currently apply to kernel modules, and I haven't put too much thought into whether it makes sense to make it so. (cherry picked from commit 7cc42f6d25ef2e19059d088fa7d4853fe9afefb5)
* Enable rc.d/jail within jailsDan Langille2021-08-291-1/+1
| | | | | | | | Jails with jails is a supported. This change allows the script to run upon startup with a jail. Without this, jails are not automatically started within jails. (cherry picked from commit 35cf9fecbd80f56e39524f480240acfd953c93e1)
* ftpd: delete dead codeAlan Somers2021-08-222-52/+0
| | | | | | | | | | | Delete code killed by SVN r13139 in 1996. Little chance that it would still compile today. PR: 257317 Reported by: Alan Shearer <sakison@gmail.com> Sponsored by: Axcient (cherry picked from commit 674400eb20b65369a88b1cb778d729bc297832c9)
* devmatch: don't announce autoloading so muchWarner Losh2021-07-161-2/+2
| | | | | | | | | | | | | | devmatch rc script would announce it was loading a module multiple times. It used kldload -n so it really wasn't loading it that many times, but the message is confusing. Use kldstat to see if we need to load the module before saying we do. This fixes the vast majority of the problems. It may be possible to race devmatch with a user invocation and devd, though quite hard. In that case we'll announce things twice, but still only load it once. No attempt is made to fix this. PR: 232782 MFC After: 2 weeks Sponsored by: Netflix
* devmatch: Be tolerant of .ko being present.Warner Losh2021-07-161-10/+15
| | | | | | | | | | | We document that we did not need .ko on the module names in devmatch_blocklist, but we really needed them. Keep the documentation the same, but strip the .ko when we need to use the names so you can specify either. PR: 256240 MFC After: 2 weeks Sponsored by: Netflix
* devmatch: defer until after kldHelge Oldach2021-07-161-1/+1
| | | | | | | | | | | | devmatch loads a number of things automatically. Allow the list of things to load to happen first in case those drivers affect what would be loaded. Normally, this will produce the same results, but there's some special cases that may not when drivers are loaded that report other drivers missing, like virtio_pci. PR: 253287 Reviewed by: imp MFC After: 2 weeks
* devmatch: improve naming of devmatch config variableCeri Davies2021-07-162-3/+3
| | | | | | | | Accept the old rc.conf variable if the new one is not present for compatability. Approved by: imp Differential Revision: https://reviews.freebsd.org/D30806
* rc.d: connect sysctl_lastloadEugene Grosbein2021-07-161-0/+1
| | | | | | Add recently added sysctl_lastload. (cherry picked from commit 20eb969793921dce9e524d19fc02b84cabd98f74)
* ipfw: reload sysctl.conf variables if neededEugene Grosbein2021-07-161-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently ipfw has multiple components that are not parts of GENERIC kernel like dummynet etc. They can bring in important sysctls if enabled with rc.conf(5) and loaded with ipfw startup script by means of "required_modules" after initial consult with /etc/sysctl.conf at boot time. Here is an example of one increasing limit for dummynet hold queues that defaults to 100: net.inet.ip.dummynet.pipe_slot_limit=1000 This makes it possible to use ipfw/dummynet rules such as: ipfw pipe 1 config bw 50Mbit/s queue 1000 Such rule is rejected unless above sysctl is applied. Another example is a group of net.inet.ip.alias.* sysctls created after libalias.ko loaded as dependency of ipfw_nat. This is not a problem if corresponding code compiled in custom kernel so sysctls exist when sysctl.conf is read early or kernel modules loaded with a loader. This change makes it work also for GENERIC and modules loaded by means of rc.conf(5) settings. (cherry picked from commit f5b5de1a3210234f3a6864c88a2d3e11ac2dbf04)
* rc.d: unbreak sysctl lastloadEugene Grosbein2021-07-162-5/+19
| | | | | | | | | | | | | | /etc/rc.d/securelevel is supposed to run /etc/rc.d/sysctl lastload late at boot time to apply /etc/sysctl.conf settings that fail to apply early. However, this does not work in default configuration because of kern_securelevel_enable="NO" by default. Add new script /etc/rc.d/sysctl_lastload that starts unconditionally. Reported by: Marek Zarychta MFC after: 1 month (cherry picked from commit f4b38c360e63a6e66245efedbd6c070f9c0aee55)
* rc.d: liberate powerd from ACPI dependencyAndriy Gapon2021-06-161-4/+1
| | | | | | | For instance, many non-ACPI ARM systems have CPU power / frequency levels. (cherry picked from commit 20eb6bd8c598fdbf4e96ed4ca64a609be255ccba)
* service/ipfw: Silence warning on restartLutz Donnerhacke2021-05-171-2/+8
| | | | | | | | | | | | | Once the ipfw0 interface has been created, ifconfig(8) create will throw a warning: "ifconfig: create: bad value" when trying to create it again. PR: 241013 Submitted by: Jose Luis Duran Approved by: kp Differential Revision: https://reviews.freebsd.org/D30083 (cherry picked from commit 5c4fe2ac81a5e05062266d684fb53b9faefd0d38)
* (t)ftp-proxy: use libpfctlKristof Provost2021-05-071-0/+3
| | | | | | | | | Reviewed by: glebius MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29641 (cherry picked from commit 95be9288f01f30a50440ea56d11468a2c6e18fed)
* mountd(8): generate a syslog message when the "V4:" line is missingRick Macklem2021-03-271-0/+3
| | | | | | | | | | | | | | | | | | | Daniel reported that NFSv4 mounts were not working despite having set "nfsv4_server_enable=YES" in /etc/rc.conf. Mountd was logging a message that there was no /etc/exports file. He noted that creating a /etc/exports file with a "V4:" line in it was needed make NFSv4 mounts work. At least one "V4:" line in one of the exports(5) file(s) is needed to make NFSv4 mounts work. This patch fixes mountd.c so that it logs a message indicting that there is no "V4:" line in any exports(5) file when NFSv4 mounts are enabled. To avoid this message being generated erroneously, /etc/rc.d/mountd is updated to make sure vfs.nfsd.server_max_nfsvers is properly set before mountd(8) is started. PR: 253901 (cherry picked from commit 09673fc0f36dd1cca74940a240a9ed0f62228084)
* rtld: Fix null-pointer dereferenceDavid Chisnall2021-02-091-2/+4
| | | | (cherry picked from commit 43d44842aef3972cc86ce673e84e31f372257b15)
* stand: lua: enhance lfs.dir() to speed up kernels_autodetectKyle Evans2021-02-031-1/+27
| | | | | | | | | | | | | | This eliminates a lot of stat() calls that happen when lualoader renders the menu with the default settings, and greatly speeds up rendering on my laptop. ftype is nil if loader/loader.efi hasn't been updated yet, falling back to lfs.attributes() to test. This is technically incompatible with lfs, but not in a particularly terrible way. (cherry picked from commit e25ee296c919d6567aa76058a7049eac974797fb)
* flua: implement chmodEd Maste2021-01-243-0/+40
| | | | | | Lua does not provide a native way to change the permission of a file. (cherry picked from commit 405e3338ac841999673056a2b5537b4c0ad677db)
* flua: don't allow dlopen, et al., for bootstrap fluaKyle Evans2021-01-241-2/+1
| | | | | | | | | | | | | | | | There are some logistics issues that need to be sorted out here before we can actually allow this to work. It's not really safe to allow LUA_USE_DLOPEN with host lib paths being used. The host system could have an entirely different lua version and this could cause us to crash and burn. If we want to revive this later, we need to make sure to define c module paths inside OBJDIR that are compiled against whatever version we've bootstrapped. (cherry picked from commit c2a2b4f3cf11e770892a524df637f671f5989719) (cherry picked from commit 967fbfd9e2b7a015d5cba1491badcdf9044b28b9)
* flua: support "require" for binary objects in the base systemEd Maste2021-01-241-0/+2
| | | | | | Export symbols from flua, and enable dlopen. (cherry picked from commit 3bd8419597b44dc3da2b1e6ffc2c7ee9cf4aa195)
* rtld: map without PROT_EXEC for relocationEd Maste2021-01-191-1/+2
| | | | | | | | | | This makes text segment relocation work under W^X. Submitted by: Greg V <greg@unrelenting.technology> (original version) Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D27953 (cherry picked from commit 613a08cfa2e0fb1b99906961c7a676d527e17f05)
* rtld: call close(2) after errno is savedKonstantin Belousov2021-01-091-6/+11
| | | | (cherry picked from commit 741d78126b5584e860811c78f87f51597e375592)
* tftpd: tests: raise targeted cstd to c11Kyle Evans2020-12-291-0/+1
| | | | | | | | | r358556 added alignas() use to the functional tests, which isn't defined until C11. Raise the -std to C11 to fix the build under freebsd-gcc{6,9}. Reported by: mhorne, Jenkins/CI (cherry picked from commit 924e10b809a9fcbc8688c1b5848f60b48e6103fe)
* Fix the ipfw service status output when ipfw.ko isn't loadedMark Johnston2020-12-261-1/+3
| | | | (cherry picked from commit 5120612664fbc54d69ee1a21d0abcbab58712709)
* MFC r343672 (by vangyzen):Ryan Libby2020-12-191-0/+4
| | | | | | | | | rtld: pacify -Wmaybe-uninitialized from gcc6 Sponsored by: Dell EMC Isilon Notes: svn path=/stable/12/; revision=368781
* MFC r368394:Michael Tuexen2020-12-182-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | When dropping packets (RRQ or WRQ) for debugging, report the send operation as successful. Reporting a failure stops the transfer instead of using timeouts. MFC r368521: Fix the TFTP client when performing a RRQ for files smaller than 512 bytes and the server not sending an OACK: * Close the file. * Report the correct the number of received blocks. MFC r368647: Improve the counting of blocks used to transfer a file from the server to the client in case of not using an OACK: Don't miss the first block in case of it is not also the last one. MFC r368657: When receiving a file having a length, which is a mulitple of the blocksize, close the file once it is received. Notes: svn path=/stable/12/; revision=368755
* MFC r368260:Konstantin Belousov2020-12-081-0/+2
| | | | | | | | rtld: bump r_debug.r_version to 1 from current 0. Add r_ldbase. Notes: svn path=/stable/12/; revision=368427
* Revert r366857.Cy Schubert2020-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | r366857 created a number of problems, tearing down interfaces too early in shutdown. This resulted in: - hung ssh sessions when shutting down or rebooting remotely using shutdown (I've used exec shutdown, for years, as apposed to simply shutdown). - NFS mounted filesystems "disappear" prior to unmount. - dhclient attached to a VLAN on an interface who's parent interface has already shut down prints errors. The path forward is to teach lagg(4) and vlan(4) about WOL. PR: 251531, 251540 PR: 158734, 109980 are broken again Reported by: jhb, emaste, jtl, Helge Oldach<freebsd_oldach.net> Martin Birgmeier <d8zNeCFG_aon.at> Discussion at: https://reviews.freebsd.org/D27459 Notes: svn path=/stable/12/; revision=368346
* Fix startup of gssd when /usr is a separately mounted local file system.Rick Macklem2020-11-291-1/+1
| | | | | | | | | | | | | | | | | | | meowthink@gmail.com reported that the gssd daemon was not starting, because /etc/rc.d/gssd was executed before his local /usr file system was mounted. He fixed the problem by adding mountcritlocal to the REQUIRED line. This fix seems safe and works for a separately mounted /usr file system on a local disk. The case of a separately mounted remote /usr file system (such as NFS) is still broken, but there is no obvious solution for that. Adding mountcritremote would fix the problem, but it would cause a POLA violation, because all kerberized NFS mounts in /etc/fstab would need the "late" option specified to work. Notes: svn path=/stable/12/; revision=368166
* MFC: r367423Rick Macklem2020-11-293-6/+30
| | | | | | | | | | | | | | | | | | Add support for the new mountd -R option. r376026 added a new "-R" option to mountd, which tells it to not support the Mount protocol (not used by NFSv4) and not register with rpcbind. Rpcbind is considered a security issue by some sites now. This patch adds a new yes/no variable called nfsv4_server_only. When that is set, make vfs.nfsd.server_min_vers=4 and set "=R" for mountd. Setting vfs.nfsd.server_min_vers=4 tells nfsd to not register with rpcbind. While here, add a check for "load_kld nfsd" failing to nfsd. Notes: svn path=/stable/12/; revision=368165
* MFC r351863:Mateusz Piotrowski2020-11-101-0/+3
| | | | | | | | | | | | | | | | | | | rc: Honor ${name}_env when a custom *_cmd is defined (e.g., start_cmd) A user may set ${name}_env variable in rc.conf(5) in order to set additional environment variables for a service command. Unfortunately, at the moment this variable is only honored when the command is specified via the command variable. Those additional environment variables coming from ${name}_env are never set if the service is started via the ${rc_arg}_cmd variable (for example start_cmd). PR: 239692 Reviewed by: bcr, jilles Approved by: src (jilles) Requested by: koobs Notes: svn path=/stable/12/; revision=367550
* MFC r367291:Mateusz Piotrowski2020-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rc.d/zfs: Add shutdown to KEYWORDS The problem is that without walling /etc/rc.d/zfs on shutdown, resources associated with ZFS mounts are not freed and the jails will remain in dying state. In addition, the dataset is now in a dangling state, as the jail it is attached to is dying. A known workaround for jails was to add the following lines to /etc/jail.conf, to make sure that "service zfs stop" is run when the jail is stopped: exec.stop = "/bin/sh /etc/rc.shutdown"; exec.stop += "/usr/sbin/service zfs stop || /usr/bin/true"; While the workaround seems to be okay-ish for the jail situation, it is still unclean. However, for physical hosts this may wreak havoc with the pool if shared spares are used, as "zfs unshare" is never invoked on shutdown. PR: 147444 Submitted by: Markus Stoff <markus__stoffdv_at> Reported by: Mykah <mburkhardt__exavault_com> Reviewed by: cy Approved by: cy (src) Relnotes: yes Notes: svn path=/stable/12/; revision=367546
* MFC 358556,360167: Add support for the TFTP windowsize option.John Baldwin2020-11-039-49/+442
| | | | | | | | | | | | | | | 358556: Add support for the TFTP windowsize option described in RFC 7440. The windowsize option permits multiple blocks to be transmitted before the receiver sends an ACK improving throughput for larger files. 360167: Abort transfer if fseeko() fails. Notes: svn path=/stable/12/; revision=367305
* MFC r360463,r360469:Michal Meloun2020-10-311-0/+1
| | | | | | | | | | | | | r360463: Don't allow to use FPU inside of rtld library. Clang10 may use FPU instructions for optimizing operations with memory blocks. But we don't want to do lengthy save/restore of all FPU registers across each rtld_start() call. r360469: Move ARM specific flags to arm/Makefile.inc Notes: svn path=/stable/12/; revision=367212
* MFC r366857:Cy Schubert2020-10-261-1/+1
| | | | | | | | | | | | | | | Destroy cloned interfaces at netif stop, netif restart and shutdown. This is especially important during shutdown because a child interface of lagg with WOL enabled will not enable WOL at interface shutdown and thus no WOL to wake up the device (and machine). PR: 158734, 109980 Reported by: Antonio Huete Jimenez <tuxillo at quantumachine.net> Marat N.Afanasyev <marat at zealot.ksu.ru> reviewed by: kp Notes: svn path=/stable/12/; revision=367049
* MFC r366003:Mark Johnston2020-09-291-1/+2
| | | | | | | ftpd: Add missing braces around a statfd check Notes: svn path=/stable/12/; revision=366240
* MFC r366002:Mark Johnston2020-09-291-1/+4
| | | | | | | tftpd: Check for errors from chdir() Notes: svn path=/stable/12/; revision=366239
* MFC r365631: Only set WARNS if not definedKyle Evans2020-09-162-2/+2
| | | | | | | | | | | This would allow interested parties to do experimental runs with an environment set appropriately to raise all the warnings throughout the build; e.g. env WARNS=6 NO_WERROR=yes buildworld. Not currently touching the numerous instances in ^/tools. Notes: svn path=/stable/12/; revision=365821
* MFC r365771:Mark Johnston2020-09-151-4/+11
| | | | | | | | | | ftpd: Exit during authentication if an error occurs after chroot(). admbug: 969 Security: CVE-2020-7468 Notes: svn path=/stable/12/; revision=365772
* MFC r365432:Konstantin Belousov2020-09-141-1/+1
| | | | | | | | | rtld: pass argc/argv/env to dso inits. PR: 249162 Notes: svn path=/stable/12/; revision=365714
* MFC r365369:Konstantin Belousov2020-09-121-5/+2
| | | | | | | | | rtld: do not refuse to relocate objects without dynamic symtabs. PR: 249121 Notes: svn path=/stable/12/; revision=365654
* MFC r365368:Konstantin Belousov2020-09-121-1/+4
| | | | | | | | | rtld: do not process absent dynamic. PR: 249121 Notes: svn path=/stable/12/; revision=365653
* MFC r365490-r365491: Remove FREEBSD_UPDATE dependency on PORTSNAPKyle Evans2020-09-125-0/+847
| | | | | | | | | | | | | | | | | | | | | | | r365490: phttpget: move out of portsnap Currently, WITHOUT_PORTSNAP forces WITHOUT_FREEBSD_UPDATE because the latter relies on phttpget, which lives inside the portsnap build bits. Remove the dependency between these two options by moving phttpget out into ^/libexec and building/installing it if either WITH_PORTSNAP or WITH_FREEBSD_UPDATE. Future work could remove the conditional if it's decided that users will use it independently of either the current in-base consumers. r365491: opts: FREEBSD_UPDATE no longer relies on PORTSNAP phttpget is no longer tied to the portsnap build as of r365490. Notes: svn path=/stable/12/; revision=365649
* MFC r365360, r365370:Konstantin Belousov2020-09-111-10/+28
| | | | | | | | | rtld: Handle ELF dso with program headers outside the first page. PR: 229708 Notes: svn path=/stable/12/; revision=365627
* MFC r363408:Warner Losh2020-09-091-2/+2
| | | | | | | | | | | r363408 | imp | 2020-07-21 18:44:47 -0600 (Tue, 21 Jul 2020) | 4 lines getty appears to date from 3rd edition research unix. That's the oldest man page on TUHS and its 'unix 1972' restoration effort has assembler sources that look like simpler version of what's in the 5th edition. Notes: svn path=/stable/12/; revision=365533
* In 13-CURRENT, the linux rc script uses "nocover" mount option to avoidEdward Tomasz Napierala2020-08-311-5/+12
| | | | | | | | | | | mounting required filesystems twice. However, this option hasn't been MFC'd. Implement its functionality in a different way, by stating the mount point. Submitted by: sigsys@gmail.com Differential Revision: https://reviews.freebsd.org/D26217 Notes: svn path=/stable/12/; revision=364985