#
1.50 |
|
08-Mar-2023 |
guenther |
Delete obsolete /* ARGSUSED */ lint comments.
ok miod@ millert@
|
Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
|
#
1.49 |
|
28-Jan-2022 |
guenther |
When it's the possessive of 'it', it's spelled "its", without the apostrophe.
|
#
1.48 |
|
05-Jan-2022 |
millert |
funopen(): change seekfn argument to use off_t, not fpos_t On BSD, fpos_t is typedef'd to off_t but some systems use a struct. This means fpos_t is not a portable function argument or return value. Both FreeBSD and the Linux libbsd funopen() have switched to off_t for this--we should too. From Joe Nelson. OK deraadt@
|
Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.47 |
|
30-Aug-2020 |
mortimer |
Fix multiple variable definitions to avoid errors with -fno-common.
ok millert@
|
Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
|
#
1.46 |
|
28-Jun-2019 |
deraadt |
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
|
Revision tags: OPENBSD_6_5_BASE
|
#
1.45 |
|
24-Oct-2018 |
martijn |
Fix some minor issues found by coverity.
OK millert@ and miko@
|
Revision tags: OPENBSD_6_4_BASE
|
#
1.44 |
|
08-Sep-2018 |
miko |
blkfree() takes no action for NULL pointer so callers can avoid checking.
ok jca@
|
Revision tags: OPENBSD_6_3_BASE
|
#
1.43 |
|
16-Dec-2017 |
anton |
Passing NULL to free() is fine; from Michael W. Bombardieri.
|
#
1.42 |
|
12-Dec-2017 |
tb |
Include hostname in shell prompts by default
With tmux, ssh and vmd, we tend to open shells on many different hosts simultaneously and the default prompts '$ ' and '# ' for {,k}sh as well as '% ' and '# ' for csh become dangerous: it's very easy to issue a command on the wrong host.
This can easily be avoided by displaying the hostname in the prompt. Everything beyond "hostname{$,#,%} " is going to be a matter of taste, so we left it at that. If you use an FQDN, only the first part (the output of 'hostname -s') will be printed.
requested by and ok deraadt; mostly positive feedback many ok anton, brynet, bcallah and others
|
Revision tags: OPENBSD_6_2_BASE
|
#
1.41 |
|
30-Aug-2017 |
anton |
Fix pasting of long (>BUFSIZ) lines in csh with filec enabled. NUL-terminating the input buffer instructs csh that the buffer contains a complete command. This is wrong and should only happen when buffer is not full, otherwise more data has to be read in order form a complete command.
While here, do not print the prompt again when the input exceeds the input buffer and while inserting a line continuation (backslash).
|
#
1.40 |
|
26-Jul-2017 |
anton |
Postpone printing of prompt if filec is enabled in csh. Any I/O should be performed first when canonical mode has been disabled on the tty just like ksh does. Discovered by the regress tests.
Joint work with bluhm@, ok deraadt@
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
|
#
1.39 |
|
19-Mar-2016 |
krw |
Turn off the close-on-exec bit with fcntl() instead of ioctl().
Remove some now useless "#include <ioctl.h>" lines.
Inspired by & ok millert@
|
#
1.38 |
|
18-Mar-2016 |
millert |
Replace ioctl(fd, FIOCLEX) with fcntl(fd, F_SETFD, FD_CLOEXEC) No functional change. "I like the idea" from guenther@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.37 |
|
26-Dec-2015 |
mestre |
Replace handrolled xfree() function by directly using free(3)
OK mmcc@
|
#
1.36 |
|
11-Nov-2015 |
deraadt |
exit() after perror() for pledge failure. Perhaps this got introduced as a test idiom, either when pledge was young or during the transition to strings.... dunno
|
#
1.35 |
|
28-Oct-2015 |
naddy |
unifdef _PATH_*
|
#
1.34 |
|
26-Oct-2015 |
naddy |
miscellaneous cruft: * remove lint * unifdef S_IFLNK, S_ISFIFO, S_ISLNK, S_ISSOCK, O_APPEND * remove 0, NOTUSED, notdef -- untouched since original import * remove IIASA
|
#
1.33 |
|
26-Oct-2015 |
naddy |
remove the profiling and debugging ifdefs; ok zhuk@
|
#
1.32 |
|
26-Oct-2015 |
naddy |
Clean up cruft made visible by the NLS unifdefing: * remove setlocale() calls * remove write-only variable AsciiOnly * remove now unused string constants STRLANG, STRLC_CTYPE * remove hardcoded support for ISO8859-1
ok millert@
|
#
1.31 |
|
26-Oct-2015 |
naddy |
unifdef BUILTIN (unused), NLS (always set), SHORT_STRINGS (always set) and remove a few unused defines; no binary changes; ok tedu@ zhuk@
|
#
1.30 |
|
22-Oct-2015 |
deraadt |
setlocale() before pledge()... until we learn more
|
#
1.29 |
|
18-Oct-2015 |
deraadt |
With TIOCSTI supported in pledge "tty proc", csh is good enough to run with pledge "stdio rpath wpath cpath fattr getpw proc exec tty". (Note that ksh "emacs mode" is also a abus^Wconsumer of TIOCSTI, but we had let that slide for a week since noone uses it...)
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.28 |
|
08-Feb-2015 |
tedu |
delete many more ptr_t casts
|
#
1.27 |
|
16-Jan-2015 |
deraadt |
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
|
#
1.26 |
|
16-Oct-2014 |
deraadt |
Use reallocarray() and remove a few archaic memory allocation practices. ok deraadt
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
|
#
1.25 |
|
27-Oct-2009 |
deraadt |
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
|
Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.24 |
|
18-Oct-2006 |
deraadt |
do not name file descriptors fp, either
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE
|
#
1.23 |
|
11-Dec-2005 |
deraadt |
unused code and variables
|
Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.22 |
|
25-Feb-2005 |
deraadt |
spacing
|
Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
|
#
1.21 |
|
11-Jun-2003 |
deraadt |
de-register and ansify functions
|
#
1.20 |
|
02-Jun-2003 |
millert |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
Revision tags: OPENBSD_3_3_BASE
|
#
1.19 |
|
08-Jan-2003 |
deraadt |
bring in strlcpy and strlcat-like things for dealing with Char types, this fixes at least 15 buffer overflows; some help from dhartmei. Anyone want to go do the same in ksh, and help with some of the while (*s++ = *p++) loops in here?
|
Revision tags: OPENBSD_3_2_BASE
|
#
1.18 |
|
09-Jun-2002 |
todd |
knf
|
#
1.17 |
|
09-Jun-2002 |
deraadt |
spelling; moritz@jodeit.org
|
Revision tags: OPENBSD_3_1_BASE
|
#
1.16 |
|
19-Feb-2002 |
millert |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
|
#
1.15 |
|
16-Feb-2002 |
millert |
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.
|
Revision tags: OPENBSD_3_0_BASE
|
#
1.14 |
|
22-Jun-2001 |
deraadt |
mark signal races, and remove junk
|
Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
|
#
1.13 |
|
30-Oct-2000 |
millert |
Use mkstemp(3) for here document (<<) temporary files instead of $$ Problem noted by proton@ENERGYMECH.NET
|
#
1.12 |
|
04-Sep-2000 |
mickey |
even better fix for importpath(); from christos@zoulas.com; millert@ ok
|
#
1.11 |
|
30-Aug-2000 |
mickey |
prevent core dumps when stderror() is called before reslab is initialized
|
Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
|
#
1.10 |
|
21-Feb-1999 |
deraadt |
NUL not NULL
|
Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE
|
#
1.9 |
|
15-Nov-1997 |
todd |
spelling
|
Revision tags: OPENBSD_2_2_BASE
|
#
1.8 |
|
05-Aug-1997 |
deraadt |
make signal handlers errno safe
|
#
1.7 |
|
25-Jul-1997 |
mickey |
#if __STDC__ --> #ifdef __STDC__
|
#
1.6 |
|
23-Jul-1997 |
kstailey |
tabify
|
Revision tags: OPENBSD_2_1_BASE
|
#
1.5 |
|
02-Nov-1996 |
millert |
Update from NetBSD (christos) Quote all imported environment variables.
|
#
1.4 |
|
27-Oct-1996 |
millert |
compile
|
#
1.3 |
|
27-Oct-1996 |
millert |
Don't honor $HOME if >= MAXPATHLEN
|
Revision tags: OPENBSD_2_0_BASE
|
#
1.2 |
|
23-Jun-1996 |
deraadt |
update rcsid
|
#
1.1 |
|
18-Oct-1995 |
deraadt |
branches: 1.1.1; Initial revision
|
#
1.49 |
|
28-Jan-2022 |
guenther |
When it's the possessive of 'it', it's spelled "its", without the apostrophe.
|
#
1.48 |
|
05-Jan-2022 |
millert |
funopen(): change seekfn argument to use off_t, not fpos_t On BSD, fpos_t is typedef'd to off_t but some systems use a struct. This means fpos_t is not a portable function argument or return value. Both FreeBSD and the Linux libbsd funopen() have switched to off_t for this--we should too. From Joe Nelson. OK deraadt@
|
Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.47 |
|
30-Aug-2020 |
mortimer |
Fix multiple variable definitions to avoid errors with -fno-common.
ok millert@
|
Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
|
#
1.46 |
|
28-Jun-2019 |
deraadt |
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
|
Revision tags: OPENBSD_6_5_BASE
|
#
1.45 |
|
24-Oct-2018 |
martijn |
Fix some minor issues found by coverity.
OK millert@ and miko@
|
Revision tags: OPENBSD_6_4_BASE
|
#
1.44 |
|
08-Sep-2018 |
miko |
blkfree() takes no action for NULL pointer so callers can avoid checking.
ok jca@
|
Revision tags: OPENBSD_6_3_BASE
|
#
1.43 |
|
16-Dec-2017 |
anton |
Passing NULL to free() is fine; from Michael W. Bombardieri.
|
#
1.42 |
|
12-Dec-2017 |
tb |
Include hostname in shell prompts by default
With tmux, ssh and vmd, we tend to open shells on many different hosts simultaneously and the default prompts '$ ' and '# ' for {,k}sh as well as '% ' and '# ' for csh become dangerous: it's very easy to issue a command on the wrong host.
This can easily be avoided by displaying the hostname in the prompt. Everything beyond "hostname{$,#,%} " is going to be a matter of taste, so we left it at that. If you use an FQDN, only the first part (the output of 'hostname -s') will be printed.
requested by and ok deraadt; mostly positive feedback many ok anton, brynet, bcallah and others
|
Revision tags: OPENBSD_6_2_BASE
|
#
1.41 |
|
30-Aug-2017 |
anton |
Fix pasting of long (>BUFSIZ) lines in csh with filec enabled. NUL-terminating the input buffer instructs csh that the buffer contains a complete command. This is wrong and should only happen when buffer is not full, otherwise more data has to be read in order form a complete command.
While here, do not print the prompt again when the input exceeds the input buffer and while inserting a line continuation (backslash).
|
#
1.40 |
|
26-Jul-2017 |
anton |
Postpone printing of prompt if filec is enabled in csh. Any I/O should be performed first when canonical mode has been disabled on the tty just like ksh does. Discovered by the regress tests.
Joint work with bluhm@, ok deraadt@
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
|
#
1.39 |
|
19-Mar-2016 |
krw |
Turn off the close-on-exec bit with fcntl() instead of ioctl().
Remove some now useless "#include <ioctl.h>" lines.
Inspired by & ok millert@
|
#
1.38 |
|
18-Mar-2016 |
millert |
Replace ioctl(fd, FIOCLEX) with fcntl(fd, F_SETFD, FD_CLOEXEC) No functional change. "I like the idea" from guenther@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.37 |
|
26-Dec-2015 |
mestre |
Replace handrolled xfree() function by directly using free(3)
OK mmcc@
|
#
1.36 |
|
11-Nov-2015 |
deraadt |
exit() after perror() for pledge failure. Perhaps this got introduced as a test idiom, either when pledge was young or during the transition to strings.... dunno
|
#
1.35 |
|
28-Oct-2015 |
naddy |
unifdef _PATH_*
|
#
1.34 |
|
26-Oct-2015 |
naddy |
miscellaneous cruft: * remove lint * unifdef S_IFLNK, S_ISFIFO, S_ISLNK, S_ISSOCK, O_APPEND * remove 0, NOTUSED, notdef -- untouched since original import * remove IIASA
|
#
1.33 |
|
26-Oct-2015 |
naddy |
remove the profiling and debugging ifdefs; ok zhuk@
|
#
1.32 |
|
26-Oct-2015 |
naddy |
Clean up cruft made visible by the NLS unifdefing: * remove setlocale() calls * remove write-only variable AsciiOnly * remove now unused string constants STRLANG, STRLC_CTYPE * remove hardcoded support for ISO8859-1
ok millert@
|
#
1.31 |
|
26-Oct-2015 |
naddy |
unifdef BUILTIN (unused), NLS (always set), SHORT_STRINGS (always set) and remove a few unused defines; no binary changes; ok tedu@ zhuk@
|
#
1.30 |
|
22-Oct-2015 |
deraadt |
setlocale() before pledge()... until we learn more
|
#
1.29 |
|
18-Oct-2015 |
deraadt |
With TIOCSTI supported in pledge "tty proc", csh is good enough to run with pledge "stdio rpath wpath cpath fattr getpw proc exec tty". (Note that ksh "emacs mode" is also a abus^Wconsumer of TIOCSTI, but we had let that slide for a week since noone uses it...)
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.28 |
|
08-Feb-2015 |
tedu |
delete many more ptr_t casts
|
#
1.27 |
|
16-Jan-2015 |
deraadt |
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
|
#
1.26 |
|
16-Oct-2014 |
deraadt |
Use reallocarray() and remove a few archaic memory allocation practices. ok deraadt
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
|
#
1.25 |
|
27-Oct-2009 |
deraadt |
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
|
Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.24 |
|
18-Oct-2006 |
deraadt |
do not name file descriptors fp, either
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE
|
#
1.23 |
|
11-Dec-2005 |
deraadt |
unused code and variables
|
Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.22 |
|
25-Feb-2005 |
deraadt |
spacing
|
Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
|
#
1.21 |
|
11-Jun-2003 |
deraadt |
de-register and ansify functions
|
#
1.20 |
|
02-Jun-2003 |
millert |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
Revision tags: OPENBSD_3_3_BASE
|
#
1.19 |
|
08-Jan-2003 |
deraadt |
bring in strlcpy and strlcat-like things for dealing with Char types, this fixes at least 15 buffer overflows; some help from dhartmei. Anyone want to go do the same in ksh, and help with some of the while (*s++ = *p++) loops in here?
|
Revision tags: OPENBSD_3_2_BASE
|
#
1.18 |
|
09-Jun-2002 |
todd |
knf
|
#
1.17 |
|
09-Jun-2002 |
deraadt |
spelling; moritz@jodeit.org
|
Revision tags: OPENBSD_3_1_BASE
|
#
1.16 |
|
19-Feb-2002 |
millert |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
|
#
1.15 |
|
16-Feb-2002 |
millert |
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.
|
Revision tags: OPENBSD_3_0_BASE
|
#
1.14 |
|
22-Jun-2001 |
deraadt |
mark signal races, and remove junk
|
Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
|
#
1.13 |
|
30-Oct-2000 |
millert |
Use mkstemp(3) for here document (<<) temporary files instead of $$ Problem noted by proton@ENERGYMECH.NET
|
#
1.12 |
|
04-Sep-2000 |
mickey |
even better fix for importpath(); from christos@zoulas.com; millert@ ok
|
#
1.11 |
|
30-Aug-2000 |
mickey |
prevent core dumps when stderror() is called before reslab is initialized
|
Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
|
#
1.10 |
|
21-Feb-1999 |
deraadt |
NUL not NULL
|
Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE
|
#
1.9 |
|
15-Nov-1997 |
todd |
spelling
|
Revision tags: OPENBSD_2_2_BASE
|
#
1.8 |
|
05-Aug-1997 |
deraadt |
make signal handlers errno safe
|
#
1.7 |
|
25-Jul-1997 |
mickey |
#if __STDC__ --> #ifdef __STDC__
|
#
1.6 |
|
23-Jul-1997 |
kstailey |
tabify
|
Revision tags: OPENBSD_2_1_BASE
|
#
1.5 |
|
02-Nov-1996 |
millert |
Update from NetBSD (christos) Quote all imported environment variables.
|
#
1.4 |
|
27-Oct-1996 |
millert |
compile
|
#
1.3 |
|
27-Oct-1996 |
millert |
Don't honor $HOME if >= MAXPATHLEN
|
Revision tags: OPENBSD_2_0_BASE
|
#
1.2 |
|
23-Jun-1996 |
deraadt |
update rcsid
|
#
1.1 |
|
18-Oct-1995 |
deraadt |
branches: 1.1.1; Initial revision
|
#
1.48 |
|
05-Jan-2022 |
millert |
funopen(): change seekfn argument to use off_t, not fpos_t On BSD, fpos_t is typedef'd to off_t but some systems use a struct. This means fpos_t is not a portable function argument or return value. Both FreeBSD and the Linux libbsd funopen() have switched to off_t for this--we should too. From Joe Nelson. OK deraadt@
|
Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.47 |
|
30-Aug-2020 |
mortimer |
Fix multiple variable definitions to avoid errors with -fno-common.
ok millert@
|
Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
|
#
1.46 |
|
28-Jun-2019 |
deraadt |
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
|
Revision tags: OPENBSD_6_5_BASE
|
#
1.45 |
|
24-Oct-2018 |
martijn |
Fix some minor issues found by coverity.
OK millert@ and miko@
|
Revision tags: OPENBSD_6_4_BASE
|
#
1.44 |
|
08-Sep-2018 |
miko |
blkfree() takes no action for NULL pointer so callers can avoid checking.
ok jca@
|
Revision tags: OPENBSD_6_3_BASE
|
#
1.43 |
|
16-Dec-2017 |
anton |
Passing NULL to free() is fine; from Michael W. Bombardieri.
|
#
1.42 |
|
12-Dec-2017 |
tb |
Include hostname in shell prompts by default
With tmux, ssh and vmd, we tend to open shells on many different hosts simultaneously and the default prompts '$ ' and '# ' for {,k}sh as well as '% ' and '# ' for csh become dangerous: it's very easy to issue a command on the wrong host.
This can easily be avoided by displaying the hostname in the prompt. Everything beyond "hostname{$,#,%} " is going to be a matter of taste, so we left it at that. If you use an FQDN, only the first part (the output of 'hostname -s') will be printed.
requested by and ok deraadt; mostly positive feedback many ok anton, brynet, bcallah and others
|
Revision tags: OPENBSD_6_2_BASE
|
#
1.41 |
|
30-Aug-2017 |
anton |
Fix pasting of long (>BUFSIZ) lines in csh with filec enabled. NUL-terminating the input buffer instructs csh that the buffer contains a complete command. This is wrong and should only happen when buffer is not full, otherwise more data has to be read in order form a complete command.
While here, do not print the prompt again when the input exceeds the input buffer and while inserting a line continuation (backslash).
|
#
1.40 |
|
26-Jul-2017 |
anton |
Postpone printing of prompt if filec is enabled in csh. Any I/O should be performed first when canonical mode has been disabled on the tty just like ksh does. Discovered by the regress tests.
Joint work with bluhm@, ok deraadt@
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
|
#
1.39 |
|
19-Mar-2016 |
krw |
Turn off the close-on-exec bit with fcntl() instead of ioctl().
Remove some now useless "#include <ioctl.h>" lines.
Inspired by & ok millert@
|
#
1.38 |
|
18-Mar-2016 |
millert |
Replace ioctl(fd, FIOCLEX) with fcntl(fd, F_SETFD, FD_CLOEXEC) No functional change. "I like the idea" from guenther@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.37 |
|
26-Dec-2015 |
mestre |
Replace handrolled xfree() function by directly using free(3)
OK mmcc@
|
#
1.36 |
|
11-Nov-2015 |
deraadt |
exit() after perror() for pledge failure. Perhaps this got introduced as a test idiom, either when pledge was young or during the transition to strings.... dunno
|
#
1.35 |
|
28-Oct-2015 |
naddy |
unifdef _PATH_*
|
#
1.34 |
|
26-Oct-2015 |
naddy |
miscellaneous cruft: * remove lint * unifdef S_IFLNK, S_ISFIFO, S_ISLNK, S_ISSOCK, O_APPEND * remove 0, NOTUSED, notdef -- untouched since original import * remove IIASA
|
#
1.33 |
|
26-Oct-2015 |
naddy |
remove the profiling and debugging ifdefs; ok zhuk@
|
#
1.32 |
|
26-Oct-2015 |
naddy |
Clean up cruft made visible by the NLS unifdefing: * remove setlocale() calls * remove write-only variable AsciiOnly * remove now unused string constants STRLANG, STRLC_CTYPE * remove hardcoded support for ISO8859-1
ok millert@
|
#
1.31 |
|
26-Oct-2015 |
naddy |
unifdef BUILTIN (unused), NLS (always set), SHORT_STRINGS (always set) and remove a few unused defines; no binary changes; ok tedu@ zhuk@
|
#
1.30 |
|
22-Oct-2015 |
deraadt |
setlocale() before pledge()... until we learn more
|
#
1.29 |
|
18-Oct-2015 |
deraadt |
With TIOCSTI supported in pledge "tty proc", csh is good enough to run with pledge "stdio rpath wpath cpath fattr getpw proc exec tty". (Note that ksh "emacs mode" is also a abus^Wconsumer of TIOCSTI, but we had let that slide for a week since noone uses it...)
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.28 |
|
08-Feb-2015 |
tedu |
delete many more ptr_t casts
|
#
1.27 |
|
16-Jan-2015 |
deraadt |
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
|
#
1.26 |
|
16-Oct-2014 |
deraadt |
Use reallocarray() and remove a few archaic memory allocation practices. ok deraadt
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
|
#
1.25 |
|
27-Oct-2009 |
deraadt |
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
|
Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.24 |
|
18-Oct-2006 |
deraadt |
do not name file descriptors fp, either
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE
|
#
1.23 |
|
11-Dec-2005 |
deraadt |
unused code and variables
|
Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.22 |
|
25-Feb-2005 |
deraadt |
spacing
|
Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
|
#
1.21 |
|
11-Jun-2003 |
deraadt |
de-register and ansify functions
|
#
1.20 |
|
02-Jun-2003 |
millert |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
Revision tags: OPENBSD_3_3_BASE
|
#
1.19 |
|
08-Jan-2003 |
deraadt |
bring in strlcpy and strlcat-like things for dealing with Char types, this fixes at least 15 buffer overflows; some help from dhartmei. Anyone want to go do the same in ksh, and help with some of the while (*s++ = *p++) loops in here?
|
Revision tags: OPENBSD_3_2_BASE
|
#
1.18 |
|
09-Jun-2002 |
todd |
knf
|
#
1.17 |
|
09-Jun-2002 |
deraadt |
spelling; moritz@jodeit.org
|
Revision tags: OPENBSD_3_1_BASE
|
#
1.16 |
|
19-Feb-2002 |
millert |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
|
#
1.15 |
|
16-Feb-2002 |
millert |
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.
|
Revision tags: OPENBSD_3_0_BASE
|
#
1.14 |
|
22-Jun-2001 |
deraadt |
mark signal races, and remove junk
|
Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
|
#
1.13 |
|
30-Oct-2000 |
millert |
Use mkstemp(3) for here document (<<) temporary files instead of $$ Problem noted by proton@ENERGYMECH.NET
|
#
1.12 |
|
04-Sep-2000 |
mickey |
even better fix for importpath(); from christos@zoulas.com; millert@ ok
|
#
1.11 |
|
30-Aug-2000 |
mickey |
prevent core dumps when stderror() is called before reslab is initialized
|
Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
|
#
1.10 |
|
21-Feb-1999 |
deraadt |
NUL not NULL
|
Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE
|
#
1.9 |
|
15-Nov-1997 |
todd |
spelling
|
Revision tags: OPENBSD_2_2_BASE
|
#
1.8 |
|
05-Aug-1997 |
deraadt |
make signal handlers errno safe
|
#
1.7 |
|
25-Jul-1997 |
mickey |
#if __STDC__ --> #ifdef __STDC__
|
#
1.6 |
|
23-Jul-1997 |
kstailey |
tabify
|
Revision tags: OPENBSD_2_1_BASE
|
#
1.5 |
|
02-Nov-1996 |
millert |
Update from NetBSD (christos) Quote all imported environment variables.
|
#
1.4 |
|
27-Oct-1996 |
millert |
compile
|
#
1.3 |
|
27-Oct-1996 |
millert |
Don't honor $HOME if >= MAXPATHLEN
|
Revision tags: OPENBSD_2_0_BASE
|
#
1.2 |
|
23-Jun-1996 |
deraadt |
update rcsid
|
#
1.1 |
|
18-Oct-1995 |
deraadt |
branches: 1.1.1; Initial revision
|
#
1.47 |
|
30-Aug-2020 |
mortimer |
Fix multiple variable definitions to avoid errors with -fno-common.
ok millert@
|
Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
|
#
1.46 |
|
28-Jun-2019 |
deraadt |
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
|
Revision tags: OPENBSD_6_5_BASE
|
#
1.45 |
|
24-Oct-2018 |
martijn |
Fix some minor issues found by coverity.
OK millert@ and miko@
|
Revision tags: OPENBSD_6_4_BASE
|
#
1.44 |
|
08-Sep-2018 |
miko |
blkfree() takes no action for NULL pointer so callers can avoid checking.
ok jca@
|
Revision tags: OPENBSD_6_3_BASE
|
#
1.43 |
|
16-Dec-2017 |
anton |
Passing NULL to free() is fine; from Michael W. Bombardieri.
|
#
1.42 |
|
12-Dec-2017 |
tb |
Include hostname in shell prompts by default
With tmux, ssh and vmd, we tend to open shells on many different hosts simultaneously and the default prompts '$ ' and '# ' for {,k}sh as well as '% ' and '# ' for csh become dangerous: it's very easy to issue a command on the wrong host.
This can easily be avoided by displaying the hostname in the prompt. Everything beyond "hostname{$,#,%} " is going to be a matter of taste, so we left it at that. If you use an FQDN, only the first part (the output of 'hostname -s') will be printed.
requested by and ok deraadt; mostly positive feedback many ok anton, brynet, bcallah and others
|
Revision tags: OPENBSD_6_2_BASE
|
#
1.41 |
|
30-Aug-2017 |
anton |
Fix pasting of long (>BUFSIZ) lines in csh with filec enabled. NUL-terminating the input buffer instructs csh that the buffer contains a complete command. This is wrong and should only happen when buffer is not full, otherwise more data has to be read in order form a complete command.
While here, do not print the prompt again when the input exceeds the input buffer and while inserting a line continuation (backslash).
|
#
1.40 |
|
26-Jul-2017 |
anton |
Postpone printing of prompt if filec is enabled in csh. Any I/O should be performed first when canonical mode has been disabled on the tty just like ksh does. Discovered by the regress tests.
Joint work with bluhm@, ok deraadt@
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
|
#
1.39 |
|
19-Mar-2016 |
krw |
Turn off the close-on-exec bit with fcntl() instead of ioctl().
Remove some now useless "#include <ioctl.h>" lines.
Inspired by & ok millert@
|
#
1.38 |
|
18-Mar-2016 |
millert |
Replace ioctl(fd, FIOCLEX) with fcntl(fd, F_SETFD, FD_CLOEXEC) No functional change. "I like the idea" from guenther@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.37 |
|
26-Dec-2015 |
mestre |
Replace handrolled xfree() function by directly using free(3)
OK mmcc@
|
#
1.36 |
|
11-Nov-2015 |
deraadt |
exit() after perror() for pledge failure. Perhaps this got introduced as a test idiom, either when pledge was young or during the transition to strings.... dunno
|
#
1.35 |
|
28-Oct-2015 |
naddy |
unifdef _PATH_*
|
#
1.34 |
|
26-Oct-2015 |
naddy |
miscellaneous cruft: * remove lint * unifdef S_IFLNK, S_ISFIFO, S_ISLNK, S_ISSOCK, O_APPEND * remove 0, NOTUSED, notdef -- untouched since original import * remove IIASA
|
#
1.33 |
|
26-Oct-2015 |
naddy |
remove the profiling and debugging ifdefs; ok zhuk@
|
#
1.32 |
|
26-Oct-2015 |
naddy |
Clean up cruft made visible by the NLS unifdefing: * remove setlocale() calls * remove write-only variable AsciiOnly * remove now unused string constants STRLANG, STRLC_CTYPE * remove hardcoded support for ISO8859-1
ok millert@
|
#
1.31 |
|
26-Oct-2015 |
naddy |
unifdef BUILTIN (unused), NLS (always set), SHORT_STRINGS (always set) and remove a few unused defines; no binary changes; ok tedu@ zhuk@
|
#
1.30 |
|
22-Oct-2015 |
deraadt |
setlocale() before pledge()... until we learn more
|
#
1.29 |
|
18-Oct-2015 |
deraadt |
With TIOCSTI supported in pledge "tty proc", csh is good enough to run with pledge "stdio rpath wpath cpath fattr getpw proc exec tty". (Note that ksh "emacs mode" is also a abus^Wconsumer of TIOCSTI, but we had let that slide for a week since noone uses it...)
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.28 |
|
08-Feb-2015 |
tedu |
delete many more ptr_t casts
|
#
1.27 |
|
16-Jan-2015 |
deraadt |
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
|
#
1.26 |
|
16-Oct-2014 |
deraadt |
Use reallocarray() and remove a few archaic memory allocation practices. ok deraadt
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
|
#
1.25 |
|
27-Oct-2009 |
deraadt |
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
|
Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.24 |
|
18-Oct-2006 |
deraadt |
do not name file descriptors fp, either
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE
|
#
1.23 |
|
11-Dec-2005 |
deraadt |
unused code and variables
|
Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.22 |
|
25-Feb-2005 |
deraadt |
spacing
|
Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
|
#
1.21 |
|
11-Jun-2003 |
deraadt |
de-register and ansify functions
|
#
1.20 |
|
02-Jun-2003 |
millert |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
Revision tags: OPENBSD_3_3_BASE
|
#
1.19 |
|
08-Jan-2003 |
deraadt |
bring in strlcpy and strlcat-like things for dealing with Char types, this fixes at least 15 buffer overflows; some help from dhartmei. Anyone want to go do the same in ksh, and help with some of the while (*s++ = *p++) loops in here?
|
Revision tags: OPENBSD_3_2_BASE
|
#
1.18 |
|
09-Jun-2002 |
todd |
knf
|
#
1.17 |
|
09-Jun-2002 |
deraadt |
spelling; moritz@jodeit.org
|
Revision tags: OPENBSD_3_1_BASE
|
#
1.16 |
|
19-Feb-2002 |
millert |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
|
#
1.15 |
|
16-Feb-2002 |
millert |
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.
|
Revision tags: OPENBSD_3_0_BASE
|
#
1.14 |
|
22-Jun-2001 |
deraadt |
mark signal races, and remove junk
|
Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
|
#
1.13 |
|
30-Oct-2000 |
millert |
Use mkstemp(3) for here document (<<) temporary files instead of $$ Problem noted by proton@ENERGYMECH.NET
|
#
1.12 |
|
04-Sep-2000 |
mickey |
even better fix for importpath(); from christos@zoulas.com; millert@ ok
|
#
1.11 |
|
30-Aug-2000 |
mickey |
prevent core dumps when stderror() is called before reslab is initialized
|
Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
|
#
1.10 |
|
21-Feb-1999 |
deraadt |
NUL not NULL
|
Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE
|
#
1.9 |
|
15-Nov-1997 |
todd |
spelling
|
Revision tags: OPENBSD_2_2_BASE
|
#
1.8 |
|
05-Aug-1997 |
deraadt |
make signal handlers errno safe
|
#
1.7 |
|
25-Jul-1997 |
mickey |
#if __STDC__ --> #ifdef __STDC__
|
#
1.6 |
|
23-Jul-1997 |
kstailey |
tabify
|
Revision tags: OPENBSD_2_1_BASE
|
#
1.5 |
|
02-Nov-1996 |
millert |
Update from NetBSD (christos) Quote all imported environment variables.
|
#
1.4 |
|
27-Oct-1996 |
millert |
compile
|
#
1.3 |
|
27-Oct-1996 |
millert |
Don't honor $HOME if >= MAXPATHLEN
|
Revision tags: OPENBSD_2_0_BASE
|
#
1.2 |
|
23-Jun-1996 |
deraadt |
update rcsid
|
#
1.1 |
|
18-Oct-1995 |
deraadt |
branches: 1.1.1; Initial revision
|
#
1.46 |
|
28-Jun-2019 |
deraadt |
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
|
Revision tags: OPENBSD_6_5_BASE
|
#
1.45 |
|
24-Oct-2018 |
martijn |
Fix some minor issues found by coverity.
OK millert@ and miko@
|
Revision tags: OPENBSD_6_4_BASE
|
#
1.44 |
|
08-Sep-2018 |
miko |
blkfree() takes no action for NULL pointer so callers can avoid checking.
ok jca@
|
Revision tags: OPENBSD_6_3_BASE
|
#
1.43 |
|
16-Dec-2017 |
anton |
Passing NULL to free() is fine; from Michael W. Bombardieri.
|
#
1.42 |
|
12-Dec-2017 |
tb |
Include hostname in shell prompts by default
With tmux, ssh and vmd, we tend to open shells on many different hosts simultaneously and the default prompts '$ ' and '# ' for {,k}sh as well as '% ' and '# ' for csh become dangerous: it's very easy to issue a command on the wrong host.
This can easily be avoided by displaying the hostname in the prompt. Everything beyond "hostname{$,#,%} " is going to be a matter of taste, so we left it at that. If you use an FQDN, only the first part (the output of 'hostname -s') will be printed.
requested by and ok deraadt; mostly positive feedback many ok anton, brynet, bcallah and others
|
Revision tags: OPENBSD_6_2_BASE
|
#
1.41 |
|
30-Aug-2017 |
anton |
Fix pasting of long (>BUFSIZ) lines in csh with filec enabled. NUL-terminating the input buffer instructs csh that the buffer contains a complete command. This is wrong and should only happen when buffer is not full, otherwise more data has to be read in order form a complete command.
While here, do not print the prompt again when the input exceeds the input buffer and while inserting a line continuation (backslash).
|
#
1.40 |
|
26-Jul-2017 |
anton |
Postpone printing of prompt if filec is enabled in csh. Any I/O should be performed first when canonical mode has been disabled on the tty just like ksh does. Discovered by the regress tests.
Joint work with bluhm@, ok deraadt@
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
|
#
1.39 |
|
19-Mar-2016 |
krw |
Turn off the close-on-exec bit with fcntl() instead of ioctl().
Remove some now useless "#include <ioctl.h>" lines.
Inspired by & ok millert@
|
#
1.38 |
|
18-Mar-2016 |
millert |
Replace ioctl(fd, FIOCLEX) with fcntl(fd, F_SETFD, FD_CLOEXEC) No functional change. "I like the idea" from guenther@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.37 |
|
26-Dec-2015 |
mestre |
Replace handrolled xfree() function by directly using free(3)
OK mmcc@
|
#
1.36 |
|
11-Nov-2015 |
deraadt |
exit() after perror() for pledge failure. Perhaps this got introduced as a test idiom, either when pledge was young or during the transition to strings.... dunno
|
#
1.35 |
|
28-Oct-2015 |
naddy |
unifdef _PATH_*
|
#
1.34 |
|
26-Oct-2015 |
naddy |
miscellaneous cruft: * remove lint * unifdef S_IFLNK, S_ISFIFO, S_ISLNK, S_ISSOCK, O_APPEND * remove 0, NOTUSED, notdef -- untouched since original import * remove IIASA
|
#
1.33 |
|
26-Oct-2015 |
naddy |
remove the profiling and debugging ifdefs; ok zhuk@
|
#
1.32 |
|
26-Oct-2015 |
naddy |
Clean up cruft made visible by the NLS unifdefing: * remove setlocale() calls * remove write-only variable AsciiOnly * remove now unused string constants STRLANG, STRLC_CTYPE * remove hardcoded support for ISO8859-1
ok millert@
|
#
1.31 |
|
26-Oct-2015 |
naddy |
unifdef BUILTIN (unused), NLS (always set), SHORT_STRINGS (always set) and remove a few unused defines; no binary changes; ok tedu@ zhuk@
|
#
1.30 |
|
22-Oct-2015 |
deraadt |
setlocale() before pledge()... until we learn more
|
#
1.29 |
|
18-Oct-2015 |
deraadt |
With TIOCSTI supported in pledge "tty proc", csh is good enough to run with pledge "stdio rpath wpath cpath fattr getpw proc exec tty". (Note that ksh "emacs mode" is also a abus^Wconsumer of TIOCSTI, but we had let that slide for a week since noone uses it...)
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.28 |
|
08-Feb-2015 |
tedu |
delete many more ptr_t casts
|
#
1.27 |
|
16-Jan-2015 |
deraadt |
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
|
#
1.26 |
|
16-Oct-2014 |
deraadt |
Use reallocarray() and remove a few archaic memory allocation practices. ok deraadt
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
|
#
1.25 |
|
27-Oct-2009 |
deraadt |
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
|
Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.24 |
|
18-Oct-2006 |
deraadt |
do not name file descriptors fp, either
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE
|
#
1.23 |
|
11-Dec-2005 |
deraadt |
unused code and variables
|
Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.22 |
|
25-Feb-2005 |
deraadt |
spacing
|
Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
|
#
1.21 |
|
11-Jun-2003 |
deraadt |
de-register and ansify functions
|
#
1.20 |
|
02-Jun-2003 |
millert |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
Revision tags: OPENBSD_3_3_BASE
|
#
1.19 |
|
08-Jan-2003 |
deraadt |
bring in strlcpy and strlcat-like things for dealing with Char types, this fixes at least 15 buffer overflows; some help from dhartmei. Anyone want to go do the same in ksh, and help with some of the while (*s++ = *p++) loops in here?
|
Revision tags: OPENBSD_3_2_BASE
|
#
1.18 |
|
09-Jun-2002 |
todd |
knf
|
#
1.17 |
|
09-Jun-2002 |
deraadt |
spelling; moritz@jodeit.org
|
Revision tags: OPENBSD_3_1_BASE
|
#
1.16 |
|
19-Feb-2002 |
millert |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
|
#
1.15 |
|
16-Feb-2002 |
millert |
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.
|
Revision tags: OPENBSD_3_0_BASE
|
#
1.14 |
|
22-Jun-2001 |
deraadt |
mark signal races, and remove junk
|
Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
|
#
1.13 |
|
30-Oct-2000 |
millert |
Use mkstemp(3) for here document (<<) temporary files instead of $$ Problem noted by proton@ENERGYMECH.NET
|
#
1.12 |
|
04-Sep-2000 |
mickey |
even better fix for importpath(); from christos@zoulas.com; millert@ ok
|
#
1.11 |
|
30-Aug-2000 |
mickey |
prevent core dumps when stderror() is called before reslab is initialized
|
Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
|
#
1.10 |
|
21-Feb-1999 |
deraadt |
NUL not NULL
|
Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE
|
#
1.9 |
|
15-Nov-1997 |
todd |
spelling
|
Revision tags: OPENBSD_2_2_BASE
|
#
1.8 |
|
05-Aug-1997 |
deraadt |
make signal handlers errno safe
|
#
1.7 |
|
25-Jul-1997 |
mickey |
#if __STDC__ --> #ifdef __STDC__
|
#
1.6 |
|
23-Jul-1997 |
kstailey |
tabify
|
Revision tags: OPENBSD_2_1_BASE
|
#
1.5 |
|
02-Nov-1996 |
millert |
Update from NetBSD (christos) Quote all imported environment variables.
|
#
1.4 |
|
27-Oct-1996 |
millert |
compile
|
#
1.3 |
|
27-Oct-1996 |
millert |
Don't honor $HOME if >= MAXPATHLEN
|
Revision tags: OPENBSD_2_0_BASE
|
#
1.2 |
|
23-Jun-1996 |
deraadt |
update rcsid
|
#
1.1 |
|
18-Oct-1995 |
deraadt |
branches: 1.1.1; Initial revision
|
#
1.45 |
|
24-Oct-2018 |
martijn |
Fix some minor issues found by coverity.
OK millert@ and miko@
|
Revision tags: OPENBSD_6_4_BASE
|
#
1.44 |
|
08-Sep-2018 |
miko |
blkfree() takes no action for NULL pointer so callers can avoid checking.
ok jca@
|
Revision tags: OPENBSD_6_3_BASE
|
#
1.43 |
|
16-Dec-2017 |
anton |
Passing NULL to free() is fine; from Michael W. Bombardieri.
|
#
1.42 |
|
12-Dec-2017 |
tb |
Include hostname in shell prompts by default
With tmux, ssh and vmd, we tend to open shells on many different hosts simultaneously and the default prompts '$ ' and '# ' for {,k}sh as well as '% ' and '# ' for csh become dangerous: it's very easy to issue a command on the wrong host.
This can easily be avoided by displaying the hostname in the prompt. Everything beyond "hostname{$,#,%} " is going to be a matter of taste, so we left it at that. If you use an FQDN, only the first part (the output of 'hostname -s') will be printed.
requested by and ok deraadt; mostly positive feedback many ok anton, brynet, bcallah and others
|
Revision tags: OPENBSD_6_2_BASE
|
#
1.41 |
|
30-Aug-2017 |
anton |
Fix pasting of long (>BUFSIZ) lines in csh with filec enabled. NUL-terminating the input buffer instructs csh that the buffer contains a complete command. This is wrong and should only happen when buffer is not full, otherwise more data has to be read in order form a complete command.
While here, do not print the prompt again when the input exceeds the input buffer and while inserting a line continuation (backslash).
|
#
1.40 |
|
26-Jul-2017 |
anton |
Postpone printing of prompt if filec is enabled in csh. Any I/O should be performed first when canonical mode has been disabled on the tty just like ksh does. Discovered by the regress tests.
Joint work with bluhm@, ok deraadt@
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
|
#
1.39 |
|
19-Mar-2016 |
krw |
Turn off the close-on-exec bit with fcntl() instead of ioctl().
Remove some now useless "#include <ioctl.h>" lines.
Inspired by & ok millert@
|
#
1.38 |
|
18-Mar-2016 |
millert |
Replace ioctl(fd, FIOCLEX) with fcntl(fd, F_SETFD, FD_CLOEXEC) No functional change. "I like the idea" from guenther@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.37 |
|
26-Dec-2015 |
mestre |
Replace handrolled xfree() function by directly using free(3)
OK mmcc@
|
#
1.36 |
|
11-Nov-2015 |
deraadt |
exit() after perror() for pledge failure. Perhaps this got introduced as a test idiom, either when pledge was young or during the transition to strings.... dunno
|
#
1.35 |
|
28-Oct-2015 |
naddy |
unifdef _PATH_*
|
#
1.34 |
|
26-Oct-2015 |
naddy |
miscellaneous cruft: * remove lint * unifdef S_IFLNK, S_ISFIFO, S_ISLNK, S_ISSOCK, O_APPEND * remove 0, NOTUSED, notdef -- untouched since original import * remove IIASA
|
#
1.33 |
|
26-Oct-2015 |
naddy |
remove the profiling and debugging ifdefs; ok zhuk@
|
#
1.32 |
|
26-Oct-2015 |
naddy |
Clean up cruft made visible by the NLS unifdefing: * remove setlocale() calls * remove write-only variable AsciiOnly * remove now unused string constants STRLANG, STRLC_CTYPE * remove hardcoded support for ISO8859-1
ok millert@
|
#
1.31 |
|
26-Oct-2015 |
naddy |
unifdef BUILTIN (unused), NLS (always set), SHORT_STRINGS (always set) and remove a few unused defines; no binary changes; ok tedu@ zhuk@
|
#
1.30 |
|
22-Oct-2015 |
deraadt |
setlocale() before pledge()... until we learn more
|
#
1.29 |
|
18-Oct-2015 |
deraadt |
With TIOCSTI supported in pledge "tty proc", csh is good enough to run with pledge "stdio rpath wpath cpath fattr getpw proc exec tty". (Note that ksh "emacs mode" is also a abus^Wconsumer of TIOCSTI, but we had let that slide for a week since noone uses it...)
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.28 |
|
08-Feb-2015 |
tedu |
delete many more ptr_t casts
|
#
1.27 |
|
16-Jan-2015 |
deraadt |
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
|
#
1.26 |
|
16-Oct-2014 |
deraadt |
Use reallocarray() and remove a few archaic memory allocation practices. ok deraadt
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
|
#
1.25 |
|
27-Oct-2009 |
deraadt |
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
|
Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.24 |
|
18-Oct-2006 |
deraadt |
do not name file descriptors fp, either
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE
|
#
1.23 |
|
11-Dec-2005 |
deraadt |
unused code and variables
|
Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.22 |
|
25-Feb-2005 |
deraadt |
spacing
|
Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
|
#
1.21 |
|
11-Jun-2003 |
deraadt |
de-register and ansify functions
|
#
1.20 |
|
02-Jun-2003 |
millert |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
Revision tags: OPENBSD_3_3_BASE
|
#
1.19 |
|
08-Jan-2003 |
deraadt |
bring in strlcpy and strlcat-like things for dealing with Char types, this fixes at least 15 buffer overflows; some help from dhartmei. Anyone want to go do the same in ksh, and help with some of the while (*s++ = *p++) loops in here?
|
Revision tags: OPENBSD_3_2_BASE
|
#
1.18 |
|
09-Jun-2002 |
todd |
knf
|
#
1.17 |
|
09-Jun-2002 |
deraadt |
spelling; moritz@jodeit.org
|
Revision tags: OPENBSD_3_1_BASE
|
#
1.16 |
|
19-Feb-2002 |
millert |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
|
#
1.15 |
|
16-Feb-2002 |
millert |
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.
|
Revision tags: OPENBSD_3_0_BASE
|
#
1.14 |
|
22-Jun-2001 |
deraadt |
mark signal races, and remove junk
|
Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
|
#
1.13 |
|
30-Oct-2000 |
millert |
Use mkstemp(3) for here document (<<) temporary files instead of $$ Problem noted by proton@ENERGYMECH.NET
|
#
1.12 |
|
04-Sep-2000 |
mickey |
even better fix for importpath(); from christos@zoulas.com; millert@ ok
|
#
1.11 |
|
30-Aug-2000 |
mickey |
prevent core dumps when stderror() is called before reslab is initialized
|
Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
|
#
1.10 |
|
21-Feb-1999 |
deraadt |
NUL not NULL
|
Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE
|
#
1.9 |
|
15-Nov-1997 |
todd |
spelling
|
Revision tags: OPENBSD_2_2_BASE
|
#
1.8 |
|
05-Aug-1997 |
deraadt |
make signal handlers errno safe
|
#
1.7 |
|
25-Jul-1997 |
mickey |
#if __STDC__ --> #ifdef __STDC__
|
#
1.6 |
|
23-Jul-1997 |
kstailey |
tabify
|
Revision tags: OPENBSD_2_1_BASE
|
#
1.5 |
|
02-Nov-1996 |
millert |
Update from NetBSD (christos) Quote all imported environment variables.
|
#
1.4 |
|
27-Oct-1996 |
millert |
compile
|
#
1.3 |
|
27-Oct-1996 |
millert |
Don't honor $HOME if >= MAXPATHLEN
|
Revision tags: OPENBSD_2_0_BASE
|
#
1.2 |
|
23-Jun-1996 |
deraadt |
update rcsid
|
#
1.1 |
|
18-Oct-1995 |
deraadt |
branches: 1.1.1; Initial revision
|
#
1.44 |
|
08-Sep-2018 |
miko |
blkfree() takes no action for NULL pointer so callers can avoid checking.
ok jca@
|
Revision tags: OPENBSD_6_3_BASE
|
#
1.43 |
|
16-Dec-2017 |
anton |
Passing NULL to free() is fine; from Michael W. Bombardieri.
|
#
1.42 |
|
12-Dec-2017 |
tb |
Include hostname in shell prompts by default
With tmux, ssh and vmd, we tend to open shells on many different hosts simultaneously and the default prompts '$ ' and '# ' for {,k}sh as well as '% ' and '# ' for csh become dangerous: it's very easy to issue a command on the wrong host.
This can easily be avoided by displaying the hostname in the prompt. Everything beyond "hostname{$,#,%} " is going to be a matter of taste, so we left it at that. If you use an FQDN, only the first part (the output of 'hostname -s') will be printed.
requested by and ok deraadt; mostly positive feedback many ok anton, brynet, bcallah and others
|
Revision tags: OPENBSD_6_2_BASE
|
#
1.41 |
|
30-Aug-2017 |
anton |
Fix pasting of long (>BUFSIZ) lines in csh with filec enabled. NUL-terminating the input buffer instructs csh that the buffer contains a complete command. This is wrong and should only happen when buffer is not full, otherwise more data has to be read in order form a complete command.
While here, do not print the prompt again when the input exceeds the input buffer and while inserting a line continuation (backslash).
|
#
1.40 |
|
26-Jul-2017 |
anton |
Postpone printing of prompt if filec is enabled in csh. Any I/O should be performed first when canonical mode has been disabled on the tty just like ksh does. Discovered by the regress tests.
Joint work with bluhm@, ok deraadt@
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
|
#
1.39 |
|
19-Mar-2016 |
krw |
Turn off the close-on-exec bit with fcntl() instead of ioctl().
Remove some now useless "#include <ioctl.h>" lines.
Inspired by & ok millert@
|
#
1.38 |
|
18-Mar-2016 |
millert |
Replace ioctl(fd, FIOCLEX) with fcntl(fd, F_SETFD, FD_CLOEXEC) No functional change. "I like the idea" from guenther@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.37 |
|
26-Dec-2015 |
mestre |
Replace handrolled xfree() function by directly using free(3)
OK mmcc@
|
#
1.36 |
|
11-Nov-2015 |
deraadt |
exit() after perror() for pledge failure. Perhaps this got introduced as a test idiom, either when pledge was young or during the transition to strings.... dunno
|
#
1.35 |
|
28-Oct-2015 |
naddy |
unifdef _PATH_*
|
#
1.34 |
|
26-Oct-2015 |
naddy |
miscellaneous cruft: * remove lint * unifdef S_IFLNK, S_ISFIFO, S_ISLNK, S_ISSOCK, O_APPEND * remove 0, NOTUSED, notdef -- untouched since original import * remove IIASA
|
#
1.33 |
|
26-Oct-2015 |
naddy |
remove the profiling and debugging ifdefs; ok zhuk@
|
#
1.32 |
|
26-Oct-2015 |
naddy |
Clean up cruft made visible by the NLS unifdefing: * remove setlocale() calls * remove write-only variable AsciiOnly * remove now unused string constants STRLANG, STRLC_CTYPE * remove hardcoded support for ISO8859-1
ok millert@
|
#
1.31 |
|
26-Oct-2015 |
naddy |
unifdef BUILTIN (unused), NLS (always set), SHORT_STRINGS (always set) and remove a few unused defines; no binary changes; ok tedu@ zhuk@
|
#
1.30 |
|
22-Oct-2015 |
deraadt |
setlocale() before pledge()... until we learn more
|
#
1.29 |
|
18-Oct-2015 |
deraadt |
With TIOCSTI supported in pledge "tty proc", csh is good enough to run with pledge "stdio rpath wpath cpath fattr getpw proc exec tty". (Note that ksh "emacs mode" is also a abus^Wconsumer of TIOCSTI, but we had let that slide for a week since noone uses it...)
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.28 |
|
08-Feb-2015 |
tedu |
delete many more ptr_t casts
|
#
1.27 |
|
16-Jan-2015 |
deraadt |
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
|
#
1.26 |
|
16-Oct-2014 |
deraadt |
Use reallocarray() and remove a few archaic memory allocation practices. ok deraadt
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
|
#
1.25 |
|
27-Oct-2009 |
deraadt |
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
|
Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.24 |
|
18-Oct-2006 |
deraadt |
do not name file descriptors fp, either
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE
|
#
1.23 |
|
11-Dec-2005 |
deraadt |
unused code and variables
|
Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.22 |
|
25-Feb-2005 |
deraadt |
spacing
|
Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
|
#
1.21 |
|
11-Jun-2003 |
deraadt |
de-register and ansify functions
|
#
1.20 |
|
02-Jun-2003 |
millert |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
Revision tags: OPENBSD_3_3_BASE
|
#
1.19 |
|
08-Jan-2003 |
deraadt |
bring in strlcpy and strlcat-like things for dealing with Char types, this fixes at least 15 buffer overflows; some help from dhartmei. Anyone want to go do the same in ksh, and help with some of the while (*s++ = *p++) loops in here?
|
Revision tags: OPENBSD_3_2_BASE
|
#
1.18 |
|
09-Jun-2002 |
todd |
knf
|
#
1.17 |
|
09-Jun-2002 |
deraadt |
spelling; moritz@jodeit.org
|
Revision tags: OPENBSD_3_1_BASE
|
#
1.16 |
|
19-Feb-2002 |
millert |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
|
#
1.15 |
|
16-Feb-2002 |
millert |
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.
|
Revision tags: OPENBSD_3_0_BASE
|
#
1.14 |
|
22-Jun-2001 |
deraadt |
mark signal races, and remove junk
|
Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
|
#
1.13 |
|
30-Oct-2000 |
millert |
Use mkstemp(3) for here document (<<) temporary files instead of $$ Problem noted by proton@ENERGYMECH.NET
|
#
1.12 |
|
04-Sep-2000 |
mickey |
even better fix for importpath(); from christos@zoulas.com; millert@ ok
|
#
1.11 |
|
30-Aug-2000 |
mickey |
prevent core dumps when stderror() is called before reslab is initialized
|
Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
|
#
1.10 |
|
21-Feb-1999 |
deraadt |
NUL not NULL
|
Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE
|
#
1.9 |
|
15-Nov-1997 |
todd |
spelling
|
Revision tags: OPENBSD_2_2_BASE
|
#
1.8 |
|
05-Aug-1997 |
deraadt |
make signal handlers errno safe
|
#
1.7 |
|
25-Jul-1997 |
mickey |
#if __STDC__ --> #ifdef __STDC__
|
#
1.6 |
|
23-Jul-1997 |
kstailey |
tabify
|
Revision tags: OPENBSD_2_1_BASE
|
#
1.5 |
|
02-Nov-1996 |
millert |
Update from NetBSD (christos) Quote all imported environment variables.
|
#
1.4 |
|
27-Oct-1996 |
millert |
compile
|
#
1.3 |
|
27-Oct-1996 |
millert |
Don't honor $HOME if >= MAXPATHLEN
|
Revision tags: OPENBSD_2_0_BASE
|
#
1.2 |
|
23-Jun-1996 |
deraadt |
update rcsid
|
#
1.1 |
|
18-Oct-1995 |
deraadt |
branches: 1.1.1; Initial revision
|
#
1.43 |
|
16-Dec-2017 |
anton |
Passing NULL to free() is fine; from Michael W. Bombardieri.
|
#
1.42 |
|
12-Dec-2017 |
tb |
Include hostname in shell prompts by default
With tmux, ssh and vmd, we tend to open shells on many different hosts simultaneously and the default prompts '$ ' and '# ' for {,k}sh as well as '% ' and '# ' for csh become dangerous: it's very easy to issue a command on the wrong host.
This can easily be avoided by displaying the hostname in the prompt. Everything beyond "hostname{$,#,%} " is going to be a matter of taste, so we left it at that. If you use an FQDN, only the first part (the output of 'hostname -s') will be printed.
requested by and ok deraadt; mostly positive feedback many ok anton, brynet, bcallah and others
|
Revision tags: OPENBSD_6_2_BASE
|
#
1.41 |
|
30-Aug-2017 |
anton |
Fix pasting of long (>BUFSIZ) lines in csh with filec enabled. NUL-terminating the input buffer instructs csh that the buffer contains a complete command. This is wrong and should only happen when buffer is not full, otherwise more data has to be read in order form a complete command.
While here, do not print the prompt again when the input exceeds the input buffer and while inserting a line continuation (backslash).
|
#
1.40 |
|
26-Jul-2017 |
anton |
Postpone printing of prompt if filec is enabled in csh. Any I/O should be performed first when canonical mode has been disabled on the tty just like ksh does. Discovered by the regress tests.
Joint work with bluhm@, ok deraadt@
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
|
#
1.39 |
|
19-Mar-2016 |
krw |
Turn off the close-on-exec bit with fcntl() instead of ioctl().
Remove some now useless "#include <ioctl.h>" lines.
Inspired by & ok millert@
|
#
1.38 |
|
18-Mar-2016 |
millert |
Replace ioctl(fd, FIOCLEX) with fcntl(fd, F_SETFD, FD_CLOEXEC) No functional change. "I like the idea" from guenther@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.37 |
|
26-Dec-2015 |
mestre |
Replace handrolled xfree() function by directly using free(3)
OK mmcc@
|
#
1.36 |
|
11-Nov-2015 |
deraadt |
exit() after perror() for pledge failure. Perhaps this got introduced as a test idiom, either when pledge was young or during the transition to strings.... dunno
|
#
1.35 |
|
28-Oct-2015 |
naddy |
unifdef _PATH_*
|
#
1.34 |
|
26-Oct-2015 |
naddy |
miscellaneous cruft: * remove lint * unifdef S_IFLNK, S_ISFIFO, S_ISLNK, S_ISSOCK, O_APPEND * remove 0, NOTUSED, notdef -- untouched since original import * remove IIASA
|
#
1.33 |
|
26-Oct-2015 |
naddy |
remove the profiling and debugging ifdefs; ok zhuk@
|
#
1.32 |
|
26-Oct-2015 |
naddy |
Clean up cruft made visible by the NLS unifdefing: * remove setlocale() calls * remove write-only variable AsciiOnly * remove now unused string constants STRLANG, STRLC_CTYPE * remove hardcoded support for ISO8859-1
ok millert@
|
#
1.31 |
|
26-Oct-2015 |
naddy |
unifdef BUILTIN (unused), NLS (always set), SHORT_STRINGS (always set) and remove a few unused defines; no binary changes; ok tedu@ zhuk@
|
#
1.30 |
|
22-Oct-2015 |
deraadt |
setlocale() before pledge()... until we learn more
|
#
1.29 |
|
18-Oct-2015 |
deraadt |
With TIOCSTI supported in pledge "tty proc", csh is good enough to run with pledge "stdio rpath wpath cpath fattr getpw proc exec tty". (Note that ksh "emacs mode" is also a abus^Wconsumer of TIOCSTI, but we had let that slide for a week since noone uses it...)
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.28 |
|
08-Feb-2015 |
tedu |
delete many more ptr_t casts
|
#
1.27 |
|
16-Jan-2015 |
deraadt |
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
|
#
1.26 |
|
16-Oct-2014 |
deraadt |
Use reallocarray() and remove a few archaic memory allocation practices. ok deraadt
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
|
#
1.25 |
|
27-Oct-2009 |
deraadt |
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
|
Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.24 |
|
18-Oct-2006 |
deraadt |
do not name file descriptors fp, either
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE
|
#
1.23 |
|
11-Dec-2005 |
deraadt |
unused code and variables
|
Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.22 |
|
25-Feb-2005 |
deraadt |
spacing
|
Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
|
#
1.21 |
|
11-Jun-2003 |
deraadt |
de-register and ansify functions
|
#
1.20 |
|
02-Jun-2003 |
millert |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
Revision tags: OPENBSD_3_3_BASE
|
#
1.19 |
|
08-Jan-2003 |
deraadt |
bring in strlcpy and strlcat-like things for dealing with Char types, this fixes at least 15 buffer overflows; some help from dhartmei. Anyone want to go do the same in ksh, and help with some of the while (*s++ = *p++) loops in here?
|
Revision tags: OPENBSD_3_2_BASE
|
#
1.18 |
|
09-Jun-2002 |
todd |
knf
|
#
1.17 |
|
09-Jun-2002 |
deraadt |
spelling; moritz@jodeit.org
|
Revision tags: OPENBSD_3_1_BASE
|
#
1.16 |
|
19-Feb-2002 |
millert |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
|
#
1.15 |
|
16-Feb-2002 |
millert |
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.
|
Revision tags: OPENBSD_3_0_BASE
|
#
1.14 |
|
22-Jun-2001 |
deraadt |
mark signal races, and remove junk
|
Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
|
#
1.13 |
|
30-Oct-2000 |
millert |
Use mkstemp(3) for here document (<<) temporary files instead of $$ Problem noted by proton@ENERGYMECH.NET
|
#
1.12 |
|
04-Sep-2000 |
mickey |
even better fix for importpath(); from christos@zoulas.com; millert@ ok
|
#
1.11 |
|
30-Aug-2000 |
mickey |
prevent core dumps when stderror() is called before reslab is initialized
|
Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
|
#
1.10 |
|
21-Feb-1999 |
deraadt |
NUL not NULL
|
Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE
|
#
1.9 |
|
15-Nov-1997 |
todd |
spelling
|
Revision tags: OPENBSD_2_2_BASE
|
#
1.8 |
|
05-Aug-1997 |
deraadt |
make signal handlers errno safe
|
#
1.7 |
|
25-Jul-1997 |
mickey |
#if __STDC__ --> #ifdef __STDC__
|
#
1.6 |
|
23-Jul-1997 |
kstailey |
tabify
|
Revision tags: OPENBSD_2_1_BASE
|
#
1.5 |
|
02-Nov-1996 |
millert |
Update from NetBSD (christos) Quote all imported environment variables.
|
#
1.4 |
|
27-Oct-1996 |
millert |
compile
|
#
1.3 |
|
27-Oct-1996 |
millert |
Don't honor $HOME if >= MAXPATHLEN
|
Revision tags: OPENBSD_2_0_BASE
|
#
1.2 |
|
23-Jun-1996 |
deraadt |
update rcsid
|
#
1.1 |
|
18-Oct-1995 |
deraadt |
branches: 1.1.1; Initial revision
|