hline() to draw the window split rather than fudging it with dashes.
This causes the line to be drawn in line-draw characters if the terminal
description has them.
Suggested by: ache
- use termios, not sgtty
- dont use _putchar(), that was a BSD-curses specific feature not in
other curses packages (such as ncurses)
- use sigaction, not sigvec while I'm there
- box() does different things under sysv/ncurses on 1-line high windows,
and BSD-curses doesn't have hline(), so do it by adding characters
instead. That works on both styles of curses.
Bigram does not remove newline at end of filename. This
break particulary the bigram algorithm and /var/db/locate.database
grow up 15 %.
Bigram does not check for characters outside 32-127.
The bigram output is silly and need ~1/2 CPU time of
database rebuilding.
old:
locate.bigram < $filelist | sort | uniq -c | sort -nr
^^^^^^^^^^^^^^
this can easy made bigram
new:
bigram < $filelist | sort -nr
code
Code does not check for char 31.
Use a lookup array instead a function. 3 x faster.
updatedb
rewritten
sync with bigram changes
read config file /etc/locate.rc if exists
submitted by: guido@gvr.win.tue.nl (Guido van Rooij)
concatdb - concatenate locate databases
mklocatedb - build locate database
installs something. This is not 100% right, since it has a false hit
when install -C snaps hard links.
Also, run strip(1) from the $PATH, otherwise you need a special version
of install to install (say) elf binaries which have a different strip.
With JDP's elfkit, the layout of the path determines which binary format
you are generating.
from a script as if it was done in the interactive editor.
When reassembling the gecos string, trim any excess trailing commas, they
look ugly in the passwd file. :-)
Have a simple Makefile tweak to prevent mortal users from changing their
fullname. As ISP's we have seem some real bizzare stuff here..
When decoding the change/expire string, allow the month number as a
synonym for the name of the month.. (ie: 1 as well as Jan or January)
Note that using numbers means there's a chance that you can get bitten
if you're not used to the American DD-MM-YY order.
possibility of a security hole. It now does what rdist-6 does, and calls
/usr/bin/rsh if not running as root. There are NO protocol changes, this
is 100% compatable with the old rdist, except that it does not need setuid
root privs.
However, there are some minor differences to the base rdist-6 code in that
if it is being run by root, it will call rcmd(3) directly rather than
piping everything through rsh(1). This is a little more efficient as it
doesn't involve context switching on pipe reads/writes.
Also, the -P option was added from rdist-6.1.2, which allows an alternative
rsh program to be specified, such as ssh. Note that it requires the fixes
to the ssh port to disable the unconditional USE_PIPES option that was
recently added. The rcmd(3) optimisation is disabled if a non-rsh program
is speficied.
for bootstrap" tweak to the lex Makefile to stop it building the library
too early.
This untangles things a bit more, it stops new bootstraps failing because
libl/libfl uses 'ld -O' before ld is updated.
shared memory size, average unshared data size, and average unshared
stack size were too high by a factor of 128/100, because the program
used a hard-coded hz value of 100. The correct value is the frequency
of the statistics clock, currently 128. The program now uses sysctl
to get the stathz value from the kernel.
Discussed with: bde@freebsd.org (Bruce Evans)
there is no target to make.
% make
make: make: no target to make.
%
Beause the function Punt() in main.c takes care of leading 'make:' and
trailing newline, so, there is no need to pass explicitly.
Submitted by: enami@ba2.so-net.or.jp
Obtained from: NetBSD GNATS
The fundamental problem with the original code is that it accesses
p[-2] which is one before the beginning of the input buffer for
empty lines. rev.1.6 just moved the problem from failures when
p[-2] happens to be '\\' to failures when it happens to be '\0'.
rev.1.5 was confused about the trailing newline and other things.
I went back to rev.1.5 and fixed it. The result is the same as
Keith Bostic's final version in PR 1356 except it loses more
gracefully for excessively long input lines.
Obtained from: Christos Zoulas <christos@deshaw.com> via NetBSD PR 2621,
[ slightly modified since we don't use libcompat anymore. ]
I'm not sure if this fixes the rdist security bug completely, but it
sure can't hurt!
This stuff should not be too destructive if the IPDIVERT is not compiled in..
be aware that this changes the size of the ip_fw struct
so ipfw needs to be recompiled to use it.. more changes coming to clean this up.
to 1K to avoid waiting too long between 2 progress reports in the case of a
slow transfer.
Move the signal()/setitimer() code just before the read loop because the
ftpio library set and reset the timer internally.
option to pwd_mkdb and adding this option to utilities invoking it.
Further, the filling of both the secure and insecure databases has been
merged into one loop giving also a performance improvemnet.
Note that I did *not* change the adduser command. I don't read perl
(it is a write only language anyway).
The change will drastically improve performance for passwd and
friends with large passwd files. Vipw's performance won't change.
In order to do that some kind of diff should be made between the
old and new master.passwd and depending the amount of changes, an
incremental or complete update of the databases should be agreed
upon.
has been broken at least since 4.4Lite moved most of the #defines out of
<sys/ioctl.h>. This should be done better. Only a few headers are
searched.
Added some #includes so that ioctl.c compiles. The networking headers
have a maze of undocumented interdependencies and ioctl.c now actually
supports networking ioctls.
1. Add a copyright at the top.
2. Make passive and binary modes work with new ftpio semantics.
3. Add a `mirror' (-m) flag which only copies the remote file if it's
not the same size or is newer.
1. Always use file modtime, and if that's not usable then default
to current time.
2. Allow HTTP_TIMEOUT to be set as an environment variable to override
default.
3. Handle SIGTERM.
Add a 'bootstrap' target which *must* be run before building the new
version, since the new scanner relies on the current version of flex to
build itself otherwise.
the 4.3BSD command. Rewritten from scratch after the old man page,
taking account for the different situation with man pages and source
tree hierarchy (re: /usr/src/gnu) of the FreeBSD project.
Reviewed by: wosch (actually loooong time ago)
resolution profiling on Pentiums. On a 100MHz Pentium, the resolution
is at best 10 ns and actually a few hundred ns, but units of 10's or
100's of ns would be inconvenient and the current units of 1 us are a
bit too coarse.
of mbufs in use. If the number reached, e.g., 4 digits, then later
decreased to 3 digits, the last digit of the 4-digit number was
not erased. This caused the display to show a wildly high number of
mbufs in use.
Submitted by: invalid opcode <coredump@nervosa.com>
makewhatis.local - start makewhatis(1) only for file systems
physically mounted on the system
Running makewhatis from /etc/weekly for rw nfs-mounted /usr may kill
your NFS server -- all clients start makewhatis at the same time!
So use this wrapper instead calling makewhatis directly.
Pointed out by: Bruce
is available before trying to go hunting for a domain name. This fixes
the following problem: you have +::::::::: in /etc/master.passwd but
NIS isn't running (no ypbind, no domain name set) -- passwd and chpass
will still try to change an NIS password instead of the local one.
shell to one of the following:
- a non-existent file
- a non-regular file
- a file without any execute bits set
The shell is still set to whatever they entered even if the above
conditions exist (hey, it is the super user doing this after all :-),
but this might give the admin. some warning that they are about to screw
themselves and give them a chance to fix it before it is too late.
Inspired by: some new FreeBSD user on USENET who set his root shell
to a shell that doesn't exist and now can't gain access to root (don't
worry, I sent him some mail on how to recover from this).
"make world" to fail if you use the msun math library and
blow away /usr/include and then do "make world". This is because
the msun math.h isn't installed with the other include files before
xlint is built. It finally gets installed when the msun library
is built.
Perhaps "make world" should install the msun math.h file if
it doesn't install the CSRG math.h, to prevent problems
like this in the future.
man pages up to mdoc guidelines and fix some minor formatting glitches.
Also fixed a number of man pages to not abuse the .Xr macro to
display functions and path names and a lot of other junk.
allow the user to install using a Numeric GID or UID.
this brings it in to line with chgrp and chown, ans is required
by some people using FreeBSD in a product.
E.g. for Easter, and entries like "04/SunFirst" calendar will
now report:
04/05* Good Friday (2 days before easter)
04/07* First Sunday...
instead of:
Easter-2 Good Friday...
04/SunFirst First Sunday...
I also modified the calendar files to use the variable day format
for a lot of events so that they will be reported correctly.
E.g. U.S. daylight savings time is now listed as:
04/SunFirst Daylight savings time...
There are still a lot of wrong dates in there for some events
that move from year to year, but I don't have a good calendar handy
right now that I can use for reference.
remote peer will be connected through. This avoids the ``Checking for
invitation on caller's machine'' problem for multi-homed hosts.
Thanks to: Garrett, for his `find_interface' example
problems with tip. There are some hardwired timeouts that ignores the
delay that you can set in the modem configuration file. The hard-wire
delay is to short if the modem has to switch major modes and reset
(ie going from fax to data mode with a reset).
Now my modem transistions from HylaFax control to tip control and ppp mode
without any problems.
Submitted by: Douglas Ambrisko <ambrisko@tcs.com>
a master server and initialize the suser_override flag, but in a non-NIS
environment is should be smart enough to just leave the flag cleared
and return (unless forced with a command-line argument like -y).
Otherwise, it will return an NIS-related error even if NIS isn't
turned on.
Pointed out by: ache
messy 130 column collage, output the system totals -or- info for a
specific interface if -I is given. Also wait for <interval> before
outputting the first sample so that it represents meaningful data (as
opposed to the total since the system was booted - most busy systems
wrap around many times during their operation, so these numbers are
only misleading).
the next line of characters and not cause it to first get
the characters even if the count (cnt) has become 0.
Submitted by: R Bezuidenhout <rbezuide@mikom.csir.co.za>
In passwd(1):
- Gut most of yp_passwd.c and leave only a few things that aren't common
to pw_yp.c.
- Add support for -d and -h flags to select domains and NIS server hosts
to use when updating NIS passwords. This allows passwd(1) to be used
for changing NIS passwords from machines that aren't configured as
NIS clients. (This is mostly to allow passwd(1) to work on NIS master
servers that aren't configured as clients -- an NIS server need not
necessarily be configured as a client itself.)
NOTE: Realize that having the ability to specify a domain and hostname
lets you use passwd(1) (and chpass(1) too) to submit update requests
to yppasswd daemons running on remote servers in remote domains which
you may not even be bound to. For example, my machine at home is not
an NIS client of the servers on the network that I manage, yet I can
easily change my password at work using my FreeBSD box at home by doing:
'passwd -d work.net.domain -h any.nis.server.on.my.net wpaul'. (Yes,
I do use securenets at work; temporarily modified my securenets file
to give my home system access.) Some people may not be too thrilled
with this idea. Those who don't like this feature can recompile passwd(1)
and chpass(1) with -DPARANOID to restrict the use of these flags to
the superuser.
(Oh, I should be adding proper securenets support to ypserv(8) and
rpc.yppasswdd(8) over the weekend.)
- Merge in changes to allow root on the NIS master server to bypass
authentication and change any user's NIS password. (The super-user
on the NIS master already has privileges to do this, but doing it
through passwd(1) is much easier than updating the maps by hand.)
Note that passwd(1) communicates with rpc.yppasswdd(8) via a UNIX
domain socket instead of via standard RPC/IP in this case.
- Update man page.
In chpass(1):
- Fix pw_yp.c to work properly in environments where NIS client
services aren't available.
- Use realloc() instead of malloc() in copy_yp_pass() and copy_local_pass().
- Fix silly bug in copy_yp_pass(); some of the members of the passwd
structure weren't being filled in correctly. (This went unnoticed
for a while since the old yppasswdd didn't allow changes to the
fields that were being botched.)
- chpass(1) now also allows the superuser on the NIS master server to
make unrestricted changes to any user's NIS password information.
- Use UNIX domain comm channel to rpc.yppasswdd(8) when run by the
superuser on the NIS master. This allows several new things:
o superuser can update an entire master.passwd.{byname,byuid} entry
o superuser can update records in arbitrary domains using -d flag to
select a domain (before you could only change the default domain)
o superuser can _add_ records to the NIS master.passwd maps, provided
rpc.yppasswdd(8) has been started with the -a flag (to do this,
the superuser must force NIS operation by specifying the -y flag
to chpass(1) along with -a, i.e. 'chpass -y -a 'foo:::::::::')
- Back out the 'chpass -a <new password entry> breaks with NIS' fix
from the last revision and fix it properly this time. The previous
revision fixed the immediate problem but broke NIS operation in
some cases.
- In edit.c, be a little more reasonable about deciding when to
prevent the shell field from being changed.
Submitted by Charles Owens <owensc@enc.edu>, who said:
"I made a minor (one-line) modification to chpass, with regards
to whether or not it allows the changing of shells. In the 2.0.5 code,
field changing follows the settings specified in the "list" structure
defined in table.c . For the shell, though, this is ignored. A quick
look in edit.c showed me why, but I don't understand why it was written as
such. The logic was
if shell is standard shell, allow changing
I changed it to
if shell changing is allowed (per table.c) and it is a standard shell
OR if uid=0, then allow changing."
Makes sense to me.
- Update man page.
appear that ALL the passwd command does is change a users Kerberos
password, since that is incorrect.
Actually, this man page needs a good overhaul to better reflect systems
that don't have Kerberos installed.
Corrected some bogus cross references to man pages that we don't/won't
have and either deleted them, or found a more appropriate man page
that we do have. Various other minor changes to silence manck.
Manck is currently down to about 200 lines of errors, down from
the 500 - 600+ when I started all this.
``the last Monday in April'
- handle easter
new options
-f calendarfile
-A days
-B days
Calendar HOME directory ~/.calendar
don't sent mail if ~/.calendar/nomail exist
so that when ar has a problem (like trying to update a read-only
archive), you get a message like:
ar: xyzzy.a: Permission denined
instead of:
ar: xyzzy.a
Which doesn't really give the user any indication that the operation
really did fail.
This closes PR# 170.
route.c: look up the netname as-is first before the shifted name. this
makes a big speed difference, as the lookups are generally local
DNS. The shifted names can be very wrong (there is still guessing
and fudging involved) and usually go remote, taking a long time
to fail. If you have the RFC reccomended netnames in your reverse
lookups, this is even faster still.
main.c: dont do a sethostent(1) - this is causing the resolver to use a
VC (tcp) connection to the resolver, which has more overheads and
is slower than the default UDP case. This once made sense when
everything was based on text host tables.
scripts check for. (when looking explicitly for flex..)
Also, do some man links for the commands under their alternate names.
Install the c++ FlexLexer.h file as per the "XXX TODO" comment.
replaced our quota with the NetBSD one, then added all changes we made
to our - this is done to support the displaying of quota's over nfs
using the rpc.rquotad