millert
ec6f9a749b
mktemp(1): add suffix support for compatibility with the GNU version
...
It is now possible to use templates where the Xs are not at the
end, like "foo.XXXXXX.bar". If there are multiple runs of Xs,
the last one is used. OK deraadt@
2024-03-01 21:50:40 +00:00
deraadt
c2d43eca3f
mkstemp() returns -1 on failure
2019-06-28 05:35:34 +00:00
deraadt
95af8abf27
Some asprintf() calls were checked < 0, rather than the precise == -1.
...
ok millert nicm tb, etc
2019-06-27 18:03:36 +00:00
millert
bf198cc6eb
I am retiring my old email address; replace it with my OpenBSD one.
2019-01-25 00:19:25 +00:00
deraadt
0bd1216cbf
Change all tame callers to namechange to pledge(2).
2015-10-09 01:37:06 +00:00
deraadt
9e824d363a
tame "stdio rpath wpath cpath" covers mkstemp (O_RDONLY|O_CREAT),
...
mkdtemp(), and unlink()
2015-10-07 06:43:15 +00:00
landry
c4ace12d55
Move the check for template length added in r1.16 outside the !tflag
...
block so that the friendly error message is also shown in the -t case
instead of EINVAL.
ok millert@ deraadt@
2013-08-06 21:56:51 +00:00
millert
3be362b6c5
Add fatal() and fatalx() that honor the quiet flag instead of
...
using "if (quiet) warn(...); exit(1);" throughout. OK sthen@
2013-03-14 15:44:15 +00:00
millert
423e3a9c44
Fix indentation
2013-03-14 13:20:57 +00:00
millert
51332d7152
warnx() not warningx(), too much sudo on the brain
2013-03-12 19:09:23 +00:00
millert
0bc28667d0
Require that the template include at least 6 trailing Xs to match
...
POSIX mkstemp/mkdtemp. Check before the call to mkstemp/mkdtemp
so we can give a better error message than "invalid argument".
OK deraadt@ jmc@
2013-03-12 15:07:12 +00:00
deraadt
043fbe51c1
rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
...
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms
2009-10-27 23:59:19 +00:00
sobrado
06cbb4e088
"usage:" is lowercase; synchronize synopsis and usage.
2008-05-26 09:22:30 +00:00
millert
328f1f0724
Sync with share/misc/license.template and add missing DARPA credit
...
where applicable.
2003-06-17 21:56:23 +00:00
deraadt
1837a5ca50
mostly ansi cleanup; pval ok
2003-06-10 22:20:44 +00:00
millert
06f016962e
Use an ISC-tyle license for all my code; it is simpler and more permissive.
2003-06-03 01:52:39 +00:00
millert
bdf17bbed8
Don't assume that asprintf() will leave "tempfile" unmolested when
...
memory allocation fails. Noted and OK by pval@
2003-04-25 20:02:02 +00:00
millert
fb83f4f815
Simplify code for -t using asprintf(); deraadt@ OK
2003-04-07 19:25:43 +00:00
millert
c72b5b24e1
Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2002-02-16 21:27:05 +00:00
millert
1e9e26e904
Sync with portable mktemp-1.4; the template is now optional.
...
Came out of discussions with Solar Designer.
2001-10-11 00:05:55 +00:00
millert
01596bb8bb
Add -t and -d flags to allow script writers to easily take a user's TMPDIR
...
environment variable into account. This came out of a discussion with
Solar Designer.
2001-10-01 17:08:30 +00:00
millert
9141dda38a
Remove the advertising clause in my old license, it impedes free use
...
of the code as a large number of similar clauses makes it impossible
to write an ad for a product using the code...
1998-06-21 22:13:35 +00:00
millert
a145693cfc
Use mkdtemp(3)
1997-06-20 04:17:42 +00:00
millert
9a2404e359
Adds a -d (directory) flag.
1997-06-17 15:34:27 +00:00
millert
74a05bc78c
Better error on failure.
1997-01-03 22:49:22 +00:00
millert
5d2a10fbea
mktemp(1) for shell scripts. No more gross directory hackery for safe temp
...
files.
1996-11-21 07:59:31 +00:00