Commit Graph

10279 Commits

Author SHA1 Message Date
Julian Elischer
38413aeed8 Allow usbd to handle event notificatiosn where mor ethan one
device is involved, (e.g. plugin a hub with multiple devices
already attached to it)

Submitted by: Naoyuki Tai <ntai@smartfruit.com>
PR: 43993
MFC in:	1 week
2005-01-04 06:45:41 +00:00
Xin LI
0dac67d65f nologin(8) does not seem to require any command line parameters,
so remove argc and argv from main() argument.

At the same time, user and tt is not likely to be changed during
execution so mark them const.

This commit should guarantee nologin to pass WARNS=6.

Tested on:	i386
MFC After:	1 month
2005-01-04 03:57:20 +00:00
Xin LI
9e3daa8dcf Because the `permission' field in conf_entry is intended to be used as
parameter 2 in chmod(2), which is a mode_t (and in turn a __uint_16_t),
it's more likely that it should be defined as an unsigned variable.

This commit should make newsyslog WARNS=6 clean, but don't bump the knob
until I have a universe build.

MFC After:	1 month
2005-01-04 02:24:01 +00:00
Nate Lawson
a41e7b6aa9 Catch up with the kernel and set any global variables we are using, in
particular, enabling interpreter workarounds for bad ASL.

MFC after:	1 day
2005-01-03 04:14:05 +00:00
Maxim Konovalov
74d8001c64 o Remove duplicate includes.
PR:		bin/75712
Submitted by:	brueffer
Obtained from:	Dragonfly BSD
2005-01-01 22:07:06 +00:00
Garance A Drosehn
c547dbe854 Fix so all parts of lpd, lpc, lpq, and lprm will use the same algorithm
for calculating the job number for a job based on the control-file name.
We might receive cf-files named by other implementations of lpr, where
the job number shown by lpq would not match the job number that other
commands expected for the same name.

This also uses a newer algorithm for determining a job number, to avoid
problems caused when a control-file is named using an IP address, instead
of the hostname.

This also moved the declaration if isowner() from lp.h to rmjob.c.  When I
went to change the parameters, I noticed that rmjob.c was the only source
file which uses it.

MFC after:	2 weeks
2004-12-31 00:36:28 +00:00
Garance A Drosehn
e357c6ec8e Do more extensive checking of the userid field which is read in from the
control-file for each print job.  This is partially because the previous
checks still let through some characters which would cause trouble for
other applications which try to process the resulting userid -- such as
accounting programs.

But the main reason is to handle the case where some remote host sends a
print job where the given userid is an uppercase-version of the real userid.
For that case, lpd will now check for uppercase letters in the userid.  If
there are any, it will check to see if the given userid (with the uppercase
letters) is a valid one.  If it is *not* valid, then lpd will change the
userid to all-lowercase right when the job is received.

MFC after:	2 weeks
2004-12-31 00:18:42 +00:00
David Malone
f56bb70ae6 Allow ':' and '%' in hostname specifications so that we can specify IPv6
addresses and scope IDs.

MFC after:	3 weeks
2004-12-28 22:25:04 +00:00
David Malone
62f29f306a Some syslog messages delimit the program tag with whitespace rather
than a colon, so don't allow whitespace in program names. To be
consistent with hostnames, don't allow whitespace in the program
name specifiers in syslog.conf either.

(The first change is by Markus from the PR, the second is mine.)

PR:		68691
Submitted by:	Markus Oestreicher <m.oe@x-trader.de>
MFC after:	3 weeks
2004-12-28 21:58:54 +00:00
Ruslan Ermilov
596e374dac For VLAN interfaces, print MAC addresses properly.
(Broken in rev. 1.52.)

PR:		75471
Submitted by:	Jon Simola
MFC after:	3 days
2004-12-24 22:16:38 +00:00
Pyun YongHyeon
45ae467e85 Due to unknown reasons, Disk_Names() returns SCSI CDROM as a valid
disk. This is main reason why sysinstall presents SCSI CDROM to
available disks in Fdisk/Label menu. In addition, adding a blank
SCSI CDROM to the menu generates floating point exception in sparc64.
Disk_Names() just extracts sysctl "kern.disks". Why GEOM treats SCSI
CDROM as a disk is beyond me and that should be investigated.
For temporary workaround, ignore SCSI CDROM device.

PR:		sparc64/72962
Tested by:	R. Tyler Ballance < tyler AT tamu DOT edu>
MFC after:	1 week
2004-12-22 08:26:48 +00:00
Ruslan Ermilov
18cd97621d Use the source of the termcap database when available. 2004-12-21 15:16:36 +00:00
Ruslan Ermilov
cffad9ed85 The "fixate" command no longer terminates command processing,
so that "eject" following it can happen.
2004-12-21 14:57:37 +00:00
Ruslan Ermilov
5d784aa699 Document -F in usage() and SYNOPSIS. 2004-12-21 14:53:44 +00:00
Ruslan Ermilov
c72068b6a8 Make "burncd ... fixate eject" really work as promised. 2004-12-21 14:49:10 +00:00
Ruslan Ermilov
b5b0bba4df NOPAM -> NO_PAM 2004-12-21 12:49:24 +00:00
Ruslan Ermilov
8340281fb1 NOIPSEC -> TRACEROUTE_NO_IPSEC 2004-12-21 12:44:20 +00:00
Ruslan Ermilov
dd991de030 Overhaul ppp(8) build options so they are safe to use in
/etc/make.conf:

NOALIAS -> retired (support provided by PPP_NO_NAT)
NOATM -> PPP_NO_ATM (also subject to NO_ATM global)
NODES -> PPP_NO_DES (support was broken, now recovered)
NOI4B -> PPP_NO_I4B (also subject to NO_I4B global)
NOKLDLOAD -> PPP_NO_KLDLOAD
NONAT -> PPP_NO_NAT
NONETGRAPH -> PPP_NO_NETGRAPH
NOPAM -> PPP_NO_PAM (will be subject to NO_PAM global)
NORADIUS -> PPP_NO_RADIUS
NOSUID -> retired (support provided by PPP_NO_SUID)
PPP_NOSUID -> PPP_NO_SUID
2004-12-21 12:01:15 +00:00
Ruslan Ermilov
564299ef5f The C define is NONAT. 2004-12-21 11:12:05 +00:00
Ruslan Ermilov
731db6a428 NOINET6 -> NO_INET6 2004-12-21 10:49:29 +00:00
Ruslan Ermilov
a216173556 NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
Ruslan Ermilov
83c7ade90a NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
Ruslan Ermilov
07736e20e9 NOATM -> NO_ATM 2004-12-21 09:08:06 +00:00
Ruslan Ermilov
f1f6253f4f NOLIBC_R -> NO_LIBC_R
NOLIBPTHREAD -> NO_LIBPTHREAD
NOLIBTHR -> NO_LIBTHR
2004-12-21 09:00:26 +00:00
Ruslan Ermilov
e653b48c80 Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
Maxim Konovalov
f8c5e12739 Allocate an additional white space in a username column for
a long (UT_NAMESIZE) login names.

PR:		bin/75259
Submitted by:	Matthew D.Fuller
MFC after:	2 weeks
2004-12-19 18:02:45 +00:00
Garance A Drosehn
a6ed151d3c Call umask() before opening the lock-file for a queue, to make sure
the file will be created with the right access, if the call to open()
does create it.  Also fix the other call to umask() to turn off
"write others", just as a matter of general safety.

PR:		74418
MFC after:	4 days
2004-12-19 05:14:29 +00:00
Poul-Henning Kamp
5679e1ac37 Open device R/W for ioctl modifications. 2004-12-18 11:04:10 +00:00
Ruslan Ermilov
0207facc8f err() -> errx() 2004-12-17 13:24:22 +00:00
Garance A Drosehn
bea5945e6f When printing a data file received from some other host, check to make
sure the data file has been completely transfered before starting to
print it.  This is needed because some implementations of lpr will send
the control-file for a print job before sending the matching data-files,
and that can cause problems if the receiving host is a busy print-server.

MFC after:	2 weeks
2004-12-17 01:54:50 +00:00
Peter Pentchev
3f8718c17d Describe the special meaning of the $ and ~ characters, and the fact
that you can get around it by double-quoting them.

PR:		42762
Submitted by:	AIDA Shinra <aida-s@jcom.home.ne.jp>
Discussed with:	brian
2004-12-16 16:59:19 +00:00
Ruslan Ermilov
fff666a6f8 The ioconf.c is no longer generated.
Submitted by:	Craig Rodrigues
2004-12-16 09:52:41 +00:00
Christian Brueffer
eb1b84fe40 - Xref fwip(4)
- bump .Dd

MFC after:	3 days
2004-12-14 20:44:37 +00:00
Brian Somers
cf4bdb6e94 Handle select() returning -1/EINTR - fairly common in these KSE days.
PR:		74972
MFC after:	3 days
2004-12-13 14:50:13 +00:00
Brian Somers
125eb366ea Implement an ``enable/disable echo'' option, defaults to off.
This allows LCP ECHOs to be enabled independently of LQR reports.

Note: This introduces a change in the default behaviour (search for lqr and
echo in the man page).  I'll update UPDATING to reflect this.

PR:		74821
2004-12-13 12:51:19 +00:00
Poul-Henning Kamp
e71171f31b Also do not send junk mount arguments when removing exports. 2004-12-11 12:51:20 +00:00
Gregory Neil Shapiro
3064e7b052 Enable _FFR_DEAL_WITH_ERROR_SSL to deal with OpenSSL error returns of 0.
PR:		bin/73105
MFC after:	2 days
2004-12-10 19:15:31 +00:00
Xin LI
74ec0afcc7 Correct two bugs that may result in incorrect CBCP response for
administrator specified number.

The implementation in our version transmits extra zero byte that is a
violation of the Microsoft PPP Callback Control Protocol section 3.2[1].
This can lead to incorrect behavior on certain devices, as reported
in bin/50613.

Confirmed with:	cbcp.c in ppp's cvs, rev. 1.4 and 1.15 [2]

Submitted by:	Dmitry Pryanishnikov <dmitry at atlantis.dp.ua>
PR:		bin/50613

[1] http://www.dsl.gr.jp/~manabe/PPxP/doc/Standards/draft-gidwani-ppp-callback-cp-00.txt
[2] http://cvs.samba.org/cgi-bin/cvsweb/ppp/pppd/cbcp.c
    http://www.samba.org/cvs.html
2004-12-06 15:49:52 +00:00
Poul-Henning Kamp
0cbf6231e8 Userland change corresponding to the change in kernel/userland communication
for NFS locking.
2004-12-06 08:32:09 +00:00
Brian Somers
0508c09a41 Send NAS-IP-Address as well as NAS-Identifier
Add ``disable NAS-IP-Address'' and ``disable NAS-Identifier'' options to
support pre-rfc2865 RADIUS servers.
This pushes our enable/disable items over the 32 bit limit, so reoganise
things to allow a bunch more options.
Go to version 3.4.1 so that any compatability problems can be identified.
2004-11-29 17:11:15 +00:00
Ian Dowse
5fc01b4e25 Fix a few coding errors that caused compiler warnings.
PR:		bin/71615
Submitted by:	Craig Rodrigues (original patch by Dan Lukes)
2004-11-28 20:36:19 +00:00
David Schultz
6004362e66 Don't include sys/user.h merely for its side-effect of recursively
including other headers.
2004-11-27 06:51:39 +00:00
Maxim Konovalov
b5974bdbab Increase a socket receive buffer size. This helps 'ngctl list'
to deal with a big number of nodes.

Submitted by:		archie
Approved by:		archie
Reported and tested:	Konstantin Timashkov
MFC after:		1 month
2004-11-25 09:27:56 +00:00
Warner Losh
bfccea1e5d o Report charge/discharge rate and remaining capacity in the proper
units (as specified in _BIF). (noted by Bruno Ducrot)
o In looking in the standard, if the cap numbers are 0xffffffff, then acpi
  is reporting unknown for that field.  Report unknown numbers properly.
o Update the state to reflect charging, discharging and critical.
2004-11-24 16:02:20 +00:00
Warner Losh
95e583726f phk jumped the gun and posted what looks like a preliminary version of
my patches for this information.  Commit my more complete version.
This version isn't complete yet, since some details aren't handled
right just yet.

Poaching by: phk
2004-11-24 15:32:07 +00:00
Poul-Henning Kamp
fdcef74733 Dump current status of battery as well.
The -i code doesn't really belong here in the first place I would think,
but keep it together for now.
2004-11-24 12:49:39 +00:00
David E. O'Brien
37c510c7c0 Catch up with PHK's sio(4) cuaa->cuad rework [sys/dev/sio/sio.c rev. 1.456].
PR:		73879
Submitted by:	Steve Kargl <sgk@troutmask.apl.washington.edu>
2004-11-19 03:56:47 +00:00
David E. O'Brien
ddede49cfd Catch up with PHK's sio(4) cuaa->cuad rework [sys/dev/sio/sio.c rev. 1.456].
PR:		73878
Submitted by:	Steve Kargl <sgk@troutmask.apl.washington.edu>
2004-11-19 03:53:36 +00:00
David E. O'Brien
36d4953214 Make logic more readable. 2004-11-19 03:52:41 +00:00
Maksim Yevmenkin
3adfd74adb Check in updated bthidd(8). This is still work in progress. 2004-11-18 18:05:15 +00:00
Gleb Smirnoff
204d318009 s/priveleged/privileged/ 2004-11-18 13:37:33 +00:00
Giorgos Keramidas
d6c85264cd Fix a minor comment typo: priveleged = privileged. 2004-11-18 12:20:52 +00:00
Xin LI
d1df3fcd3f Initialize lcap and pwd to NULL. This allows a WARNS=6 clean build,
hence bump it to 6.

Note that the last commit message was not quite accurate.  While the
assumption exists in the code, it's not possible to have an
uninitialized p there because if lflag is set when username is NULL
then execution would be terminated earlier.
2004-11-17 10:01:48 +00:00
Xin LI
95751846f1 The code path in main() dealing with lflag assumes that p was
initialized with NULL, while it is not.  So let's initialize
it.
2004-11-17 09:52:10 +00:00
Simon L. B. Nielsen
a98d8c790a Only write the rc.conf header when a new rc.conf is written. This was
accidentally removed in v. 1.211.

Submitted by:	Olafur Osvaldsson <oli@isnic.is>
PR:		bin/73692
MFC after:	1 week
Approved by:	trhodes
2004-11-16 21:59:00 +00:00
John Baldwin
60ede768f7 Various updates to the anonymous ftp support:
- Allow the upload directory to be optional.  If the upload directory
  field is cleared to the empty string then no directory will be created.
- Don't create a bin/ subdirectory in ftp's home dir containing ls(1) and
  date(1) as ftpd(8) no longer requires it.
- Create a pwd.db file in etc/ instead of a passwd file.
- Ignore NIS compat entries in /etc/group and /etc/master.passwd when
  building the anonymous files.

PR:		bin/60662
Submitted by:	Olafur Osvaldsson oli at isnic dot is
2004-11-16 19:06:42 +00:00
Warner Losh
46433fccd1 Minor style(9) before possible larger commits. 2004-11-16 06:25:02 +00:00
Bjoern A. Zeeb
6c58990d47 Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on  no NIS support and related programs will be built.

Lost parts rediscovered by:	Danny Braniss <danny at cs.huji.ac.il>
PR:		bin/68303
No objections:	des, gshapiro, nectar
Reviewed by:	ru
Approved by:	rwatson (mentor)
MFC after:	2 weeks
2004-11-13 20:40:32 +00:00
Philip Paeps
6af2c48a95 Somehow I missed this last night, acpi_init() doesn't return an int.
Spotted by:	Randy Bush <randy@psg.com>
2004-11-13 15:16:35 +00:00
Philip Paeps
413efd9141 With the addition of a proper prototype, this is now WARNS=6 clean. 2004-11-13 01:54:22 +00:00
Philip Paeps
9599d206a4 Two uint32_t casts crept in where they shouldn't have.
ACPI_TYPE_INTEGER can be 64 bits wide in acpi v2.
2004-11-13 01:49:22 +00:00
Philip Paeps
e18d08c9b0 Change some formats and add some casts to make this
WARNS=2 clean, and mark it as such.

PR:		71672 (partly)
Reviewed by:	njl
2004-11-13 01:34:51 +00:00
Philip Paeps
d0139887c9 Update moused(8) and mouse(4) to reflect the cuaa->cuad name change.
Submitted by:	Steve Kargl <sgk@troutmask.apl.washington.edu>
2004-11-12 23:59:24 +00:00
John Baldwin
c3f8d76206 Add Estonian keyboards.
PR:		bin/73232
Reported by:	Mart Tõnso tm at hwg dot edu dot ee
Submitted by:	Olafur Osvaldsson oli at isnic dot is
MFC after:	1 week
2004-11-11 18:49:24 +00:00
Ruslan Ermilov
a7c23514f6 Really revert the whitespace change to usage(). 2004-11-11 18:09:00 +00:00
Diomidis Spinellis
7aaa48252b Corrected the description of the -t output columns to reflect reality.
MFC after:	2 weeks
2004-11-11 17:30:04 +00:00
Gleb Smirnoff
24f3d18aa1 Change TABs back to spaces in usage string constants.
Requested by:	ru
2004-11-11 16:13:10 +00:00
Gleb Smirnoff
033b92f386 Whitespace.
Approved by:	cvs diff -b
2004-11-11 09:41:03 +00:00
Gleb Smirnoff
43af2cc4a5 Double receive buffer size on sockets.
PR:		bin/72366
Ok'd by:	dwmalone
Approved by:	julian (mentor)
Obtained from:	OpenBSD
MFC after:	1 month
2004-11-11 09:39:04 +00:00
Xin LI
37ee573ec6 Correct a potential DoS vulnerability, as described at
http://www.securityfocus.com/archive/1/379450

This patch is based on dillon's patch on DragonFlyBSD, which is in
turn derived from OpenBSD's src/usr.sbin/pppd/cbcp.c,v 1.6.

Obtained from:	OpenBSD via DragonFlyBSD
Encouraged by:	nectar
2004-11-10 05:49:52 +00:00
Yoshihiro Takahashi
eadb1eda9f Fixed fd related tools on pc98.
Submitted by:	Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
2004-11-09 14:10:18 +00:00
Søren Schmidt
6a33b3c60b Add -c option that calculates the overhead of read I/O ops. 2004-11-09 12:28:41 +00:00
Ken Smith
de655741ce Bump document date.
Noticed by:     trhodes
Pointy hat:     kensmith
MFC after:      1 week
2004-11-09 04:41:12 +00:00
Ken Smith
83d71f6175 Add newsyslog(8) to the "See Also" section.
MFC after:	1 week
2004-11-09 04:31:31 +00:00
Warner Losh
e9943b1a1b Remove __P, as well as other non-FreeBSD relevant code. 2004-11-08 23:26:36 +00:00
Dima Dorfman
6143758681 Reflect that -h takes an argument and belatedly bump .Dd for addition of -h 2004-11-07 04:34:37 +00:00
Dima Dorfman
cb4c0b80e8 Make the usage message match reality about -h and -w. 2004-11-07 04:32:51 +00:00
Xin LI
6f52836b84 ANSI'fy nfsd(8) and some minor changes to make it WARNS=6 clean.
This commit does not affect the code generated, as proven by md5'ing
resulting binaries.

Bump WARNS accordingly.

Compiled on:	sparc64, ia64, i386
Reviewed by:	alfred (but blame me if anything goes wrong :-)
2004-11-06 18:15:44 +00:00
Josef El-Rayes
24286a2292 Add ftp8.de.freebsd.org
Requested by:	vs
Approved by:	ssouhlal
2004-11-06 14:38:54 +00:00
Gleb Smirnoff
240d5a9b1c Protect against local flooder of /var/run/log. Do not loop forever in
syslog(3) if we are a priveleged program (sshd, su, etc.).

- Make syslogd open an additional socket /var/run/logpriv, with 0600
  permissions.
- In libc, try to use this socket.
- Do not loop forever if we are using this socket (partial backout of 1.31)

Reviewed by:	dwmalone, Andrea Campi <andrea webcom it>
Approved by:	julian (mentor)
MFC after:	1 month
2004-11-04 23:09:57 +00:00
Gleb Smirnoff
247444670e - Use stailqueue for sockets instead of socket buffer. Thus
remove limit for 20 sockets.
- Add possibility to specify file mode for sockets created with '-l'.
- Check that socket name in '-l' is absolute.

Reviewed by:	dwmalone, Andrea Campi <andrea webcom it>
Approved by:	julian (mentor)
2004-11-04 22:20:21 +00:00
David E. O'Brien
834fc2d5ad Fix braino where I didn't fix the file path from when the line was
copied from the test program.
2004-11-04 15:46:59 +00:00
David E. O'Brien
dc43dfcd09 Stop listening to bug reports with wrong solutions and commit a fix to the '
problem I know will work.
2004-11-04 01:28:43 +00:00
Ceri Davies
62204f60b7 Allow the -f argument to work.
PR:		bin/73229
Submitted by:	Irina Liakh <spell at itl dot ua>
MT4:		2 weeks
MT5:		After 5.3-RELEASE
2004-11-03 20:45:52 +00:00
Ken Smith
d713872fde Update the list of package names/descriptions.
Last second MFC candidate?
2004-11-03 18:26:06 +00:00
Ruslan Ermilov
dee651eb15 Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar
to PRECIOUSLIB from bsd.lib.mk.  The side effect of this
is making installing the world under jail(8) possible by
using another knob, NOFSCHG.

Reviewed by:	oliver
2004-11-03 18:01:21 +00:00
Maksim Yevmenkin
e91c64ab6b Serial devices now called /dev/cuadXX not /dev/cuaaXX 2004-11-02 20:12:06 +00:00
David E. O'Brien
1b0f4fd1db fix typo in generated /etc/exports: escape all ' 2004-11-01 16:32:09 +00:00
Hidetoshi Shimokawa
f62482315a Add usage of -m option. 2004-10-29 01:24:32 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Dag-Erling Smørgrav
30fdf276fb Allow multiple devices to be specified on one device / nodevice line.
Also allow "device" / "nodevice" to be spelled "devices" / "nodevices".

MFC after:	2 weeks
2004-10-24 10:27:16 +00:00
Dag-Erling Smørgrav
9b736ef9e6 If the file specified in an "include" line does not exist in the current
directory, and its name does not begin with a period or a forward slash,
go look for it in ../../conf.

Wished for by:	scottl
MFC after:	2 weeks
2004-10-24 09:38:41 +00:00
Hidetoshi Shimokawa
1be7387c03 Add -m option, set default fwmem target. 2004-10-23 23:28:08 +00:00
SUZUKI Shinsuke
72286081d0 removed compilation warning
PR:	bin/71624
2004-10-22 07:31:12 +00:00
Robert Watson
9dc981da8d Remove unnecessary include of vnode.h.
Requested by:	phk
2004-10-21 11:22:07 +00:00
Simon L. B. Nielsen
3127ce5d60 Fix typo.
Submitted by:	Patrick Oonk <patrick@cookie.monster.org>
PR:		docs/72912
MFC after:	1 week
2004-10-20 10:11:12 +00:00
Ruslan Ermilov
a4270a4241 Make the -m option actually work. 2004-10-19 20:30:09 +00:00
David E. O'Brien
5282e73fd7 This is now WARNS 6 clean on 64-bit platforms. 2004-10-19 18:09:29 +00:00
Ruslan Ermilov
69c2a92e4d Utilize FILES, SCRIPTS, and SYMLINKS. While here, fixed a bug in
the implementation of the following feature in revision 1.4:

- Install Makefile.yp as /var/yp/Makefile.dist and link it to
  /var/yp/Makefile only if /var/yp/Makefile doesn't already exist.
  Suggested by Peter Wemm.

The actual code was only symlinking when no /var/yp/Makefile.dist
existed, i.e., never.
2004-10-18 21:42:15 +00:00
Ruslan Ermilov
8311bc780c Utilize SCRIPTS. 2004-10-18 21:29:20 +00:00