using %lu. This became more broken when I fixed dbtob() to support byte
offsets >= 4GB. The type had to change to [u]quad_t. Previously the
expressions had type unsigned long and were printed using %d. After
division by 1024, the expressions are guaranteed to fit in an unsigned
long, at least for the standard DEV_BSIZE, so edquota doesn't need to
know about quad_t's explicitly.
Fix all the other format mismatches exposed by compiling with -Wformat
(6 more quota limits of type unsigned long printed using %d and 6 time_t's
(i.e., longs) printed using %d).
fixed, we should be able to fully set up the user's disk. Still to come
with next commit: filesystem setup, distribution extraction, final
configuration.
may not be desired if you're just going to blow the kernel away again later)
and substitute one that tells the user where the new kernel build
directory actually IS, which can at least be argued to be useful information
in all cases.
Reviewed by: davidg
ypbind.c:
Make fewer assumtions about the state of the dom_alive and dom_broadcasting
flags in roc_received().
Cosmetic changes and paranoia checks:
ypbind.c:
Make fewer assumtions about the state of the dom_alive and dom_broadcasting
flags in roc_received().
If select() fails, use syslog() to report the error rather than perror().
Check that all our malloc()s succeed. Report malloc() failure in
ypbindproc_setdom_2() to callers.
yplib.c:
Use #defined constants in ypbinderr_string() rather than hard-coded values.
Correct Makefile so that we build during all: and only install for
make install.
If /etc/sysconfig exists source it to get the flags for restarting
named with. If /etc/sysconfig says no named runs, don't try to start one.
Don't attempt to kill anything if we can not find the named.pid file.
Reviewed by: Nickolay N. Dudorov <nnd@gw.itfs.nsk.su>
nor is it in sync with my working sources, but it leaves me less CVS hassles
to bring in the new files at this time. Still no documentation to translate
quite yet, but soon. This stuff is actually very close now.
o Make the framework generally more robust.
o Figured out how to nest the menu descriptions - no more grotty initialization
of menus.
o Fix bug with helpline and helpfile not being reset.
o Add stubs for the media selection code.
Coming next: Fdisk and disklabel screens using Phk's new libdisk stuff.
Added another couple of menu item types.
Reshuffled the menus and added a few more. Sure wish I could figure out
how to initialize a menu with _one_ initializer rather than two! :(
more to come in the next 24 hours, this is just the first stable result of
8 hours of hacking so far. The specification format for menus is pretty
much hammered out and the beginnings (very humble) of the doc hierarchy
are present for an example. It should be quite easy to add a lot more
menus quickly to this since I did go somewhat out of my way to make the
framework easy to work with. This is NOT the glorious semi-graphical
sysinstall (or whatever its name will be) that the install-geeks are working
on, this is simply the "son of sysinstall" I've been promising to write in
the interim for 2.0.5 and 2.1R (super install doesn't come until 2.2R).
>Number: 368
>Category: bin
>Synopsis: Lpd doesn't log errors after failed exec
>Description:
If an exec done by lpd fails, nothing is sent to the system log
indicating what went wrong. This is because lpd closes all of
the file descriptors before doing the exec, thus closing the syslog
file descriptor in the process.
[Fix applied]
Submitted by: pritc003@maroon.tc.umn.edu
- Moved to a more client-driven model. We aggressively attempt to keep
the default domain bound (as before) but we give up on non-default
domains if we lose contact with a server and fail to get a response
after one round of broadcasting. This helps drastically reduce the
amount of network bandwitdh that ypbind consumes: if a client references
the secondary domain at some later point, this will prod ypbind into
establishing a new binding anyway, so continuously broadcasting without
need is pointless.
Note that we still actively seek out a binding for our default domain
even if no client program has queried us yet. I'm not exactly sure if
this matches SunOS's behavior or not, but I decided to do it this way
since we can get into all sorts of trouble if our default domain comes
unbound. Even so, we're still much quieter than we used to be.
- Removed a bunch of no-longer pertinent comments and a couple of
chunks of #ifdef 0'ed code that no longer fit in to the new layout.
- Theo deRaadt must have become frustrated with the callback mechanism
in clnt_broadcast(), because he shamelessly stole the clnt_broadcast()
code right out of the RPC library and hacked it up to suit his needs.
(Comments and all! :)
I can understand why: clnt_broadcast() blocks while awaiting replies.
Changing this behavior requires surgery. However, you can work around
this: fork the broadcast into a child process and relay the results
back to the parent via a pipe. (Careful obervation has shown that the
SunOS ypbind forks children for broadcasting too, though I can only
guess what sort of interprocess communication it uses. pipe() seems to
do the job well enough.)
This may seem like the long way around, but it's not really that
hard to implement, and I'd prefer to use documented RPC library functions
wherever possible. We're careful to limit the number of simultaneous
broadcasters to avoid swamping the system (the current limit is 5).
Each clnt_broadcast() call only sends out a small number of packets
at increasing intervals. We're also careful not to spawn more than one
bradcaster for a given domain.
- Used clntudp_bufcreate() and clnt_call() to implement a ping()
function for directly querying a particular server so that we can
check if it's still alive. This lets me completely remove the old
bradcasting code and use actual RPC library calls instead, at the
cost of more than a few handfulls of torn-out hair. (Make no mistake
folks: I *HATE* RPC.) Currently, the ping interval is one minute.
- Fixed another potential 'nfds too big for select()' bug: use
_rpc_dtablesize() instead of getdtablesize().
- Quieted gcc -Wall a bit.
- Probably a bunch of other stuff that I've forgotten.
ypbind.8:
- Updated man page to reflect modifications.
ypwhich.c:
- Small mind-o fix from last time: decode error results from
ypbind correctly (*groan*)
yplib.c:
- same as above
- Change behavior of _yp_dobind() a little: if we get back a 'Domain
not bound' error for a given domain, retry a few times before giving
up and passing the error back to the caller. We have to sleep for a
few seconds between tries since the 'Domain not bound' error comes
back immediately (by repeatedly looping, we end up pounding on ypbind).
We retry at most 20 times at 5 second intervals. This gives us a full
minute to get a response. This seems to deviate a bit from SunOS
behavior -- it appears to wait forever -- but I don't like the idea
of perpetually hanging inside a library call.
Note that this should fix the problems some people have with bindings
not being established fast enough at boot time; sometimes amd is started
in /etc/rc after ypbind has run but before it gets a binding set up. The
automounter gets annoyed at this and tends to exit. By pausing ther YP
calls until a binding is ready, we avoid this situation.
- Another _yp_dobind() change: if we determine that our binding files
are unlocked or nonexistent, jump directly to code that pokes ypbind
into restablishing the binding. Again, if it fails, we'll time out
eventually and return.
Also allow URL specification for a package. This works for things the
package may depend on, too.
Allow PKG_PATH to be used anywhere a package is being searched for.