aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/finger/net.c
Commit message (Collapse)AuthorAgeFilesLines
* usr.bin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-4/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* usr.bin: Remove ancient SCCS tags.Warner Losh2023-11-271-3/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. 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. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-181-2/+2
| | | | | | | | | | strchr(3) will return NULL if the character does not appear in the string. MFC after: 2 weeks. Notes: svn path=/head/; revision=298209
* Fix printing multibyte printing when performing a networked finger(1) requestBaptiste Daroussin2016-01-181-6/+7
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=294293
* Staticify cleanup() which is not referenced in other places.Xin LI2011-06-211-1/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=223374
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-111-4/+0
| | | | | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson Notes: svn path=/head/; revision=216370
* Migrate finger(1) towards utmpx.Ed Schouten2010-01-131-2/+1
| | | | | | | | | It was already ported to use libulog, which makes it simpler now. Be sure to catch the error returned by setutxdb(). Otherwise it may perform a lookup on the utx.active database. Notes: svn path=/head/; revision=202191
* Migrate finger(1) away from <utmp.h>.Ed Schouten2009-12-281-1/+2
| | | | | | | | | | Unfortunately it also uses lastlog, which means we must resort to local extensions of the utmpx-interface. Because the user name and TTY name are now nul-terminated, there is no need to copy around strings as often. Notes: svn path=/head/; revision=201140
* Revert most part of 200420 as requested, as more review and polish isXin LI2009-12-131-1/+1
| | | | | | | needed. Notes: svn path=/head/; revision=200462
* Remove unneeded header includes from usr.bin/ except contributed code.Xin LI2009-12-111-1/+1
| | | | | | | Tested with: make universe Notes: svn path=/head/; revision=200420
* Remove T/TCP support, and the -T option which was needed to disable it.Dag-Erling Smørgrav2007-04-111-7/+1
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=168632
* Remove spurious semicolons. Outside of functions they are actually errors butStefan Farfeleder2004-05-161-1/+1
| | | | | | | | | | | GCC doesn't warn about them without -pedantic. Approved by: das (mentor) PR: 56649 Reviewed by: md5 Notes: svn path=/head/; revision=129302
* Make a CR/LF sequence measure up to its name: the order of the CR and LFPeter Pentchev2002-12-021-1/+1
| | | | | | | | | | | | | | characters was reversed, resulting in some network appliances, including at least some NAS devices from Ascend, not recognizing our finger(1) request. PR: 45914 Submitted by: J R Matthews <jrm@delta-e.com.au> Approved by: re (rwatson) MFC after: 2 weeks Notes: svn path=/head/; revision=107528
* ANSIify function definitions.David Malone2002-09-041-6/+1
| | | | | | | | | | | | Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5 Notes: svn path=/head/; revision=102944
* add -4 and -6 option to be able to specify an address family.Hajimu UMEMOTO2002-07-221-1/+2
| | | | | | | | Requested by: matusita MFC after: 1 week Notes: svn path=/head/; revision=100521
* Style improvements recommended by Bruce as a follow up to someDavid Malone2001-12-101-5/+6
| | | | | | | | | | | of the recent WARNS commits. The idea is: 1) FreeBSD id tags should follow vendor tags. 2) Vendor tags should not be compiled (though copyrights probably should). 3) There should be no blank line between including cdefs and __FBSDIF. Notes: svn path=/head/; revision=87628
* WARNS=2 fix, remove 'register' and use __FBSDID().Mark Murray2001-12-021-11/+13
| | | | Notes: svn path=/head/; revision=87229
* Include missing header files which define functions for which gcc hasDima Dorfman2001-06-241-0/+1
| | | | | | | builtins (e.g., exit, strcmp). Notes: svn path=/head/; revision=78718
* SpellingPhilippe Charnier2001-02-061-12/+6
| | | | | | | Remove unused #includes Notes: svn path=/head/; revision=72109
* -Wall cleanup.Ruslan Ermilov2000-10-231-2/+2
| | | | | | | PR: 22187 Notes: svn path=/head/; revision=67467
* Don't assume ai0->ai_canonname will always be filled in. Print theGarrett Wollman2000-09-241-1/+6
| | | | | | | | | user-supplied host name if we can't get a canonical name. Obtained from: contrib/tcp_wrappers/socket.c rev. 1.4 (in spirit) Notes: svn path=/head/; revision=66315
* Implement IPv6 support. Also restructure the way multi-homed hostsGarrett Wollman2000-09-221-57/+91
| | | | | | | are treated, regardless of protocol. Notes: svn path=/head/; revision=66199
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Impliment elements of TCP Wrappers's `safe_finger'.David E. O'Brien1999-05-081-1/+28
| | | | | | | | | | * if run by root (or root process) drop privs * ensure output size is not infinate (net finger only) * ensure output lines are not infinate in length (net finger only) * do not allow finger client to run longer than 3 minutes (net finger only) Notes: svn path=/head/; revision=46662
* Don't assume that hp->h_lenght == 4. Be conservative in its use.Warner Losh1998-06-091-2/+3
| | | | | | | Submitted by: J. Assange a long time ago. Notes: svn path=/head/; revision=36792
* So somebody actually found language in the FINGER RFC which requiresGarrett Wollman1997-08-011-3/+3
| | | | | | | | | | | implementations to leave the client side open until the server closes. While this is totally idiotic, it seems as if some servers actually require it (e.g., the one at mit.mit.edu). So, we bow to the weight of the bogus standard and disable the initial close. Hopefully now fetch(1) can serve the role of T/TCP demonstration application. Notes: svn path=/head/; revision=27835
* Add rcsid, usage(). Silent -Wall. Use warn(3).Philippe Charnier1997-07-021-4/+9
| | | | Notes: svn path=/head/; revision=27169
* Merge from Lite2Peter Wemm1997-03-111-4/+3
| | | | Notes: svn path=/head/; revision=23693
* Allow the user to disable the use of T/TCP by setting the -T option.Andras Olah1996-03-151-0/+7
| | | | | | | This option becomes useless when all TCP stacks are fixed out there. Notes: svn path=/head/; revision=14631
* Print 8bit chars from the net if current locale allows themAndrey A. Chernov1996-03-101-2/+3
| | | | Notes: svn path=/head/; revision=14472
* Implement client-side transaction TCP. This has little effectGarrett Wollman1995-12-171-13/+39
| | | | | | | | if the server doesn't support it. (This is intended mostly as an example.) Notes: svn path=/head/; revision=12909
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-1/+1
| | | | Notes: svn path=/head/; revision=8874
* Remove extra newline introduced in Net/2Paul Traina1994-12-051-1/+0
| | | | Notes: svn path=/head/; revision=4990
* BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes1994-05-271-0/+148
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590