aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* SECURITY.Ruslan Ermilov2001-09-042-40/+42
| | | | | | | | | | | | | | | | Fixed macros for temporarily relinquishing and restoring setuid/setgid privileges so that they never change the real user and group IDs of the calling process. The setre[ug]id() calls are still used in the REDUCE_PERM macro (with the r[ug]id arguments of -1) so that the call changes the saved user and group IDs of the process to that specified. Also, the panic() and perr() functions had insufficient privileges to delete the problematic file under /var/at. Notes: svn path=/head/; revision=82973
* The implementation of -flags was broken and did not match the (poorly)Ruslan Ermilov2001-09-043-31/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | documented behavior. Only a certain set of file flags were recognized, and "no" flags did not match files that have corresponding flags bits turned off. Fix and extend the -flags functionality as follows: : -flags [-|+]<flags>,<notflags> : The flags are specified using symbolic names (see chflags(1)). : Those with the "no" prefix (except "nodump") are said to be : <notflags>. Flags in <flags> are checked to be set, and flags in : <notflags> are checked to be not set. Note that this is different : from -perm, which only allows the user to specify mode bits that : are set. : : If flags are preceded by a dash (``-''), this primary evaluates : to true if at least all of the bits in <flags> and none of the bits : in <notflags> are set in the file's flags bits. If flags are pre- : ceded by a plus (``+''), this primary evaluates to true if any of : the bits in <flags> is set in the file's flags bits, or any of the : bits in <notflags> is not set in the file's flags bits. Otherwise, : this primary evaluates to true if the bits in <flags> exactly match : the file's flags bits, and none of the <flags> bits match those of : <notflags>. MFC after: 2 weeks Notes: svn path=/head/; revision=82972
* mdoc(7) police: tighten label width.Ruslan Ermilov2001-09-041-1/+1
| | | | Notes: svn path=/head/; revision=82956
* Use the correct blocksize when invoked with both -h and -kRobert Drehmel2001-09-041-1/+2
| | | | | | | | | | options. PR: 30275 Reviewed by: jake Notes: svn path=/head/; revision=82947
* File positions are off_t nowdays, not long, so:Andrey A. Chernov2001-09-031-13/+13
| | | | | | | | | | | | | | | | | fseek -> fseeko ftell -> ftello fseek(x, 0L, 0) -> rewind(x) NOTE: that fseek/ftell not works for >long offsets per POSIX: [EOVERFLOW] For fseek( ), the resulting file offset would be a value which cannot be represented correctly in an object of type long. [EOVERFLOW] For ftell ( ), the current file offset cannot be represented correctly in an object of type long. Notes: svn path=/head/; revision=82846
* File positions are off_t nowdays, not long, so:Andrey A. Chernov2001-09-024-7/+8
| | | | | | | | | | | | | | | | fseek -> fseeko ftell -> ftello NOTE: fseek/ftell not works for >long offsets per POSIX: [EOVERFLOW] For fseek( ), the resulting file offset would be a value which cannot be represented correctly in an object of type long. [EOVERFLOW] For ftell ( ), the current file offset cannot be represented correctly in an object of type long. Notes: svn path=/head/; revision=82793
* strtol -> strtoll (for off_t file size)Andrey A. Chernov2001-09-011-1/+1
| | | | Notes: svn path=/head/; revision=82772
* File positions are off_t nowdays, not long, so:Andrey A. Chernov2001-09-011-5/+5
| | | | | | | | | | | | | long -> off_t fseek -> fseeko NOTE: that fseek not works for >long offsets files per POSIX: [EOVERFLOW] For fseek( ), the resulting file offset would be a value which cannot be represented correctly in an object of type long. Notes: svn path=/head/; revision=82767
* File positions are off_t nowdays, not long, so:Andrey A. Chernov2001-09-013-3/+3
| | | | | | | | | | | | | strtol -> strtoll fseek -> fseeko NOTE: that fseek not works for >long offsets files per POSIX: [EOVERFLOW] For fseek( ), the resulting file offset would be a value which cannot be represented correctly in an object of type long. Notes: svn path=/head/; revision=82766
* File positions are off_t nowdays, not long, so:Andrey A. Chernov2001-09-014-14/+14
| | | | | | | | | | | | | | long -> off_t strtol -> strtoll fseek -> fseeko NOTE: that fseek not works for >long offsets files per POSIX: [EOVERFLOW] For fseek( ), the resulting file offset would be a value which cannot be represented correctly in an object of type long. Notes: svn path=/head/; revision=82762
* Remove some unsafe function calls from the signal handlers.Kris Kennaway2001-09-011-6/+14
| | | | | | | | | Obtained from: OpenBSD Reviewed by: audit MFC after: 2 weeks Notes: svn path=/head/; revision=82722
* Exit gracefully when a SIGHUP is received. This prevents ee from going intoMark Peek2001-08-311-0/+1
| | | | | | | | | | | an infinite spin loop when the terminal window is forcibly blown away. PR: 29553 Reported by: Sung N. Cho <sucho2@vt.edu> MFC after: 1 day Notes: svn path=/head/; revision=82694
* SECURITY: Drop `setgid kmem' bit as early as possible.Ruslan Ermilov2001-08-313-0/+3
| | | | Notes: svn path=/head/; revision=82664
* Sort predicates.Ruslan Ermilov2001-08-311-70/+70
| | | | | | | PR: docs/30237 Notes: svn path=/head/; revision=82662
* Add myself.Jose M. Alcaide2001-08-311-0/+1
| | | | Notes: svn path=/head/; revision=82649
* Make my Grandfather famous by showing the world my middle name,Adrian Chadd2001-08-311-1/+1
| | | | | | | | | as seems to be the trend. (Thanks Josef. :-) Notes: svn path=/head/; revision=82608
* Revert the previous delta and apply a better fix which correctsMike Barcroft2001-08-301-9/+5
| | | | | | | | | a check on the final snprintf and reduces duplicated code. Submitted by: brian Notes: svn path=/head/; revision=82579
* Restore the `-perm +mode' feature.Ruslan Ermilov2001-08-301-2/+2
| | | | | | | | Broken in the "close a PR" race, in revision 1.30. Note that the patch in the PR did not have this bug! Notes: svn path=/head/; revision=82569
* Make my Dad famous by showing the world my middle name, as seemsJosef Karthauser2001-08-301-1/+1
| | | | | | | to be the trend. Notes: svn path=/head/; revision=82568
* Like su(1), make PAM use mandatory. Remove parts of the authenticationMark Murray2001-08-305-82/+7
| | | | | | | logic that are handled by PAM. Fix documentation to reflect this. Notes: svn path=/head/; revision=82562
* Remove whitespace at end of line I happened to find during my last edit.Alexander Langer2001-08-301-2/+2
| | | | Notes: svn path=/head/; revision=82545
* Add support for proper URI encoding, using strvisx(3)'s VIS_HTTPSTYLE.Alexander Langer2001-08-301-3/+10
| | | | | | | | Requests through a proxy are still broken for URIs that contain blanks, since this required a bigger rewrite of the whole function. Notes: svn path=/head/; revision=82544
* Add support for HTTP/1.1 name-based virtual hosts. Also, useMike Barcroft2001-08-301-7/+12
| | | | | | | | | | | | | asprintf(3) when creating the request string, as the length of a path is defined as unlimited by the standard and limiting the total request to 4K is awfully arbitrary. PR: 30054 Submitted by: Joseph Mallett <jmallett@xMach.org> MFC after: 8 days Notes: svn path=/head/; revision=82540
* o Fix some checks on snprintf(3) to prevent miscalculations.Mike Barcroft2001-08-291-4/+8
| | | | | | | | | o This fixes a memory leak that can occur on some URL's. Pointy hat to: brian Notes: svn path=/head/; revision=82528
* Manually unifdef(1) CRAY, UNICOS, hpux and sun uselsess code.Mark Murray2001-08-295-51/+4
| | | | Notes: svn path=/head/; revision=82497
* In get_string(), 0-terminate the contents of buf ``just in case'';Joerg Wunsch2001-08-281-0/+1
| | | | | | | | | | otherwise, if the very first fgetc() already yielded EOF, the returned string won't get terminated at all. MFC after: 1 day Notes: svn path=/head/; revision=82471
* -a is not an options (sic).Dima Dorfman2001-08-281-1/+1
| | | | Notes: svn path=/head/; revision=82463
* Mention what an asterisk means in the -i display.Dima Dorfman2001-08-281-0/+4
| | | | | | | | PR: 30069 Submitted by: andrew@ugh.net.au Notes: svn path=/head/; revision=82462
* Remove MAP_INHERIT flag from mmaps.Matthew Dillon2001-08-254-11/+11
| | | | Notes: svn path=/head/; revision=82325
* ``recognized -> recognize'' where appropriate.Dima Dorfman2001-08-231-2/+2
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=82224
* Fix my previous snprintf() patches (which were largely no-ops).Brian Somers2001-08-232-9/+11
| | | | | | | Mostly submitted by: bde Notes: svn path=/head/; revision=82187
* Add myself.Pete Fritchman2001-08-221-0/+1
| | | | | | | Reviewed by: ade Notes: svn path=/head/; revision=82148
* Take maintainership of whois(1).Mike Barcroft2001-08-211-0/+2
| | | | Notes: svn path=/head/; revision=82088
* Update -v documentation to match reality.Ruslan Ermilov2001-08-211-4/+3
| | | | | | | Spotted by: bde Notes: svn path=/head/; revision=82067
* Revert to version 1.16 which was more correct than either of my attempts.Brian Somers2001-08-211-4/+4
| | | | Notes: svn path=/head/; revision=82057
* Display a better error message when snprintf() returns < 0Brian Somers2001-08-211-1/+5
| | | | | | | Pointed out by: bde Notes: svn path=/head/; revision=82055
* Handle overflows from snprintf(), not just returns of < 0Brian Somers2001-08-211-5/+5
| | | | | | | Pointed out by: bde Notes: svn path=/head/; revision=82054
* Remove unnecessary casts.Brian Somers2001-08-211-4/+4
| | | | | | | | | | The original (1.16) code was mostly correct, but this version is far clearer. Casts suggested to now be obfuscations by: bde Notes: svn path=/head/; revision=82051
* Handle snprintf() returning -1.Brian Somers2001-08-204-18/+32
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=81979
* Very minor stylistic nit.Mark Murray2001-08-201-2/+1
| | | | | | | Discussed with: ru Notes: svn path=/head/; revision=81971
* Code merge and diff reduction between this and crypto telnet.Mark Murray2001-08-2014-567/+252
| | | | | | | | Also remove useless AUTHENTICATION code. We have never compiled this here, and it is doubtful that it even works without crypto. Notes: svn path=/head/; revision=81964
* Don't misuse the return from snprintf.Brian Somers2001-08-201-5/+7
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=81960
* Don't overflow a buffer from command line arguments.Kris Kennaway2001-08-201-2/+6
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=81956
* Part II of libss retirement: zap mk_cmds too.Kris Kennaway2001-08-209-552/+0
| | | | | | | Pointy hat to: kris Notes: svn path=/head/; revision=81947
* Remove a blank line that snuck in with the previous commit.Dag-Erling Smørgrav2001-08-181-1/+1
| | | | | | | Set the default timeout to 120 seconds instead of 0 (no timeout). Notes: svn path=/head/; revision=81884
* Correct path (../crypto, not ../../crypto)Peter Wemm2001-08-181-1/+1
| | | | Notes: svn path=/head/; revision=81878
* Add some comments.Dag-Erling Smørgrav2001-08-171-3/+26
| | | | Notes: svn path=/head/; revision=81863
* Use a build-tool to create the .mgc files.David E. O'Brien2001-08-171-5/+11
| | | | | | | | | Submitted by: ru (partial) Obtained from: NetBSD (basic idea) Reviewed by: bde, ru Notes: svn path=/head/; revision=81845
* add an entry about myselfMax Khon2001-08-171-0/+1
| | | | | | | Reviewed by: jdp Notes: svn path=/head/; revision=81811
* Print a space between the function name and line number.Mike Heffner2001-08-161-1/+1
| | | | | | | | PR: bin/10980 MFC after: 2 weeks Notes: svn path=/head/; revision=81783