While these warnings are false positives, the use of strdup() instead of
malloc() and strcpy() simplifies and clarifies the code.
While checking the remaining uses of strcpy and strcat I noticed an
assignment of a strlen() to a variable "s", whose value needs to be
preserved for use in later output routines (where it is used to allocate
a buffer). I do not think that the value of "s" will come out lower than
its correct value and thus there is no risk of a buffer overflow, in the
general case, but a specially crafter argument might lead to an overflow.
The bogus assignment to "s" is removed since this value was only used a
single time in the following malloc() call, which has been removed.
MFC after: 2 weeks
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
No functional change intended.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.
Still need to add real targets under targets/ to build packages.
Differential Revision: D2796
Reviewed by: brooks imp
update paths; and include everything in the "base" distribution.
The "games" distribution being optional made sense when there were more
games and we had small disks; but the "games-like" games were moved into
the ports tree a dozen years ago and the remaining "utility-like" games
occupy less than 0.001% of my laptop's small hard drive. Meanwhile every
new user is confronted by the question "do you want games installed" when
they they try to install FreeBSD.
The next steps will be:
2. Removing punch card (bcd, ppt), phase-of-moon (pom), clock (grdc), and
caesar cipher (caesar, rot13) utilities. I intend to keep fortune, factor,
morse, number, primes, and random, since there is evidence that those are
still being used.
3. Merging src/games into src/usr.bin.
This change will not be MFCed.
Reviewed by: jmg
Discussed at: EuroBSDCon
Approved by: gjb (release-affecting changes)
This makes a tiny percentage of entries in calendars ugly for latin1
users, but fixes them for UTF-8 users.
This badly needs a solution involving locale-dependent re-encoding.
noticed that a "whereis -qs qemu" matched the distfiles subdir of qemu
rather than /usr/ports/emulators/qemu.
It now ignores all dot entries in /usr/ports, plus all entries
starting with a capital letter (maintenance stuff like Templates, but
also includes subdir CVS), plus /usr/ports/distfiles which is simply a
magic name in that respect.
This is basically a ``C compilation'' of the former whereis.pl file,
employing the same algorithms, and aiming at being mostly
UI-compatible to the old (legally tainted) 4.3BSD whereis(1). In
comparision, the 4.4BSD-Lite version is just another variant of
which(1) only, where in particular the option to search for source
directories is sorely missing.
While i was at it, i added two more options which i contemplated doing
long since. -x will suppress the run of locate(1) to find sources
that could not be found otherwise, potentially saving a lot of time
(but obviously, risking to not find some sources that are well hidden
in the tree). -q will omit the leading name of the query, so in
particular, you can now do something like:
cd `whereis -qs ls`
I'd explicitly like to thank johan for his review which was quite a
bit more than an average review, including sending me a lot of diffs.
Reviewed by: johan
OpenBSD's implementation lacks -p, and we don't want to
support the option now, only to lose it if/when we later
switch to OpenBSD's implementation.
This functionality is provided by which(1).
Approved by: sheldonh (mentor)
intentional, this behaviour is far too obnoxious given the number of
filenames such as rpc.statd we have.
Submitted by: Chris Costello [3]chris@calldei.com (bin/11303)