Commit Graph

34 Commits

Author SHA1 Message Date
Pedro F. Giffuni
e6209940de libexec: 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:25:02 +00:00
Enji Cooper
565379b6b6 Fix the type for hw.ncpu, so sysctlbyname doesn't consistently fail on
64-bit architectures where sizeof(int) != sizeof(size_t).

MFC after: 1 week
PR: 206758
Reported by: Christoph Schönweiler <public2016@hauptsignal.at>
Submitted by: kib
Sponsored by: EMC / Isilon Storage Division
2016-01-30 17:54:18 +00:00
Guy Helmer
c759c06046 Fix releasing the lock in the parent atrun process after the queue
directory has been processed. Otherwise, a long-running child process
caused other atrun invocations to stall unnecessarily.
2014-04-17 16:00:26 +00:00
Guy Helmer
94d5234b59 Add the name of the file that could not be opened to the error message
regarding the failure.

Suggested while working on PR bin/113239.
2013-06-11 18:46:46 +00:00
Guy Helmer
2b0cbe6d3a Prevent races running the queue by serializing access to the
queue directory.

PR:		bin/113239
2013-06-11 18:43:27 +00:00
Mateusz Guzik
e61e6189e5 atrun(8): scale default load average limit with the number of CPUs
Previously atrun refused to run jobs if load average was not below fixed limit of 1.5.

PR:		173175
Reviewed by:	peterj
Approved by:	trasz (mentor)
MFC after:	2 weeks
2012-10-30 19:46:00 +00:00
Jilles Tjoelker
0096926b7e atrun: Do not assume that MAXLOGNAME <= 100.
The reserved space for fmt was exactly sufficient for a two-digit value of
MAXLOGNAME - 1.

PR:		bin/171815
Submitted by:	Jeremy Huddleston Sequoia
MFC after:	1 week
2012-09-26 20:47:39 +00:00
Ed Schouten
f195f6269e Don't use UT_NAMESIZE here to determine the maximum username length. 2009-12-25 10:30:54 +00:00
Yaroslav Tykhiy
553284d74a Add PAM support to atrun(8). 2007-06-15 12:02:16 +00:00
Yaroslav Tykhiy
858d347f2f Actually use new features of perr() and perrx(). 2007-06-15 10:34:36 +00:00
Yaroslav Tykhiy
287303f0ea Make perr() variadic and add perrx() to use in cases where
errno is irrelevant.  Some code duplication can be reduced
if perr() is variadic and perrx() is available.
2007-06-15 10:10:40 +00:00
Yaroslav Tykhiy
1add474291 Use a single setusercontext(3) instead of a bunch of basic syscalls.
Besides aesthetic benefits, that makes at(1) jobs subject to such
login.conf(5) settings as resource limits.
2007-06-14 22:16:21 +00:00
Yaroslav Tykhiy
b53756d2fe Spotted another copy of the loony error message. 2007-06-14 21:24:05 +00:00
Yaroslav Tykhiy
ff86050785 Fix an error message that was beside the point. 2007-06-14 15:18:44 +00:00
Yaroslav Tykhiy
7a855803b9 Fix a typical off-by-one error that can result in an unterminated string:
strncpy(dst, src, sizeof(dst));

by substituting the safer strlcpy() for strncpy().

X-Security:	none (the source string isn't user-supplied)
2007-06-14 14:44:04 +00:00
Ceri Davies
830dab99f0 Don't be sexist - fix a typo. 2005-12-30 17:59:23 +00:00
Stefan Farfeleder
70c3c978b9 Fix a few cases that relied on 'implicit int' (constraint violation in C99). 2004-07-11 17:37:33 +00:00
Warner Losh
e4bc453cc2 o Eliminate __P
o Use new-style function definitions
o remove some !__STDC__ code
o eliminate register
2002-02-03 15:53:02 +00:00
Kris Kennaway
3697d3f8ca by by -> by
Obtained from:	OpenBSD
MFC After:	1 week
2001-07-23 11:00:31 +00:00
Kris Kennaway
18fdc5893a Don't hard-code a buffer size 2000-11-26 10:05:06 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Bruce Evans
bb6ae0a4a9 Fixed printf format errors. 1998-08-02 16:44:18 +00:00
Philippe Charnier
864b6b6e0a Cosmetic in error strings. Sort Xrefs. Add usage (with syslog capability). 1997-11-20 07:21:55 +00:00
Dima Ruban
8fad2d7e99 Do setlogin() before changing uid/gid, since
`at/batch' requires this.

Obtained from: me && OpenBSD
1997-09-08 23:39:48 +00:00
David Nugent
c4c1e98233 Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
Fixes name size limitation (was hardcoded to 8).
Closes PR#3258
1997-04-12 01:04:50 +00:00
Warner Losh
91477cc4d7 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-28 15:48:21 +00:00
Peter Wemm
9e522f7a18 Revert $FreeBSD$ to $Id$ 1997-02-22 14:22:49 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Mike Pritchard
ae532ecb79 Check for expired passwords before allowing access to the system. 1995-08-28 21:30:59 +00:00
Andrey A. Chernov
ddcf802236 Upgrade to 2.9 1995-08-21 12:34:18 +00:00
Rodney W. Grimes
6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Andrey A. Chernov
4f7ac4bd57 Add some useful sendmail options 1995-04-12 19:21:43 +00:00
Andrey A. Chernov
c70e5825aa Upgrade.
Close security holes reported.
1995-04-12 02:52:21 +00:00
Nate Williams
b89d17b245 Added the Linux atrun command as hacked by Chris Demetriou for NetBSD. 1994-01-05 01:03:02 +00:00