Commit graph

180 commits

Author SHA1 Message Date
Warner Losh 0b8224d1cc Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by:		Netflix
2023-11-26 22:23:58 -07:00
Warner Losh bdcbfde31e usr.bin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
2023-11-26 22:23:30 -07:00
Warner Losh b2c76c41be Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:15 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Mateusz Piotrowski 68fbe6f0b3 Do not use macros in -width
They do not expand.

MFC after:	1 day
2020-03-26 17:58:52 +00:00
Simon J. Gerraty 2c9a9dfc18 Update Makefile.depend files
Update a bunch of Makefile.depend files as
a result of adding Makefile.depend.options files

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22494
2019-12-11 17:37:53 +00:00
Simon J. Gerraty 5ab1c5846f Add Makefile.depend.options
Leaf directories that have dependencies impacted
by options need a Makefile.depend.options file
to avoid churn in Makefile.depend

DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc
can be set in local.dirdeps-options.mk
which can add to those set in Makefile.depend.options

See share/mk/dirdeps-options.mk

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22469
2019-12-11 17:37:37 +00:00
Eitan Adler 520c8e1852 su(1): build with WARNS=6
Tested with full make universe
2018-06-22 09:10:50 +00:00
Xin LI aff7b6c709 Use strlcpy().
MFC after:	2 weeks
2017-12-05 07:11:56 +00:00
Pedro F. Giffuni 8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

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.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Enji Cooper 838c6d51d5 Mute gcc warning about p not being possibly initialized
I'm running into this warning on a tinderbox run with gcc 4.2.1 with mips and
powerpc.

MFC after:	1 week
2017-10-10 15:41:35 +00:00
Gordon Tetlow 4572fb3faf Deorbit catman. The tradeoff of disk for performance has long since tipped
in favor of just rendering the manpage instead of relying on pre-formatted
catpages. Note, this does not impede the ability to use existing catpages,
it just removes the utility to generate them.

Reviewed by:	imp, allanjude
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D12317
2017-09-13 16:35:16 +00:00
Warner Losh fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
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
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty 98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Baptiste Daroussin 3e11bd9e2a Convert to usr.bin/ to LIBADD
Reduce overlinking
2014-11-25 14:29:10 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Warner Losh c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Simon J. Gerraty d1d0158641 Merge from head 2013-09-05 20:18:59 +00:00
Edward Tomasz Napierala d790b96563 Make check for unknown login class actually work. Previously, using the "-c" option
with login class not defined in login.conf(5) would silently fail, resulting in using
the default login class.
2013-08-12 21:01:01 +00:00
Edward Tomasz Napierala f8a2fe5ead In su(1), fix option ordering and clarify that the login class specified
must be defined in login.conf.

MFC after:	1 month
2013-08-11 11:06:49 +00:00
Simon J. Gerraty 7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ed Schouten 7687733bfb Undo r226423.
It seems su does build without warnings, but it requires a small fix to
libbsm headers, which I have not committed to SVN yet.
2011-10-16 09:09:33 +00:00
Ed Schouten 43f65c0c3c Remove WARNS line. This tool builds with WARNS=6 properly. 2011-10-16 08:14:12 +00:00
Glen Barber b6654957c3 Attempt to clear up some confusion in the following example, by stating
the '-c' argument is passed to the shell, not to su(1), which would
indicate the login class.

	'su -m <user> -c <command>'

Submitted by:	Warren Block <wblock@wonkity.com> (followup to 157078)
MFC after:	5 days
2011-06-06 19:33:19 +00:00
Glen Barber a53dafae57 Bump date from previous commit. :(
MFC after:	5 days
2011-06-06 15:21:53 +00:00
Glen Barber 4af4a110a7 Document that when running 'su -m <user> -c <command>', <command> is run
within a shell as <user>.

PR:		157078
Submitted by:	Warren Block <wblock@wonkity.com>
MFC after:	5 days
2011-06-06 15:17:55 +00:00
Hajimu UMEMOTO 3db78cf013 getpwnam(3) may return NULL.
Requested by:   nork
Reviewed by:    Takeharu KATO <takeharu1219__at__ybb.ne.jp>, nork
MFC after:      1 week
2011-03-27 12:53:20 +00:00
Joel Dahl da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
Ed Schouten b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Xin LI 821df508e8 Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
Xin LI 6f2d322192 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
Christian S.J. Peron ce8c6d71f5 Fixup the parameters to audit_submit(3) the order is errno then return
value.  This bug went un-noticed for so long because EPERM == 1

MFC after:	1 week
Spotted by:	sson, rwatson
2009-04-04 20:58:18 +00:00
Daniel Gerzo 9ea29562d9 - add the -m option to the example commands because they would fail w/o it
as the ``man'' user does not have a valid shell by default.

PR:		docs/121713
Approved by:	trhodes
MFC after:	3 days
2008-07-01 20:56:23 +00:00
David Malone f258a139d3 Fix a strict aliasing warning - I think it is really telling us
that the way char * and void * pointers may not be stored in the
same way.
2008-06-04 19:16:54 +00:00
David Xu a964714f51 The upper while loop has already recycled child process, so the if
statement has never executed as expected, fix it.

MFC after: 3 days
2007-10-18 11:05:30 +00:00
Xin LI 9a0e6be26a Stop mentioning /usr/X11R6.
Approved by:	re (hrs)
2007-07-24 06:41:07 +00:00
Sean Farley 2966d28c32 Significantly reduce the memory leak as noted in BUGS section for
setenv(3) by tracking the size of the memory allocated instead of using
strlen() on the current value.

Convert all calls to POSIX from historic BSD API:
 - unsetenv returns an int.
 - putenv takes a char * instead of const char *.
 - putenv no longer makes a copy of the input string.
 - errno is set appropriately for POSIX.  Exceptions involve bad environ
   variable and internal initialization code.  These both set errno to
   EFAULT.

Several patches to base utilities to handle the POSIX changes from
Andrey Chernov's previous commit.  A few I re-wrote to use setenv()
instead of putenv().

New regression module for tools/regression/environ to test these
functions.  It also can be used to test the performance.

Bump __FreeBSD_version to 700050 due to API change.

PR:		kern/99826
Approved by:	wes
Approved by:	re (kensmith)
2007-07-04 00:00:41 +00:00
Andrey A. Chernov ba174a5e38 Back out all POSIXified *env() changes.
Not because I admit they are technically wrong and not because of bug
reports (I receive nothing). But because I surprisingly meets so
strong opposition and resistance so lost any desire to continue that.

Anyone who interested in POSIX can dig out what changes and how
through cvs diffs.
2007-05-01 16:02:44 +00:00
Andrey A. Chernov 9e461e53cc Prepare for upcoming POSIXed putenv() rewrite:
don't free memory after putenv()
2007-04-30 12:51:02 +00:00
Maxim Sobolev e7d4bf18db Backout previous change (SIGSYS related). The fix has been applied to the
proper place.

Pointed out by:	rwatson
2006-10-24 17:41:28 +00:00
Maxim Sobolev a88ab48624 Ignore SIGSYS when BSM is compiled in. Otherwise, attempt to invoke su on
system that don't have audit framefork compiled into kernel or ia32 binary
on amd64 system will result in SIGSYS. There is one place in su.c itself
where it tries to check for errno != ENOSYS, but it has been a nop since su
does not catch SIGSYS anyway. There are few other places in libbsm,
where attempt to invoke audit syscal would result in SIGSYS if no audit
support is present in the kernel, so that the only reliable method for
now is to disable SIGSYS completely in the case when BSM is compiled in.

In the long run, both direct invocation of audit-related syscalls and
libbsm should be made more intellegent to handle the case when BSM is not
compiled into the kernel gracefully.

MFC after: 3 days
           (provided re@ approval)
2006-10-24 08:18:10 +00:00
Ruslan Ermilov cb29445a92 Markup fixes. 2006-09-29 15:20:48 +00:00