Commit Graph

549 Commits

Author SHA1 Message Date
ache
aef44373fe Bump major number instead of minor 1995-05-08 16:08:49 +00:00
phk
021b1e61da Recognize slice type #6 as dos
handle OnTrack Disk manager correctly.
1995-05-08 02:08:33 +00:00
phk
6228dff953 Add check for rootfs > cyl 1024. 1995-05-08 01:34:31 +00:00
phk
dd5b13ab4b I bet Jordan is tearing his hair out, trying to figure the previous patch
out... here is the real thing.
1995-05-08 01:26:47 +00:00
phk
7633746449 Fix bug. 1995-05-08 00:44:46 +00:00
jkh
044b192e69 Whoops! An extra paren somehow got in there. Fixed. 1995-05-07 01:28:16 +00:00
jkh
97b64700b1 Always zero new chunks - keeps things like the private structures from having
bogus data in them.
1995-05-07 01:25:22 +00:00
phk
3f92c42b37 General sanitation and cleanup. Killed the "reserved" type, it wasn't. 1995-05-06 03:28:32 +00:00
dufault
e667a82b93 Make it so that the command formats are the same for both -i and -o.
This means "t" has to stand for bit fields, since b is a valid hex number.
1995-05-05 20:40:03 +00:00
phk
2ef08387ec If in Create_Chunk we (type==freebsd && (flags&CHUNK_ALIGN)), then we will
align this chunk properly.  Have at it Jordan...
1995-05-05 07:07:45 +00:00
phk
a0086bd087 Make the partitions names even more sensible
CheckRules sets the CHUNK_ALIGN & CHUNK_PAST_1024 flags.
1995-05-04 07:00:57 +00:00
phk
3a333cad85 Add the private void *pointer to the chunks, and the functions to manage it.
Make the reassignment of partition names less bogus.
1995-05-03 22:36:52 +00:00
ache
455d2a327b Bump minor number 1995-05-03 22:14:01 +00:00
ache
e945945e13 Bump minor number 1995-05-03 18:54:09 +00:00
wpaul
595e0167eb 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.
1995-05-03 18:33:10 +00:00
jkh
3864ecd382 Export the chunk names properly. 1995-05-03 17:38:00 +00:00
phk
af83fa703c Make the target for tst01 more sensible.
Remove bogus targets.
Allocate partition letters as follows:
	lowest offset "flags & CHUNK_IS_ROOT" gets 'a',
	lowest offset "subtype==FS_SWAP" gets 'b'
	the rest is allocated in offset order from this sequence "defghab".
This will generally make sense.
Added rules to complain if more than one CHUNK_IS_ROOT or more than one
FS_SWAP per FreeBSD chunk.
Set CHUNK_IS_ROOT on the 'a' partition in Open_Disk.
Run Fixup_Names in Open_Disk.
1995-05-03 06:30:59 +00:00
jkh
1c18a4d506 foo -> unknown 1995-05-02 20:16:16 +00:00
jkh
41c930394a I need Open_Disk() to not spew on my screen. #ifdef out some diagnostic
printfs.
1995-05-02 19:52:27 +00:00
ache
1f6da08da4 Fix bracket error for LogMask
Submitted by: Ruslan Belkin <rus@home2.UA.net>
1995-05-02 17:46:30 +00:00
jkh
d0d51976ab foo -> unknown.
I have to be able to show this stuff to the user. :-)
1995-05-01 21:30:24 +00:00
joerg
48dd93ce46 Added function and man page for ftok(3), used in conjunction with
the so-called "System V IPC".

Submitted by:	jbeukema@HK.Super.Net (John Beukema)
Obtained from:  Th. Lockert <tholo@sigmasoft.com>, via NetBSD
1995-05-01 08:53:21 +00:00
jkh
d369a779fb Stick a more BSD-like Makefile here so that I can link to the library. 1995-05-01 08:08:02 +00:00
phk
632f39cd53 start CHS is 0xff,0xff,0xff if past 1024.
end CHS is 1023,bios_hd,bios_sect if past 1024.  This way we can find
bios the geometry again.
Added a primitive "scan" to tst01.
1995-05-01 04:05:27 +00:00
phk
0ffc27529d Use the DIOCSYNCSLICE ioctl now. (use only with kernel from this morning).
Get the CHS's right.
Get the disklabels (more) right.
1995-04-30 22:51:05 +00:00
phk
207cc9aa1b get bootblocks right.
Add mbr and bteasy17 to tst01
read partitions from kernel instead of disk.
Still problems with writing labels, discussing with Bruce.
Extended slices doesn't get written yet.
1995-04-30 11:04:16 +00:00
phk
e3530256c9 Use 0xff for CHS when past 1024 cyls.
Fix (hopefully) a bug Gary found.
1995-04-30 07:30:45 +00:00
phk
5b57901e70 Make the default case less scary :-) 1995-04-30 06:19:32 +00:00
phk
b86a741dd0 Now we do writes too. 1995-04-30 06:09:29 +00:00
wpaul
bdad16fdda Small fix for the following problems:
- If you take the wheel entry out of /etc/group and turn on NIS,
the '+:*::' line is incorrectly flagged as the entry for wheel (the
empty gid section is translated to 0), hence getgrgid() returns '+'
as the name of the group instead of 'wheel.'

- Using just '+:' as the 'turn on NIS' switch in /etc/group makes
getgrgid() dump core because of a null pointer dereference. (Last
time I was in here, I foolishly assumed that fixing the core dump
problems with getgrnam() and getgrent() would fix getgrgid() too.
Silly me.)
1995-04-29 17:14:50 +00:00
phk
9684e60aa3 Names are assigned when chunks are created.
Rules for only one fat & one extended in MBR.
1995-04-29 07:21:14 +00:00
phk
2d7a4f8776 Even More stuff. Disk_Names() is here amongst other things. 1995-04-29 04:50:39 +00:00
phk
093fd20263 Next Iteration, getting better.
Made an All_FreeBSD() function.
Added a cmd-line interface (lowest rank) to the tst01 program.
The tst01 program is harmless (worst it can do is coredump), but it
is instructive to run, you can see what the slice-code things of your
disk...
1995-04-29 04:00:57 +00:00
phk
f7bf327ed4 Sanitize and explain a little bit... Implement the first rules... 1995-04-29 01:55:25 +00:00
phk
773ad9f330 This is a revision 0.00 of the backend stuff for the fdisk/disklabel stuff
in the new sysinstall.  If you want to give a helping hand, then send email
to phk@FreeBSD.ORG.  DO NOT COMMIT TO THIS DIRECTORY!
1995-04-28 23:57:04 +00:00
dufault
d1214fe1e8 Fix a few problems with the debugging output. Add a new "visit" function. 1995-04-28 19:23:51 +00:00
wollman
56ee4e4255 No sense in copying the hex[] array in each call to MDXEnd(), it's a
constant.  (There probably ought to be a single libc version of it.)
1995-04-27 16:05:51 +00:00
wpaul
b72b2e3557 ypbind.c: Major overhaul.
- 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.
1995-04-26 19:03:16 +00:00
jkh
41bc6e0fbe Fix a number of additional warnings. 1995-04-26 14:04:36 +00:00
jkh
dec02faeac Move <varargs.h> out of FtpLibrary.h and into the .c files that actually
need them.  Fix a number of additional warnings.
1995-04-26 14:04:23 +00:00
jkh
857fa9c3d0 Add libftp to list of targets. 1995-04-25 15:08:52 +00:00
jkh
fee9159363 Now check all the warning purges and general clean-up in on the second
pass.
1995-04-25 15:08:02 +00:00
jkh
e20597c1ef This commit was generated by cvs2svn to compensate for changes in r8064,
which included commits to RCS files with non-trunk default branches.
1995-04-25 15:05:11 +00:00
jkh
02ace70617 A programmatic interface to ftp. I need this for several other
components of the system.

The license is poorly worded, though I have an (email only) release
from the author for unlimited FreeBSD use.  I will try to get something
more concrete, though the author's remote location makes this difficult.
Submitted by:	Oleg Orel <orel@oea.ihep.su>
1995-04-25 15:05:11 +00:00
bde
ff316d0a9c Remove setre*id*. 1995-04-25 10:00:04 +00:00
ache
e332c87682 Add setreuid/setregid to MAN section 1995-04-23 15:06:16 +00:00
ache
14625e5bf4 Add setreuid/setregid 1995-04-23 12:34:48 +00:00
ache
0e058b2a04 Fix history info 1995-04-23 12:31:13 +00:00
wpaul
3d4135682a in _freecaches(): strdup() allocates us memory -- remember to free it. 1995-04-22 17:28:04 +00:00
wpaul
be813a3b68 small NIS binding fixes:
ypbind.c: if a client program asks ypbind for the name of the server
for a particular domain, and there isn't a binding for that domain
available yet, ypbind needs to supply a status value along with its
failure message. Set yprespbody.ypbind_error before returning from
a ypbindproc_domain request.

yplib.c: properly handle the error status messages ypbind now has the
ability to send us. Add a ypbinderr_string() function to decode the
error values.

ypwhich.c: handle ypbind errors correctly: yperr_string() can't handle
ypbind_status messages -- use ypbinderr_string instead.
1995-04-21 18:04:36 +00:00