- Constify structure members that should not be changed
during process.
- Apply static where needed
- signed/unsigned madness
- Bump WARNS?= levels from 2 to 6
(this is a diff reduction for a subsequent commit against these
Makefile's)
any pending RADIUS transaction. Use this before sending RAD_STOP RADIUS
messages so that we definitely ``stop'' the session.
It was discovered that sometimes when the link timed out, we got lucky
enough to have an un-ACK'd RADIUS accounting transaction in progress,
resulting in the RAD_STOP message failing to send.
Original report found on: A russion news group
Text translated by: glebius
Tested by: Alexey Popov llp at iteranet dot com
MFC after: 7 days
measurements suggest that higher degrees of parallelism for large
numbers of clients help performance substantially.
Submitted by: Eric Anderson <anderson at centtech dot com>
- Use foo(void) instead of foo().
- Use static where applicable.
- Apply more const's when passing parameters
- signed/unsigned madness
- Avoid namespace collision by adding underscores.
- For 64-bit architectures, use %zx instead of %x
when necessary.
- When storing constants, use const instead of
variable.
- Bump WARNS?= from 2 to 6
That should fix the problem with invalid PSM returned from bthidcontrol.
Pointy hat goes to me.
PR: misc/76107
Submitted by: Hiroyuki Aizu < aizu at navi dot org >
MFC after: 1 day
fdcontrol/fdcontrol.c:
- Add const constraint to an intermediate value
which is not supposed to be changed elsewhere.
fdread/fdread.c:
- Use _devname in favor of devname to avoid name
conflicit.
- -1 is less than any positive number so in order
to get the block to function, we should get the
block a little earlier.
- Cast to remove signed when we are sure that a
return value is positive, or is compared with
an positive number (tracknumber of a floppy
disk is not likely to have UINT_MAX/2 anyway)
fdread/fdutil.c:
- Use more specific initializer
fdwrite/fdwrite.c:
- Use static on format_track since it's not
referenced in other places.
- Use const char* to represent string constant.
Bump WARNS accordingly.
This example caused me to incorrectly believe that you must use the
generic device nodes when you can in fact use either. It's often better
to use the driver specific node.
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
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
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
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
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
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
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
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
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
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
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.
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.
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
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.
- 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
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
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
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 :-)
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
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)
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
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.
Since we can only override the DSDT, a custom ASL dumped previously that
contained SSDTs would result in lots of multiple definition errors.
A longer-term fix involves adding the ability to override SSDTs to ACPI-CA.
MFC after: 3 days
Disable some code which magics minor numbers into card/port numbers.
I think we will have to parse this from the device name in the future,
but I need to confer with peter@ about this.
Put sicontrol back in the build.
Troublespotter: dwhite
NO_BIND_DNSSEC, NO_BIND_ETC, NO_BIND_NAMED, and NO_BIND_UTILS.
2. Make creation of directories in /usr/include that are only needed
in the WITH_BIND_LIBS case conditional.
Reviewed by: ru, des
with this configuration, but Ruslan tells me that I was probably mistaken,
and on retest the .5 pages are being installed just fine.
Therefore reverse the MAN[58] change in favor of the more modern syntax.
Submitted by: ru
1. Install man files and links for the lwres library.
2. Fix the path in various files to say /etc/namedb/ instead of just /etc.
3. Correctly install the conf file man pages for named and rndc.
but have a knob (WANT_BIND_LIBS) to build and install them in /usr/lib
and /usr/include. Rumors are that this may be useful at a later point,
let's see.
What this really means is that all BIND libraries are now internal to
buildworld (by default, unless WANT_BIND_LIBS is defined), and linked
statically into various BIND executables.
While here, removed redundant -I's from CFLAGS in lib/bind makefiles.
Sponsored by: des
OK'ed by: dougb
loop to avoid an incorrect display of the nologin path twice.
PR: 71786
Submitted by: Andrew Hayden <andrew.hayden@gmail.com>
Reviewed by: mtm
MFC after: 3 days
POSIX threads libraries are not available. Add crypto support if
the crypto libraries are available. Build dnssec-{keygen,signzone}
if crypto is available.
Submitted by: (in part) dougb@
This adds a safebelt that prevents users to mark more than
one "active" partitions, which will lead to a unbootable
machine, especially in multi-boot configurations.
PR: bin/71404
MFC After: 3 days
Approved by: murray (mentor)
$ crontab -e
[Add an entry with an error in the crontab file.]
crontab: errors in crontab file, can't install
Do you want to retry the same edit? yes
[Exit the editor without any changes.]
crontab: no changes made to crontab
[Entry is lost.]
Now crontab will loop until the error is fixed, or the
user answers no.
VT6122 gigabit ethernet chip and integrated 10/100/1000 copper PHY.
The vge driver has been added to GENERIC for i386, pc98 and amd64,
but not to sparc or ia64 since I don't have the ability to test
it there. The vge(4) driver supports VLANs, checksum offload and
jumbo frames.
Also added the lge(4) and nge(4) drivers to GENERIC for i386 and
pc98 since I was in the neighborhood. There's no reason to leave them
out anymore.
remaining consumers to have the count passed as an option. This is
i4b, pc98/wdc, and coda.
Bump configvers.h from 500013 to 600000.
Remove heuristics that tried to parse "device ed5" as 5 units of the ed
device. This broke things like the snd_emu10k1 device, which required
quotes to make it parse right. The no-longer-needed quotes have been
removed from NOTES, GENERIC etc. eg, I've removed the quotes from:
device snd_maestro
device "snd_maestro3"
device snd_mss
I believe everything will still compile and work after this.
concensus seems to be that is best left for doing post-install.
Discussed on: freebsd-current@
Tested with: make release
Approved by: re@
MFC after: 3 days
Previously, it would recognize it as a valid shell only
if the basename (nologin) was specified. Now, it will
recognize both the basename and the full path.
NOTE: The full path as adduser(8) understands it is /usr/sbin/nologin.
There is a symlink, /sbin/nologin, but that's deprecated and
only there for backwards compatibility.
relocation is not sufficient for ELF relocatable object format
modules, since accessing the module metadata involves following
pointers between different ELF sections.
This allows kldxref to correctly build linker.hints on the amd64
platform.
to get used to the fact that Perl is no longer part of the base system.
It is practically impossible to install any useful package and not get
Perl automatically pulled in as a dependency. So the typical user will
get their Perl.
This change greatly reduces the amount of manual labor in building the
miniinst.iso in release building.
Centralize the fdctl_wr() function by adding the offset in
the resource to the softc structure.
Bugfix: Read the drive-change signal from the correct place:
same place as the ctl register.
Remove the cdevsw{} related code and implement a GEOM class.
Ditch the state-engine and park a thread on each controller
to service the queue.
Make the interrupt FAST & MPSAFE since it is just a simple
wakeup(9) call.
Rely on a per controller mutex to protect the bioqueues.
Grab GEOMs topology lock when we have to and Giant when
ISADMA needs it. Since all access to the hardware is
isolated in the per controller thread, the rest of the
driver is lock & Giant free.
Create a per-drive queue where requests are parked while
the motor spins up. When the motor is running the requests
are purged to the per controller queue. This allows
requests to other drives to be serviced during spin-up.
Only setup the motor-off timeout when we finish the last
request on the queue and cancel it when a new request
arrives. This fixes the bug in the old code where the motor
turned off while we were still retrying a request.
Make the "drive-change" work reliably. Probe the drive on
first opens. Probe with a recal and a seek to cyl=1 to
reset the drive change line and check again to see if we
have a media.
When we see the media disappear we destroy the geom provider,
create a new one, and flag that autodetection should happen
next time we see a media (unless a specific format is configured).
Add sysctl tunables for a lot of drive related parameters.
If you spend a lot of time waiting for floppies you can
grab the i82078 pdf from Intels web-page and try tuning
these.
Add sysctl debug.fdc.debugflags which will enable various
kinds of debugging printfs.
Add central definitions of our well known floppy formats.
Simplify datastructures for autoselection of format and
call the code at the right times.
Bugfix: Remove at least one piece of code which would have
made 2.88M floppies not work.
Use implied seeks on enhanced controllers.
Use multisector transfers on all controllers. Increase
ISADMA bounce buffers accordingly.
Fall back to single sector when retrying. Reset retry count
on every successful transaction.
Sort functions in a more sensible order and generally tidy
up a fair bit here and there.
Assorted related fixes and adjustments in userland utilities.
WORKAROUNDS:
Do allow r/w opens of r/o media but refuse actual write
operations. This is necessary until the p4::phk_bufwork
branch gets integrated (This problem relates to remounting
not reopening devices, see sys/*/*/${fs}_vfsops.c for details).
Keep PC98's private copy of the old floppy driver compiling
and presumably working (see below).
TODO (planned)
Move probing of drives until after interrupts/timeouts work
(like for ATA/SCSI drives).
TODO (unplanned)
This driver should be made to work on PC98 as well.
Test on YE-DATA PCMCIA floppy drive.
Fix 2.88M media.
This is a MT5 candidate (depends on the bioq_takefirst() addition).
This gets us the info we need on systems which have proprietary tables that
don't match the standard. For instance, an AMI system has a table of type
"OEMB" with an invalid checksum.
Tested by: Maxim Maximov <mcsi_at_mcsi.pp.ru>
MFC after: 1 day
callers. These ioctls attempted to enable and disable the ACPI
interpreter at runtime. In practice, it is not possible to boot with
ACPI and then disable it on many systems and trying to do so can cause
crashes, interrupt storms, etc. Binary compatibility with userland is
retained.
MFC after: 2 days
and explicitly mention SSDT when we talk about the DSDT so that people
don't have to guess whether it includes the SSDT.
While here, touch date.
Pointed out by: le@
Decrease log severity to debug if a protocol is not supported by the
kernel (rpcbind checks /etc/netconfig if a protocol is available).
This avoids "rpcbind: cannot create socket for tcp6" messages
at startup on IPv4-only kernels.
use it, only those with FCode. Add references to dc(4), gem(4) and hme(4)
for obtaining further information about such devices presently supported
by FreeBSD.
- Correct the HISTORY section. There was an eeprom(8) utility in 4.4BSD and
early versions of FreeBSD 2.x.
- Add an AUTHORS section.
now include the contents if any SSDT table as well. This makes use
of the property that one can concatenate the body of SSDT tables to
the DSDT, updating the DSDT header (length and checksum) and end up
with a larger and valid DSDT table. Hence, this also works with -f.
Reviewed by: njl@