various: general adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - error
various: general adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.No functional change intended.
show more ...
Strip EOL whitespace in usr.sbin/{jail,jexec}
DIRDEPS_BUILD: Update dependencies.Sponsored by: Dell EMC Isilon
Define which of the username options (-u/-U) to jexec(8) is the default.Bump Dd.PR: 207587Submitted by: [email protected]MFC after: 3 daysSponsored by: Essen Hackathon 2016
Add a package for jail(8) and related utilities.Sponsored by: The FreeBSD Foundation
Run a shell in the jail when no command is specified.Add a new flag, -l, for a clean environment, same as jail(8) exec.clean.Change the GET_USER_INFO macro into a function.PR: 201300Submitted b
Run a shell in the jail when no command is specified.Add a new flag, -l, for a clean environment, same as jail(8) exec.clean.Change the GET_USER_INFO macro into a function.PR: 201300Submitted by: Willem Jan WithagenMFC after: 3 days
Fix typo when deregistering the VLAN unconfig event handlerSubmitted by: Masao Uebayashi <[email protected]>MFC after: 3 days
dirdeps.mk now sets DEP_RELDIR
Fix a lock up where we enter swapper() with interrupts disabled.In smp_rendezvous_cpus we expect to wait for all cpus to entersmp_rendezvous_action. If we call this holding a proc lock swapper may
Fix a lock up where we enter swapper() with interrupts disabled.In smp_rendezvous_cpus we expect to wait for all cpus to entersmp_rendezvous_action. If we call this holding a proc lock swapper mayattempt to also lock it, however as interrupts are disabled the cpu neverhandles the ipi. Because smp_rendezvous_action waits for all signaledcpus before contining it may get caught waiting for the cpu running swapperas the proc mutex will be unlocked after smp_rendezvous_cpus finishes.The fix is to enable interrupts in the configure stage as we should bedoing.MFC after: 1 week
Updated dependencies
Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Requested by: Simon Gerraty <[email protected]>
The last big commit: let usr.sbin/ use WARNS=6 by default.
Add libjail, a (somewhat) simpler interface to the jail_set and jail_getsystem calls and the security.jail.param sysctls.Approved by: bz (mentor)
Whitespace fix.Approved by: bz (mentor)
In preparation for raising NGROUPS and NGROUPS_MAX, change basesystem callers of getgroups(), getgrouplist(), and setgroups() toallocate buffers dynamically. Specifically, allocate a buffer of siz
In preparation for raising NGROUPS and NGROUPS_MAX, change basesystem callers of getgroups(), getgrouplist(), and setgroups() toallocate buffers dynamically. Specifically, allocate a buffer of sizesysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow).This (or similar gymnastics) is required for the code to actually followthe POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtimeand where getgroups may return {NGROUPS_MAX}+1 results on systems likeFreeBSD which include the primary group.In id(1), don't pointlessly add the primary group to the list of allgroups, it is always the first result from getgroups(). In principlethe old code was more portable, but this was only done in one of the twoplaces where getgroups() was called to the overall effect was pointless.Document the actual POSIX requirements in the getgroups(2) andsetgroups(2) manpages. We do not yet support a dynamic NGROUPS, but wemay in the future.MFC after: 2 weeks
Add support for the arbitrary named jail parameters used by jail_set(2)and jail_get(2). Jail(8) can now create jails using a "name=value"format instead of just specifying a limited set of fixed pa
Add support for the arbitrary named jail parameters used by jail_set(2)and jail_get(2). Jail(8) can now create jails using a "name=value"format instead of just specifying a limited set of fixed parameters; itcan also modify parameters of existing jails. Jls(8) can display allparameters of jails, or a specified set of parameters. The availableparameters are gathered from the kernel, and not hard-coded into theseprograms.Small patches on killall(1) and jexec(8) to support jail names withjail_get(2).Approved by: bz (mentor)
- Style: size_t can't be negative.- Don't exit with a zero status code when no jails are configured on a system.- Style: simplify some code constructs.- If a single jail cannot be found, let
- Style: size_t can't be negative.- Don't exit with a zero status code when no jails are configured on a system.- Style: simplify some code constructs.- If a single jail cannot be found, let the caller print a nicer diagnostic message.Reviewed by: bzMFC after: 3 days
Correctly check the number of prison states to not access anythingoutside the prison_states array.When checking if there is a name configured for the prison, check thefirst character to not be '\0
Correctly check the number of prison states to not access anythingoutside the prison_states array.When checking if there is a name configured for the prison, check thefirst character to not be '\0' instead of checking if the char arrayis present, which it always is. Note, that this is different for the*jailname in the syscall.Found with: Coverity Prevent(tm)CID: 4156, 4155MFC after: 4 weeks (just that I get the mail)
MFp4: Bring in updated jail support from bz_jail branch.This enhances the current jail implementation to permit multipleaddresses per jail. In addtion to IPv4, IPv6 is supported as well.Due to
MFp4: Bring in updated jail support from bz_jail branch.This enhances the current jail implementation to permit multipleaddresses per jail. In addtion to IPv4, IPv6 is supported as well.Due to updated checks it is even possible to have jails withoutan IP address at all, which basically gives one a chroot withrestricted process view, no networking,..SCTP support was updated and supports IPv6 in jails as well.Cpuset support permits jails to be bound to specific processorsets after creation.Jails can have an unrestricted (no duplicate protection, etc.) namein addition to the hostname. The jail name cannot be changed fromwithin a jail and is considered to be used for management purposesor as audit-token in the future.DDB 'show jails' command was added to aid debugging.Proper compat support permits 32bit jail binaries to be used on 64bitsystems to manage jails. Also backward compatibility was preserved wherepossible: for jail v1 syscalls, as well as with user space managementutilities.Both jail as well as prison version were updated for the new features.A gap was intentionally left as the intermediate versions had beenused by various patches floating around the last years.Bump __FreeBSD_version for the afore mentioned and in kernel changes.Special thanks to:- Pawel Jakub Dawidek (pjd) for his multi-IPv4 patches and Olivier Houchard (cognet) for initial single-IPv6 patches.- Jeff Roberson (jeff) and Randall Stewart (rrs) for their help, ideas and review on cpuset and SCTP support.- Robert Watson (rwatson) for lots and lots of help, discussions, suggestions and review of most of the patch at various stages.- John Baldwin (jhb) for his help.- Simon L. Nielsen (simon) as early adopter testing changes on cluster machines as well as all the testers and people who provided feedback the last months on freebsd-jail and other channels.- My employer, CK Software GmbH, for the support so I could work on this.Reviewed by: (see above)MFC after: 3 months (this is just so that I get the mail)X-MFC Before: 7.2-RELEASE if possible
Fix some bugs/complaints:- make addr2jid static- add -h Flag for hostname/ip-number search- s,strncmp,strcmp, in addr2jid- return jid only if found onceRequested by: some
Add CAUTIONS section to the manpage and update .Dd.Spelling fix.PR: bin/119305 (reminded by Frank Behrens)Suggested by: rwatson, maximMFC after: 2 weeks
Extend jexec to accept hostname or ip-number besides jail-id.MFC after: 2 weeks
12