Commit Graph

115 Commits

Author SHA1 Message Date
Alan Somers
90de1ffbdb at(1): annotate some intended switch-case fallthroughs
Reported by:	Coverity
CID:		1008191
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
2017-12-08 17:15:20 +00:00
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
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.
2017-11-27 15:37:16 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Marcelo Araujo
268b75a878 Use nitems() from sys/param.h
Sponsored by:	gandi.net (BSD Day Taiwan)
2016-07-30 06:32:18 +00:00
Baptiste Daroussin
89afcfedb6 Fix typo: actually test the return of strchr(3)
Reported by:	Coverity
CID:		1007335
MFC after:	3 days
2016-04-20 20:54:47 +00:00
Baptiste Daroussin
b5ff185e19 Merge from head 2015-09-12 11:41:31 +00:00
Xin LI
f2f9b434b6 Finish r89633 and completely remove the remaining of VERSION.
PR:		bin/202308
Submitted by:	John Hein <z7dr6ut7gs snkmail com>
MFC after:	2 weeks
2015-08-25 05:31:00 +00:00
Baptiste Daroussin
dad2fb7ece Merge from head 2015-06-15 10:56:01 +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
Baptiste Daroussin
58cf66a972 Make at(1) and related tools an individual package 2015-03-05 16:49:52 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Xin LI
934a6c2732 Sigh, remove a line that needs to be removed along with previous commit.
Submitted by:	mjg
MFC after:	3 days
X-MFC-with:	272288
2014-09-29 21:54:46 +00:00
Xin LI
da9c3bbbee When setting environment variables in the atrun script, use the
"export foo=bar" form instead of "foo=bar; export foo" since the
former allows the shell to catch variable names that are not valid
shell identifiers.  This will cause /bin/sh to exit with an error
(which gets mailed to the at user) and it will not run the script.

Obtained from:	OpenBSD (r1.63 millert)
MFC after:	3 days
2014-09-29 21:45:57 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Baptiste Daroussin
2b7af31cf5 use .Mt to mark up email addresses consistently (part3)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:23:05 +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
69e6d7b75e sync from head 2013-04-12 20:48:55 +00:00
Pietro Cerutti
1a47f28b71 - Do not bail out if stat(2) fails with ENOENT in the spool directory. This
happens if another atrm process removes a job while we're scanning through
  the directory.
- While at it, optimize a bit the directory scanning, so that we quit looping
  as soon as all jobs specified in argv have been dealt with.

Approved by:	cognet
2013-04-12 14:32:16 +00:00
Pietro Cerutti
b9e6237dab - Switch order of setting real uid and gid. If we set uid first, then we
don't have enough privileges to set gid.

  This looks like a long standing bug, just recently revealed by r241852.

Approved by:	cognet
2013-04-12 14:19:44 +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
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Eitan Adler
1d1d4a4727 Check the return error of set[ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.  Custom
security modules, or future implementations of the setuid and setgid
may fail.

PR:		bin/172289
PR:		bin/172290
PR:		bin/172291
Submittud by:	Erik Cederstrand <erik@cederstrand.dk>
Discussed by:	freebsd-security
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:31:22 +00:00
Ed Schouten
bf70becee6 More -Wmissing-variable-declarations fixes.
In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
2012-10-19 14:49:42 +00:00
Martin Cracauer
93a2fe45a6 Allow time offsets to be negative, e.g. at 1530 - 15 minutes.
This is useful if you have been given some time for some event in some
format and you want your computer to do something to prepare for it.
Without having to do time arithmetic in a shellscript.

The syntax matches what the at(1) usually used on Linux supports.
2012-10-05 17:54:27 +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
a35353de88 Partially revert r227233.
The privs.h header is not only used by at(1), it's also used by
atrun(8). Just let the code the way it used to be (for now).

Reported by:	kwm, tinderbox
Hat to:		me
2011-11-06 20:30:21 +00:00
Ed Schouten
f64efe8b60 Add missing static keywords to at(1).
While there, tidy up the privs.h part, where at.c has to #define to
declare some globals. Also group static and non-static global variables
in at.c.
2011-11-06 17:32:29 +00:00
Ed Schouten
196769ee58 Build at(1) with NO_WFORMAT instead of WARNS=1. 2011-10-16 07:57:01 +00:00
Kevin Lo
f9af8a7b9c Close file and directory descriptors
MFC after:	3 days
2010-11-19 10:15:29 +00:00
Ed Schouten
0806dd9238 Remove stale references to utmp(5) and its corresponding filenames.
I removed utmp and its manpage, but not other manpages referring to it.
2010-01-21 17:25:12 +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
Ed Schouten
ef636796f6 ANSIfy various tools in usr.bin/.
Most of these tools properly build at WARNS=6, except for their K&R
function declarations. Fix this, so we can bump WARNS as well.
2010-01-02 10:09:20 +00:00
Kevin Lo
8bcd62f2ff Use NULL instead of 0 for the return value of fopen().
Approved by: re (kensmith)
2007-09-21 01:55:11 +00:00
Stefan Farfeleder
4ed7018006 While revision 1.26 fixed the code to really subtract 3600 due to
daylight-saving, this was actually wrong because mktime() already does that for
us.
2005-08-18 08:18:02 +00:00
Stefan Farfeleder
3dc44a8992 Don't throw away the adjusted `runtimer' value. 2005-08-05 08:07:02 +00:00
Ruslan Ermilov
6c7216df78 Sort sections. 2005-01-18 13:43:56 +00:00
Giorgos Keramidas
85785286b4 Explain the format of the at.allow and at.deny files in detail.
PR:		35942
Submitted by:	Gary W. Swearingen <swear@blarg.net>
2003-03-26 02:38:18 +00:00
Giorgos Keramidas
9d5eb445a3 The .Nm utility. 2003-02-28 21:04:17 +00:00
Ruslan Ermilov
e27480d64d mdoc(7) police:
Revert to using the .Tn POSIX and .Tn ANSI instead of \*[Px] and \*[Ai]
strings; using these strings is unsafe in troff mode, as they include a
change in a font size.

Approved by:	re
2002-11-26 17:55:41 +00:00
Ruslan Ermilov
a654c53e16 mdoc(7) police: Removed redundant .Ns calls. 2002-08-13 16:07:28 +00:00
Robert Drehmel
6d6c6baac4 - Use MAXLOGNAME - 1 instead of UT_NAMESIZE.
- Do not pretend there is something like '/etc/utmp'.
2002-07-22 11:32:16 +00:00
Ruslan Ermilov
5ec37969a1 mdoc(7) police: lint. 2002-05-29 18:00:23 +00:00
Tim J. Robbins
dfd339a02c Add the SUSv3 -l option to at. This is an alias for atq. Allow job ids
to be specified on the command line for which information should be reported.

Submitted by:	Joe Halpin <joe.halpin@attbi.com>
Reviewed by:	mike
2002-05-16 00:47:14 +00:00
Jun Kuriyama
18ddb1400d Change whtespace indent in format string to fit new output form of
timestamp.

Reviewed by:	markm
2002-05-08 11:23:45 +00:00
Jeroen Ruigrok van der Werven
cdb886795d Document the fact that at(1) is run through cron(8) and that this affects
the granularity of the at queue runs.

Submitted by:	mux
2002-05-04 15:33:12 +00:00
Ruslan Ermilov
4af011c32b mdoc(7) police: markup fixes. 2002-03-15 15:26:57 +00:00
Bruce Evans
8b179749d8 #include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval (sys/stat.h> only
needs timespecs even when its POSIX support is not turned on, so it
shouldn't declare timevals).

Fixed some #include messes.
2002-02-25 04:47:39 +00:00