Commit Graph

5710 Commits

Author SHA1 Message Date
deischen
e10ec22ca9 This has been sitting in my local tree long enough. Remove the use
of an alternate signal stack for handling signals.  Let the kernel
send signals on the stack of the current thread and teach the threads
signal handler how to deliver signals to the current thread if it
needs to.  Also, always store a threads context as a jmp_buf.  Eventually
this will change to be a ucontext_t or mcontext_t.

Other small nits.  Use struct pthread * instead of pthread_t in internal
library routines.  The threads code wants struct pthread *, and pthread_t
doesn't necessarily have to be the same.

Reviewed by:	jasone
2002-02-09 19:58:41 +00:00
deischen
8e65d97094 Silence a warning by initializing the return value. This wasn't
set in the case of a short write, and I think returning 0 for this
is what was intended.
2002-02-09 19:48:55 +00:00
des
3c6d7c07a6 This file needs <syslog.h>.
Sponsored by:	DARPA, NAI Labs
2002-02-09 14:12:09 +00:00
ru
30d096e328 Now that cross-tools ld(1) has been fixed to look for dynamic
dependencies in the correct place, record the fact that -lssh
depends on -lcrypto and -lz.

Removed false dependencies on -lz (except ssh(1) and sshd(8)).
Removed false dependencies on -lcrypto and -lutil for scp(1).

Reviewed by:	markm
2002-02-08 13:42:58 +00:00
ru
61a541d3ea FreeBSD 4.1 bootstrapping aid (__FBSDID is not there). 2002-02-08 09:34:17 +00:00
julian
bac4630ef2 pre-emptively fix a KSE/M3 problem.
Make a slight change so that libkvm reaches the main thread via the
linked list, rather than assuming it is in the proc structure. Both
conditions are true in -current but only the first will be true in
the KSE M3 world.
2002-02-07 20:28:25 +00:00
alfred
98c9e6abb2 Move the AF_LOCAL check to the AF_INET check since portmap protocol
v. 2 only needs this. That also makes it shorter and simpler.

Submitted by: mbr
2002-02-06 19:14:02 +00:00
markm
457eeff84e Remove NO_WERROR, now that WARNS=n is gone. 2002-02-06 18:46:48 +00:00
markm
8c9c08fa01 Comment out the WARNS= so as to not trample all over the GCC3 work. 2002-02-06 18:14:59 +00:00
alfred
e0b632059e remove -M from RPCCOM, it slipped in with the tirpc upgrade.
Submitted by: mbr
2002-02-06 16:13:04 +00:00
des
fd2dce8fb2 ANSIfy and remove some dead code.
Sponsored by:	DARPA, NAI Labs
2002-02-06 15:26:07 +00:00
des
466717b039 Apply the following mechanical transformations in preparation for
ansification and constification:

    s{\s+__P\((\(.*?\))\)}{$1}g;
    s{\(\s+}{\(}g;
    s{\s+\)}{\)}g;
    s{\s+,}{,}g;
    s{(\s+)(for|if|switch|while)\(}{$1$2 \(}g;
    s{return ([^\(].*?);}{return ($1);}g;
    s{([\w\)])([!=+/\*-]?=)([\w\(+-])}{$1 $2 $3}g;
    s{\s+$}{\n};g

Also add $FreeBSD$ where needed.

MFC after:	1 week
2002-02-06 13:30:31 +00:00
alfred
40f52746f1 balance parens.
Submitted by: mbr
2002-02-05 23:56:29 +00:00
alfred
c6ad9f2b51 For RPC v2 we need to fill in ret->xp_raddr too. INET_6
is not supported in portmap, so we don't have to care about it.

Submitted by: mbr
2002-02-05 23:46:37 +00:00
alfred
09dc767ffd Fix cc -Wall, fix rcsid warnings, add missing prototypes,
change prototypes to be the same as in the original sun tirpc code.
Remove ()P macro in a file where the mayority had ()P already removed.
Add them if the mayority use ()P macros.

Submitted by: mbr
Requested by: bde
2002-02-05 23:43:43 +00:00
alfred
36365ba0fe Do not call addrinfo on local transport adresses, if returning a
server handle (for reuse or whatever). We just return now a handle
connected to the local rpcbind.

Do not try to call checkcache, if host = NULL;

Submitted by: mbr
2002-02-05 23:12:51 +00:00
des
6428d00171 Switch to a self-starting allocation scheme. 2002-02-05 22:15:16 +00:00
des
562afadccd Reindent, and add parentheses to return statements. Some functions in
ftp.c and http.c now have exceedingly long lines due to deep nesting;
this will be corrected by reorganizing the code in a later revision.
2002-02-05 22:13:51 +00:00
des
819f582fa9 Eliminate a redundant loop. 2002-02-05 21:32:16 +00:00
alfred
31d0eba580 style: return(x) -> return (x)
Submitted by: mbr
2002-02-05 19:31:16 +00:00
alfred
5c29c78610 Fix the credential handling code.
In NetBSD, Solaris, xprt->xp_p2 pointed directly to the credentials,
in FreeBSD xprt->xp_verf.oa_base was a pointer to a struct cmessage,
which is defined as follow:

struct cmessage {
        struct cmsghdr cmsg;
        struct cmsgcred cmcred;
};

The credentials were submitted the right way and xprt->xp_p2 pointed to them.
But cb_verf.oa_flavor was still empty. There was an assignment missing
in svc_recv() in svc_vc.c:

msg->rm_call.cb_verf.oa_flavor = AUTH_UNIX;

Also

+       if (addr.ss_family == AF_LOCAL) {
+               xprt->xp_raddr = *(struct sockaddr_in *)xprt->xp_rtaddr.buf;
+               xprt->xp_addrlen = sizeof (struct sockaddr_in);
+       }

was missing. But the first seems not to be needed:

I guess in rpc.yppasswdd there was a typo:

- transp>xp_verf.oa_flavor != AUTH_UNIX) {
+ rqstp->rq_cred.oa_flavor != AUTH_UNIX) {

This little fix does fix the breakage in rpc.yppasswdd :-)

+       if (msg.msg_controllen == 0 ||
+           (msg.msg_flags & MSG_CTRUNC) != 0)
+               return (-1);

We cannot set the cb_verf.oa_length in svc_recv() of svc_vc.c,
the credentials get overwritten then, and that's bad.

Submitted by: mbr
2002-02-05 19:30:30 +00:00
alfred
209bbae71b The clnt_create(KEYSERVSOCK, CRYPT_PROG, CRYPT_VERS, "unix") hacks
were removed and replaced them with clnt_tp_create, now the af_local
support is fixed.

I also removed the hack how rpcinfo contacted rpcbind, now we can
relay on clnt_tp_create create the client-handle for us.  Only
rpcbind itself needs a hardcoded socket-path.

Submitted by: mbr

Also add $FreeBSD
2002-02-05 19:26:04 +00:00
des
3fee8649db Three times lucky: <stddef.h>, not <sys/param.h> 2002-02-05 08:01:32 +00:00
des
454507fe95 Oops, the correct header to include for NULL is <sys/param.h>. 2002-02-05 07:53:00 +00:00
des
9b5868cb09 ANSIfy and constify.
Sponsored by:	DARPA, NAI Labs
2002-02-05 06:49:11 +00:00
des
abd5ecf34f #include <sys/types.h> for NULL (hidden by Linux-PAM header pollution)
Sponsored by:	DARPA, NAI Labs
2002-02-05 06:20:27 +00:00
des
afb0fc98b7 #include cleanup.
Sponsored by:	DARPA, NAI Labs
2002-02-05 06:08:26 +00:00
nectar
caff020805 hex.c is new in libisc with 8.3.1-REL. 2002-02-04 19:18:23 +00:00
markm
85154cd557 Explicitly declare (gcc internal) functions.
Submitted by:	ru
2002-02-04 17:59:25 +00:00
des
363667c344 ssh_get_authentication_connection() gets its parameters from environment
variables, so temporarily switch to the PAM environment before calling it.

Submitted by:	Takanori Saneto <sanewo@ba2.so-net.ne.jp>
2002-02-04 17:15:44 +00:00
markm
f0ff066ccd Protect "make buildworld" against -Werror, as this module does not
build cleanly.
2002-02-04 16:09:25 +00:00
sobomax
498d25da40 Allow ldd(1) be used on shared libraries in addition to executables. 2002-02-04 10:33:48 +00:00
markm
76869421fb Add the other half of the salt-generating code. No functional
difference except that the salt is slightly harder to build
dictionaries against, and the code does not use srandom[dev]().
2002-02-04 00:28:54 +00:00
markm
322a000eef Turn on fascist warning mode. 2002-02-03 15:51:52 +00:00
markm
d535c2edc0 WARNS=n fixes (and some stylistic issues). 2002-02-03 15:17:57 +00:00
des
5b7c55d42c Remove an unnecessary #include that trips up OpenPAM. The header in question
is an internal Linux-PAM header which shouldn't be used outside Linux-PAM
itself, and has absolutely zero effect on pam_ftp.

Sponsored by:	DARPA, NAI Labs
MFC after:	1 week
2002-02-02 17:51:39 +00:00
bde
50885ba5f7 Fixed world breakage in previous commit. The generated headers are in
the current directory which is rarely ${.CURDIR}.
2002-02-02 00:20:32 +00:00
bde
9574e60703 Fixed tab lossage in vendor id and nearby style bugs in previous commit. 2002-02-01 23:26:32 +00:00
bde
489149c29d Fixed syntax error in previous commit. It was non-fatal because it was
in conditional code that happens not to be compiled, and because gcc
doesn't complain garbage after #endif by default.

Fixed some style bugs in previous commit, 1.8 and 1.1.
2002-02-01 23:16:39 +00:00
des
5bd2f451ce Post-repocopy cleanup.
Sponsored by:	DARPA, NAI Labs
2002-02-01 22:25:07 +00:00
sobomax
6a6b9c7ad4 Complete bzip2-1.0.2 import.
MFC in:		14 days
2002-02-01 16:33:40 +00:00
des
40c2d5a7c3 Connect the pam_lastlog(8) and pam_login_access(8) modules to the build.
Sponsored by:	DARPA, NAI Labs
2002-02-01 08:49:53 +00:00
roam
ce437c6888 Return ENONAME if getaddrinfo() is called with AI_NUMERICHOST
and the hostname given is not numeric.

PR:		34390
Submitted by:	Serge van den Boom <svdb@stack.nl>
Approved by:	silence from -net
MFC after:	1 month
2002-02-01 08:35:16 +00:00
obrien
9b2a0da2ad Fixed slipage in editor. 2002-02-01 07:26:00 +00:00
obrien
062a13c024 Cut-n-paste in `list' mode considered harmful. 2002-02-01 07:25:07 +00:00
obrien
e2d268e937 * Remove __P and convert to ANSI prototypes.
* Remove 'register'.  (some functions had 7+ register functions...)
* Fix SCM ID's.
2002-02-01 01:39:09 +00:00
obrien
a6caaff1d6 * Remove __P and convert to ANSI prototypes.
* Remove 'register'.  (some functions had 7+ register functions...)
* Fix SCM ID's.
2002-02-01 01:32:19 +00:00
obrien
ad9bed1c26 * Remove 'register'. (some functions had 7+ register functions...)
* Fix SCM ID's.
2002-02-01 01:08:48 +00:00
obrien
eeebe0a4b6 Fix SCM ID's. 2002-02-01 00:57:29 +00:00
obrien
8028fabf78 Fix minor style nit. 2002-01-31 17:26:37 +00:00