Commit Graph

870 Commits

Author SHA1 Message Date
Bruce Evans
7da87484df Fix checks for open() failing. open() may successfully return 0.
ld.c:
Fix a an error message that said that open() failed after fopen() failed.
1995-09-28 19:43:22 +00:00
Bruce Evans
252eedb90d Intitialize $(tmac_s_ and $(tmac_m). Use the initialized variable $(device)
instead of the uninitialized one $(DEVICE).

I hoped these changes would fix some of the large runtime macro processing
bugs, but they seem to only fix some small build-time macro substitution
bugs.  E.g., `man ms' now tells you to invoke groff with the flags `-ms'
instead of the bogus flags `-m'; `man groff now tells you that the default
device is `ps' instead of the bogus device `'.
1995-09-28 19:31:07 +00:00
Nate Williams
6f5457454c Make the error message more readable when 'ld.so' cannot locate a needed
shared library.  Formerly, the message looked like this:

    ld.so: run: libjdp1.so.1.0: Undefined error: 0

The new message looks like this:

    ld.so: run: Can't find shared library "libjdp1.so.1.0"

(Where "run" is the name of the program being executed.)

Submitted by:	jdp@polstra.com (John Polstra)
1995-09-27 23:17:33 +00:00
Nate Williams
e1ec3d8b3c Fixup the "ld.so failed" message for the case when ld.so finds undefined
symbols.

An easy example to see this is to develop an X program which links
against Xt, but doesn't add -lX11 to the link line.  It will link fine,
but cause run-time errors by ld.so because of missing symbols used by Xt
defined in X11.  This patch makes the errors more readable.

Submitted by:   jdp@polstra.com (John Polstra)
1995-09-27 23:14:08 +00:00
Bill Paul
336844dba4 phkmalloc strikes!
#ifdef out a number of calls to free() left over from the original
GNU ypserv implementation. As near as I can tell, the Berkeley DB
package does its own garbage collection, hence the caller doesn't
have to worry about free()ing the memory returned in the DBT
structures during lookups (I'm still not 1005 sure about this:
the DB code is very hard to follow. I must use dynamically
allocated memory since you can retreive arbitrarily large records
from a database, but I'm not sure where it ends up letting go
of it). This was not true with GDBM; you had
to do your own garbage collection.

The general rule is that if you allocate memory inside an RPC
service routine, you have to free() it the next time the routine is
called since the underlying XDR routines won't do it for you.
But if the DB package does this itself, then we don't need to do
it in the main program.

Note that with the original malloc(), there were never any errors
flagged. phkmalloc complained quite loudly.
1995-09-24 17:21:52 +00:00
Poul-Henning Kamp
0ad2ff70ee Stop using gnumalloc. 1995-09-22 14:14:32 +00:00
Andrey A. Chernov
44ac4ef672 Make it sgid dialer to read lockfiles 1995-09-15 00:05:07 +00:00
Andrey A. Chernov
f73f49f214 Make cu/uucico sgid dialer to help to work with others lockfiles,
they can't open root.dialer lockfiles in old variant.
1995-09-14 22:18:39 +00:00
Justin T. Gibbs
312b98f6bb Give "Index" specified filenames preference over other filenames specified
in the diff.  This makes it so that diffs containing files in different
subdirectories that have the same name not patch the same file.  For example
a diff with patches to Makefile, des/Makefile, usr.bin/Makefile would attempt
to patch Makefile three times.
1995-09-14 04:33:35 +00:00
Bruce Evans
3eb77f2c54 Output a zero rdev except for bdevs, cdevs, fifos and sockets. This
stops regular files with unrepresentable rdevs from being rejected
and makes the output independent of unpreservable metadata.
1995-09-12 16:38:16 +00:00
Joerg Wunsch
6f4da234fb Fix a few minor bugs in makewhatis.
Submitted by:	wosch@cs.tu-berlin.de (Wolfram Schneider)
1995-09-10 13:05:52 +00:00
Joerg Wunsch
60ce5bccf0 Re-initialize the terminal after ^Z / fg.
Submitted by:	thomas@ghpc8.ihf.rwth-aachen.de (Thomas Gellekum)
1995-09-10 13:04:45 +00:00
Peter Wemm
608eba4889 Put a bandaid on the NULL pointer dereference caused by doing an
"update -jHEAD" when a file has been added on the specified tag.

It doesn't actually make cvs 'handle' it, it just stops it from dying
and leaving stray locks and other wreckage.

This was suggested by the CVS maintainers, and is in cvs-1.5.1-950901.
1995-09-03 05:05:31 +00:00
Jordan K. Hubbard
4f898a4b38 Add MLINKS for sendbug manpage.
Suggested by:	paul
1995-08-29 13:01:40 +00:00
Jordan K. Hubbard
38f7fda14c Link send-pr to sendbug. sendbug is back! hurrah! 1995-08-28 23:16:28 +00:00
Joerg Wunsch
19d57e6d9d Import Paul Kranenburg's man page for ld.so (aka. rtld).
Obtained from:	NetBSD
1995-08-26 13:17:39 +00:00
Paul Traina
985c84c80e Clean up compilation warnings. 1995-08-23 05:37:24 +00:00
Paul Traina
3dcf64dcf0 Fix compilation warnings. 1995-08-23 05:35:03 +00:00
Andrey A. Chernov
2ac29091ed Upgrade 1.06 -> 1.06.1 1995-08-21 11:28:26 +00:00
Andrey A. Chernov
2bcf7e034b Fix LEGAL_GRADE determination, isalnum can return true when national
environment is active
1995-08-19 22:08:38 +00:00
Andrey A. Chernov
6ec4b3339b Commit delta: current -> 1.06 + FreeBSD configuration 1995-08-19 21:30:30 +00:00
Joerg Wunsch
1c7895ac54 Reset the umask before creating the output file; otherwise running
ldconfig as root with a restrictive umask yielded ld.so.hints
unreadable by the world (and thus useless).
1995-08-16 06:31:50 +00:00
Peter Wemm
f4df6549b2 This changes two things when importing an unreadable file:
1: It stops invalid files being created in the cvs tree
2: It stops the import from aborting without mailing a commit message..

The first is simple, it opens the file for reading before touching the
repository, and the second catches the pieces when it hits an unreadable
file rather than just aborting mid-way through, leaving the repository in
a bit mess.

Reviewed by:	rgrimes
1995-08-15 20:38:00 +00:00
Bill Paul
82b7305d30 Fix bug pointed out by user on c.u.b.f.m: commenting out NOPUSH=true
for master/slave configuration doesn't work because DOMAIN isn't
correctly defined.
1995-08-11 13:55:42 +00:00
Andrey A. Chernov
668eb4585f Replace ctime by strftime %c to use national representation 1995-08-08 03:20:25 +00:00
Andrey A. Chernov
6de8ce1a74 Replace ctime by strftime %c to use national representation 1995-08-08 03:07:15 +00:00
Bruce Evans
97cefc5891 Install source files with the -c flag, not with the optional flag ${COPY}. 1995-08-06 12:37:41 +00:00
Bruce Evans
48cfb668fc Change install' to ${INSTALL}' so that default install flags can be
specified in the top level Makefiles.

Previously I missed dozens of Makefiles that skip the install after
using `cmp -s' to decide that the install isn't necessary.
1995-08-06 12:24:38 +00:00
Joerg Wunsch
6aefd62078 Make only a -r' flag (as opposed to -r*') special within the
LINK_SPEC.  This solves a problem with the f77 frontend where
aproviding the -r8 option (use REAL*8) caused `cc' to ``forget'' to
pass the entry point to the linker.

Closes PR #gnu/644: f77 -r8

Reviewed by:	watanabe@komadori.earth.s.kobe-u.ac.jp (Takeshi WATANABE)
1995-08-04 17:11:32 +00:00
Paul Traina
522aab930c Don't build xditview unless the actual include files for X11 are present.
Merely checking for the directory is -not- sufficient, since the XFree86
non-programmers distribution has that directory to hold bitmaps.
1995-07-29 17:47:53 +00:00
Bruce Evans
9c0dc173cc Change install' to ${INSTALL}' so that default install flags can be
specified in the top level Makefiles.
1995-07-25 00:37:58 +00:00
Bruce Evans
db1e9e9ea9 Change install' to ${INSTALL}' as usual.
Use -c, not ${COPY}, to install `dir'.  ${COPY} should never be used to
install source files.  The source might be lost if the default is overridden.
1995-07-25 00:12:06 +00:00
Bruce Evans
ddb43e8bd8 Change install' to ${INSTALL}' as usual.
Don't remove targets before installing.  Removing targets will defeat
`install -C'.
1995-07-24 23:51:48 +00:00
Joerg Wunsch
37e0d97047 Make the tag checks more strict according to Rod's wishes.
Reviewed by:
Submitted by:
Obtained from:
1995-07-23 17:34:00 +00:00
Bill Paul
76064c01e5 Updates, fixes and cleanups -- oh my.
In ypserv:

yp_svc.c:
- small signal handler tweak (hopefully the last): just use sigemptyset()
to clear sa_mask.

Makefile.yp:
- Let the user specify the location of master.passwd when updating
maps (e.g. make MASTER_PASSWD=/some/path/to/master.passwd). Editing
the file to change the location of master.passwd still works. This
is mostly to let yppassswdd specify the name of the master.passwd
file itself.

In yppasswdd:

yppasswdd.c:
- Roll in some minor changes (mostly casts) from Olaf Kirch's latest
yppasswd package release (version 0.7).
- Use daemon() instead of doing all the deamonizing gruntwork ourselves.
- Call pw_init() after daemonizing ourselves. pw_init() sets up some
resource limits and blocks some signals for us. We used to do this before
every password change, but there's really no point in calling it more
than once during the life of the program.
- Change install_reaper() so that we can use it to de-install the SIGCHLD
handler if we need to (and we do in pw_mkdb() -- this is what I get for
splicing code from two different programs together).
- Use sigemptyset(&act.sa_mask) rather than act.sa_mask = 0: the latter is
decidedly non-portable. (In IRIX, HP-UX and Solaris, sigset_t is an
array of longs, not an int.)

update.c:
- Roll in change from new version (check that we're not modifying an NIS
entry in validate_args()).
- Get rid of call to pw_init() (moved to yppasswdd.c).
- Check return values from pw_util routines and return error status to
yppasswd clients if there's a problem.
- Straighten out password file copying mechanism a little. Keep a grip
on the original password file rather than summarily overwriting it so
that we can restore everything if we fail to fork() a process to update
the NIS maps.
- Pass the name of the password template file (specified with -m or
/etc/master.passwd by default) to the yppwupdate script, which in
turn should now pass it to /var/yp/Makefile.

pw_util.c:
- Nuke the pw_edit() and pw_prompt() functions -- we don't need them.
- Change all warn()s, warnx()s and err()s to syslog()s.
- Make sure we return error status to caller rather than bailing out
in pw_lock() and pw_tmp().
- Don't block SIGTERM in pw_init() (by ignoring SIGTERM, we prevent
yppasswdd from being shut down cleanly).
- Don't let pw_error() exit. (This stuff was stolen from chpass and vipw
which are interactive programs; it's okay to let pw_error() bail out
for these programs, but not in a daemon like yppasswdd).
- Fix signal handling in pw_mkdb (we need to temporarily de-install the
SIGCHLD handler so that we can wait on the pwd_mkdb child ourselves).

pw_copy.c:
- Change all warn()s, warnx()s and err()s to syslog()s.
- Add a bunch of returns() and make pw_copy() return and int ( 0 on success,
-1 on failure) so that update.c can flag errors properly.
- Return -1 after calling pw_error() to signal failures rather than
relying on pw_error() to bail out.
- Abort copying if we discover that we've been asked to change an entry
for a user that exists in the NIS passwd maps but not in the master.passwd
template file. This can happen if the passwd maps and the template file
fall out of sync with each other (or if somebody tries to spoof
us). The old behavior was to create add the entry to the password file,
which yppasswdd should not do under any circumstances.

Makefile:
- update VERSION to 0.7

yppasswdd.8:
- fix typo (forgot a carriage return somewhere)
- remove bogus reference to pwunconv(8) which FreeBSD doesn't have.
- bump version from 0.5 to 0.7
- Reflect changes in password file handling.

yppwupdate:
- Log map rebuilds to /var/yp/ypupdate.log.
- Pass the name of the template password file to /var/yp/Makefile as
$MASTER_PASSWD.
1995-07-19 17:44:41 +00:00
Andrey A. Chernov
622a231988 Update version info
Reviewed by:
Submitted by:
Obtained from:
1995-07-19 17:01:56 +00:00
Andrey A. Chernov
5d633ee823 Sync with bash 1.4.5 version
Check some null pointers before action, cosmetique fixes
Submitted by:
Obtained from:
1995-07-19 17:01:18 +00:00
Joerg Wunsch
d6d2ae6a56 Remove my last week's CFLAGS hack from Makefile.inc, and fix
info/Makefile instead to not clobber the settings inherited from
/etc/make.conf.
1995-07-16 10:24:18 +00:00
Bill Paul
1ede0846a7 Some small signal handling tweaks: be sure to keep wait3()ing until all
children are reaped and make sure to block SIGCHLD delivery during handler
execution when installing SIGCHLD handler with sigaction().
1995-07-15 23:27:49 +00:00
Bill Paul
c0837c7e13 Add missing 'break' statement in failure case of ypxfr switch clause. 1995-07-15 17:51:11 +00:00
Bill Paul
2c9d7bb779 server.c: When 'securenets' (actually TCP_WRAPPERS) is enabled, don't
syslog connections unless they were rejected. This helps save wear and
tear on the syslog facility in large networks with many clienst systems.

yp_svc.c: Be a little smarter about using sigaction() -- set the SA_RESTART
flag.

svc_run: Be doubly paranoid about killing off child processes. Do a flag
chack and a pid check before letting child 'threads' self-destruct.
1995-07-14 01:56:51 +00:00
Rodney W. Grimes
c7e5c6a843 Make ld's error messages consistent with gcc when no input files
are given on the command line.

Submitted by:	Thomas Graichen <graichen@omega.physik.fu-berlin.de>
1995-07-13 08:30:07 +00:00
Bruce Evans
fce8868368 Fix dependencies for regex.texi. It is constructed by merging a C header
file with an info source file.
1995-07-12 19:02:06 +00:00
Bruce Evans
460396d6ee Fix dependencies for gcc.info and reno.info. `make depend' doesn't handle
info files although texinfo supports @include.
1995-07-12 18:57:21 +00:00
Bill Paul
e1086b16a9 ypserv performance improvements:
- There are two cases where the server can potentially block for a long
  time while servicing a request: when handling a yp_all() request, which
  could take a while to complete if the map being transfered is large
  (e.g. 'ypcat passwd' where passwd.byname has 10,000 entries in it),
  and while doing DNS lookups when in SunOS compat mode (with the -dns
  flag), since some DNS lookups can take a long time to complete. While
  ypserv is blocked, other clients making requests to the server will
  also block. To fix this, we fork() ypall and DNS lookups into subprocesses
  and let the parent ypserv process go on servicing other incoming
  requests.

  We place a cap on the number of simultaneous processes that ypserv can
  fork (set at 20 for now) and go back to 'linear mode' if it hits the
  limit (which just means it won't fork() anymore until the number of
  simultaneous processes drops under 20 again). The cap does not apply
  to fork()s done as a result of ypxfr calls, since we want to do our
  best to insure that map transfers from master servers succeed.

  To make this work, we need our own special copy of svc_run() so that
  we can properly terminate child processes once the RPC dispatch
  functions have run.

  (I have no idea what SunOS does in this situation. The only other
  possibility I can think of is async socket I/O, but that seems
  like a headache and a half to implement.)

- Do the politically correct thing and use sigaction() instead of
  signal() to install the SIGCHLD handler and to ignore SIGPIPEs.

- Doing a yp_all() is sometimes slow due to the way read_database() is
  implemented. This is turn is due to a certain deficiency in the DB
  hash method: the R_CURSOR flag doesn't work, which means that when
  handed a key and asked to return the key/data pair for the _next_
  key in the map, we have to reset the DB pointer to the start of the
  database, step through until we find the requested key, step one
  space ahead to the _next_ key, and then use that. (The original ypserv
  code used GDBM has a function called gdbm_nextkey() that does
  this for you.) This can get really slow for large maps. However,
  when doing a ypall, it seems that all database access are sequential,
  so we can forgo the first step (the 'search the database until we find
  the key') since the database should remain open and the cursor
  should be positioned at the right place until the yp_all() call
  finishes. We can't make this assumption for arbitrary yp_first()s
  and yp_next()s however (since we may have requests from several clients
  for different maps all arriving at different times) so those we have
  to handle the old way.

  (This would be much easier if R_CURSOR really worked. Maybe I should
   be using something other than the hash method.)
1995-07-12 16:28:13 +00:00
Andreas Schulz
4942064e51 Fix two typos in a comment. 1995-07-08 21:42:59 +00:00
Andreas Schulz
b03c2f9c33 Makefile:
Fix the use of /usr/X386 to ${X11BASE}. Fix the pathname /usr/bin/chess
to /usr/games/chess.
XCircle.c:
Fix the comment after an ifdef to make it a real comment to silent gcc.
std.h:
Comment out a private definition of sys_errlist.
1995-07-08 21:40:01 +00:00
Joerg Wunsch
c3081fb7f9 I added a few lines of code to the latest info browser in the
texinfo-3.6 distribution to enable the use of the cursor keys.
Since there is an open problem report (gnu/289) for this it might be
of interest for (some of) you.

I (Joerg) have also added a minor hack that makes info recognizing a
window size change while it has been suspended.

Submitted by:	thomas@ghpc8.ihf.rwth-aachen.de (Thomas Gellekum)
1995-07-08 16:46:13 +00:00
Doug Rabson
2b7f9b5ea1 Define CPLUSPLUSLIB so that bsd.lib.mk will add c++rt0.o to call
constructors and destructors.
Add -lgcc_pic to LDADD for the shared library since C++ code uses stuff from
libgcc and we no longer have a shared libgcc.  Should this be done by
CPLUSPLUSLIB?
1995-07-05 15:04:47 +00:00
Bill Paul
3f95a88ec7 Oh fer cryin' out loud... While playing with the ypserv code on a different
platform, I discovered the following: if you use ypcat (or anything that
does a yp_all() for that matter) to dump out a map and then hit ^C before
it finishes, ypserv gets hit with a SIGPIPE and dies. (The ypall() service
is implemented using TCP.)

Fix: ignore SIGPIPEs.
1995-07-04 21:58:38 +00:00