summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
2016-06-03new style overlords say to use continue in empty loops.Ted Unangst
this is easier to see and self documenting. ok openbsd
2016-06-01put this in the public domain as well. reminded by theo. we discussedMarc Espie
this before previous release, and I plain forgot about it.
2016-05-10Fix operator precedence error; OK guenther@ millert@Tim van der Molen
2016-05-04Correct the description of the != operator in arithmetic expansion;Ingo Schwarze
from Andras Farkas <deepbluemistake at gmail dot com>.
2016-05-04line editing correction; from andras farkasJason McIntyre
2016-04-27Do not handle echo "`echo \"hi\"`" in POSIX mode differently than inChristian Weisgerber
traditional mode. This aligns ksh's behavior with bash and FreeBSD sh. The interpretation of the POSIX text is disputed, but it is unlikely that a change from the traditional behavior was intended. ok millert@
2016-04-25remove list item left in previous;Jason McIntyre
2016-04-25remove references to systraceTed Unangst
2016-04-25boom goes the dynamiteTed Unangst
2016-04-25unlink systrace from the build. pledge is the glorious future that awaits.Ted Unangst
the rest of systrace to be deleted in a serious of followup commits. ok from larger openbsd developer community
2016-04-19Switch from fgetln() to getline() to simplify error handling.Philip Guenther
Use syswarn() in more places which set errno and regularize the error messages. Skip empty lines in the input read for tar -T, cpio -E, and cpio stdin. based on diff from mmcc@ ok millert@
2016-04-16Change last non-/gnu/ fcntl(x, F_GETFL, 0) strays to fcntl(x, F_GETFL).Kenneth R Westerback
No functional change. ok millert@
2016-04-15don't allow removal of /. more robust approach involving stat this time.Ted Unangst
posix uses the language "resolves to the root directory" in this case. ok millert
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2016-03-28remove unused variableCharles Longeau
ok schwarze@
2016-03-27actually remove unnecessary includesMichael McConville
from Edgar Pettijohn, ok and with input from tb@
2016-03-23header cleanupmmcc
from Edgar Pettijohn, with a correction from deraadt@
2016-03-22header cleanupmmcc
from Edgar Pettijohn, correction from deraadt@
2016-03-21More ksh POSIX compliance fixes by Martijn Dekker:tb
This simple patch makes the 'command' builtin POSIX-compliant and consistent with other current shells. It fixes two things: a) 'command -v' does not find shell reserved words (a.k.a. keywords). For instance, 'command -v select' outputs nothing but should output 'select'. b) 'command -pv' always outputs the path of an external command, even if 'command -p' would execute a builtin. For instance, 'command -p kill' executes the 'kill' builtin, as expected, but 'command -pv kill' outputs '/bin/kill'. The '-v' option is supposed to reflect what would actually be executed, so 'command -pv kill' should output 'kill'. The -p option sets the PATH to a default system value before doing the search, but that has no bearing on the fact that builtins take precedence over external commands. The patch fixes both issues for 'command' without affecting the behaviour of the ksh-specific builtin 'whence', which is handled by the same C function. Regression test added to obsd-regress.t. Issues found and fixed by Martijn Dekker, ok millert@
2016-03-20Use fcntl(fd, F_SETFL, flags) to clear O_NONBLOCK instead ofTodd C. Miller
ioctl(fd, FIONBIO, ...). OK krw@
2016-03-20Currently we have about a 50/50 split over fcntl(n, F_GETFL [,0])Kenneth R Westerback
idioms. Adopt the more concise fcntl(n, F_GETFL) over fcntl(n, F_GETFL, 0) where it is obvious further investigation will not yield and even better way. Obviousness evaluation and ok guenther@
2016-03-19Turn off the close-on-exec bit with fcntl() instead of ioctl().Kenneth R Westerback
Remove some now useless "#include <ioctl.h>" lines. Inspired by & ok millert@
2016-03-18Replace ioctl(fd, FIOCLEX) with fcntl(fd, F_SETFD, FD_CLOEXEC)Todd C. Miller
No functional change. "I like the idea" from guenther@
2016-03-17remove some ARGSUSEDmmcc
2016-03-17simplify previous; ok bentleyJason McIntyre
2016-03-17Switch (non-curses, non-ksh) programs that use COLUMNS to a single idiom.Anthony J. Bentley
Previously behaviors were all over the map. This changes them to use COLUMNS first, and either terminal width or a hardcoded value (typically 80) as appropriate. ok deraadt@; man bits ok jmc@
2016-03-14replace __progname with getprogname(3)mmcc
from Michal Mazurek, ok tb@
2016-03-11Mark up COLUMNS as an environment variable.Anthony J. Bentley
ok jmc@ schwarze@
2016-03-07Make cp -i behave as mv -i or rm -i, independently of whether stdintb
is a tty or not. From Timo Buhrmester. ok jca@
2016-03-07simplify print formatting logic, replace exit() in main() with returnmmcc
from Michal Mazurek, ok tb@
2016-03-06tweak previous a little;Jason McIntyre
2016-03-06Make set +o conform with POSIX.natano
It should be possible to use set +o to save the current shell options, then modify them at will and later restore them to the saved value. Therefore the output must not only contain the options which are currently set, but also the ones that are _not_ set, so a restore disables them if they are enabled. from Martijn Dekker (martijn (at) inlv (dot) org) ok sthen@, tb@
2016-03-05POSIX-compliant behavior of "set -u" regarding "$*" and "$@" specialsDmitrij Czarkoff
All work done by Martijn Dekker OK millert@
2016-03-04Fix a typo. The command is to get the default system PATH valueTodd C. Miller
is "getconf PATH" not "getconf CS_PATH".
2016-03-04remove CSRG BSD-licensed mknod builtin code which was previously used toTheo de Raadt
accelerate install/upgrade time MAKEDEV runs. That allows ramdisk ksh to be pledged, without needing "dpath". We'll solve the performance issues a different way (soon). ok otto espie natano tb tobiasu rpe
2016-03-04don't parse (...|...) patterns in variable substitution inside double quotesDmitrij Czarkoff
fixes posix compatibility issue OK millert@, nicm@, otto@
2016-03-01tidy up function declarations and definitionsmmcc
from Michal Mazurek, ok tb@
2016-03-01remove unneeded includesmmcc
from Michal Mazurek, ok tb@
2016-03-01drop Linux emulation support; ok sthen@ visa@Christian Weisgerber
2016-02-16Ignore trailing slashes and skip over duplicate slashes in chk_path() toPhilip Guenther
avoid infinite loop when creating intermediate directories Fix based on diff by Nicolas Bedos (nicolas.bedos (at) gmail.com) ok millert@ ok and tweak zhuk@,
2016-02-15To archive a 101 character absolute path in ustar format we mustPhilip Guenther
split it on a slash other than the leading one. Fix based on patches from Peter Fokker (openbsd (at) berestijn.nl) and Peter Bisroev (peter (at) int19h.net)
2016-02-08remove needless headersmmcc
ok tb@, from Michal Mazurek
2016-02-01stop linking mv(1) to libutil, since that isn't used.Gleydson Soares
OK guenther@ nicm@
2016-02-01style nit - do not add a space between function name and bracketGleydson Soares
from Edgar Pettijohn <edgar at pettijohn-web.com> fix another similar space in line 127. (pointed out by/OK jung@) OK tb@ jung@
2016-02-01- make usage() static and __deadGleydson Soares
- while here switch main to return instead of exit(3) OK tedu@
2016-01-29Therefor -> Therefore (where appropriate)tb
from ray@, ok jmc@
2016-01-26remove a useless macrommcc
ok nicm@
2016-01-18Fix a regression (and POSIX violation) introduced with UTF-8 support:Ingo Schwarze
When neither running on a terminal nor with -q, names must be passed through as they are, nothing must be replaced with question marks. Effectively, -q was always in effect. SMALL was not affected. Triggered by a different patch from Martijn van Duren <openbsd plus tech at list dot imperialat dot at>, who confirmed that this version is better. Identified as a regression by tedu@. OK sthen@.
2016-01-15Initialize a struct kill_info and an associated int in the declarationsmmcc
instead of scattering their initialization through the body. This makes the body simpler and avoids an uninitialized use false positive. ok nicm@
2016-01-13fix exit status on pledge fail, eval here should be 2.Gleydson Soares
OK tb@