summaryrefslogtreecommitdiff
path: root/usr.sbin/lpr/common_source/net.c
Commit message (Collapse)AuthorAgeFilesLines
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-181-1/+3
| | | | | | | | | | | | | | | | | | | | 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. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966
* lpr: replace 0 with NULL for pointers.Pedro F. Giffuni2016-04-101-1/+1
| | | | | | | | | Found with devel/coccinelle. Reviewed by: gad Notes: svn path=/head/; revision=297795
* Let lpr build with -Wmissing-variable-declarations.Ed Schouten2012-10-251-2/+0
| | | | | | | | | Mark variables static where possible and place the uid/euid variables in lp.h, so that we can compile-time enforce that these variables have the same type. Notes: svn path=/head/; revision=242091
* Check the return error of set[ug]id. While this can never fail in theEitan Adler2012-10-221-18/+19
| | | | | | | | | | | | | | | | | current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. PR: bin/172289 PR: bin/172290 PR: bin/172291 Submittud by: Erik Cederstrand <erik@cederstrand.dk> Discussed by: freebsd-security Approved by: cperciva MFC after: 1 week Notes: svn path=/head/; revision=241852
* NI_WITHSCOPEID cleanupHajimu UMEMOTO2005-05-131-2/+2
| | | | | | | Reviewed by: gad Notes: svn path=/head/; revision=146188
* Take advantage of the common_source/lp.cdefs.h file to change lprGarance A Drosehn2003-07-141-4/+2
| | | | | | | | | | | source to use __FBSDID() for setting rcsids. Also fix the format of 'sccsid' lines to consistently match style(9) guidelines. Reviewed by: discussed with bde and obrien MFC after: 15 days Notes: svn path=/head/; revision=117541
* Rename a few global variables which hold hostname-related values to beGarance A Drosehn2001-06-151-3/+9
| | | | | | | | | | | | | | | | | | more sensible/understandable. 'from'->'from_host' 'host'->'local_host' 'fromb'->'frombuf' 'fromhost'->'origin_host' and a local-variable named 'host'->'hostbuf'. This fixes some compile-time warnings about local variables shadowing global variables. Other than renaming variables, the only actual code changes are to call strlcpy() instead of strncpy() when setting those (renamed) variables, and that 'from_ip' is now a strdup()-created buffer instead of being a static buffer compiled in as 1025 bytes. Reviewed by: freebsd-print@bostonradio.org (an earlier version) MFC after: 1 week Notes: svn path=/head/; revision=78300
* Fix about 90-100 warnings one gets when trying to compile lpr&friendsGarance A Drosehn2001-06-121-9/+9
| | | | | | | | | | | | | | | with BDECFLAGS on, mainly by adding 'const' to parameters in a number of routine declarations. While I'm at it, ANSI-fy all of the routine declarations. The resulting object code is exactly the same after this update as before it, with the exception of one unavoidable change to lpd.o on freebsd/alpha. Also added $FreeBSD$ line to lpc/extern.h lpc/lpc.h lptest/lptest.c Reviewed by: /sbin/md5, and no feedback from freebsd-audit Notes: svn path=/head/; revision=78146
* IPv6 support for lpr.Hajimu UMEMOTO2000-12-161-78/+108
| | | | | | | | Reviewed by: freebsd-current (no objection) Obtained from: KAME Notes: svn path=/head/; revision=70098
* Implement new printcap options of sr= (aka stat.recv) and sr= (aka stat.send)Garance A Drosehn2000-11-021-3/+3
| | | | | | | | | | | in lpd. Stat.recv is useful on a printserver, as something of a network performance-monitoring tool. Stat.send is a minimal accounting record of sorts for jobs going to tcp/ip based printers. Reviewed by: freebsd-print@bostonradio.org Notes: svn path=/head/; revision=68253
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50479
* lpd tries to be clever and checks if RM == my_hostname.Jordan K. Hubbard1999-04-271-1/+6
| | | | | | | | | | | | However, it doesn't check if the remote printer name it is sending it to is the same as the local printer name, and so chokes 'cos "laser" is not a real printer. PR: 7081 Submitted by: David Malone <dwmalone@maths.tcd.ie> Notes: svn path=/head/; revision=46110
* Mega lpd/lpd upgrade, part I:Garrett Wollman1997-12-021-0/+260
- Get rid of a lot of the static variables which were shared by many routines and programs in the suite. - Create an abstract interface to the printcap database, so that other retrieval and iteration mechanisms could be developed (e.g., YP, Hesiod, or automatic retrieval from a trusted server). - Give each capability a human-readable name in addition to the historic two-character one. - Otherwise generally clean up a lot of dark corners. Many still remain. - When submitting jobs, use the official login name record (from getlogin()) if there is one, rather than reverse-mapping the uid. More to come... Notes: svn path=/head/; revision=31492