sync
This commit is contained in:
parent
0f55503fed
commit
ab90ba3a7c
92 changed files with 264 additions and 259 deletions
|
@ -2823,6 +2823,7 @@
|
||||||
./usr/share/btrace
|
./usr/share/btrace
|
||||||
./usr/share/btrace/kprofile.bt
|
./usr/share/btrace/kprofile.bt
|
||||||
./usr/share/btrace/runqlat.bt
|
./usr/share/btrace/runqlat.bt
|
||||||
|
./usr/share/btrace/uprofile.bt
|
||||||
./usr/share/calendar
|
./usr/share/calendar
|
||||||
./usr/share/calendar/calendar.all
|
./usr/share/calendar/calendar.all
|
||||||
./usr/share/calendar/calendar.birthday
|
./usr/share/calendar/calendar.birthday
|
||||||
|
|
|
@ -72,8 +72,8 @@ __BEGIN_DECLS
|
||||||
extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *);
|
extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If a response verifier has flavor AUTH_SHORT,
|
* If a response verifier has flavor AUTH_SHORT,
|
||||||
* then the body of the response verifier encapsulates the following structure;
|
* then the body of the response verifier encapsulates the following structure;
|
||||||
* again it is serialized in the obvious fashion.
|
* again it is serialized in the obvious fashion.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -121,7 +121,7 @@ typedef struct __rpc_client {
|
||||||
const struct clnt_ops {
|
const struct clnt_ops {
|
||||||
/* call remote procedure */
|
/* call remote procedure */
|
||||||
enum clnt_stat (*cl_call)(struct __rpc_client *,
|
enum clnt_stat (*cl_call)(struct __rpc_client *,
|
||||||
unsigned long, xdrproc_t, caddr_t,
|
unsigned long, xdrproc_t, caddr_t,
|
||||||
xdrproc_t, caddr_t, struct timeval);
|
xdrproc_t, caddr_t, struct timeval);
|
||||||
/* abort a call */
|
/* abort a call */
|
||||||
void (*cl_abort)(struct __rpc_client *);
|
void (*cl_abort)(struct __rpc_client *);
|
||||||
|
@ -134,7 +134,7 @@ typedef struct __rpc_client {
|
||||||
/* destroy this structure */
|
/* destroy this structure */
|
||||||
void (*cl_destroy)(struct __rpc_client *);
|
void (*cl_destroy)(struct __rpc_client *);
|
||||||
/* the ioctl() of rpc */
|
/* the ioctl() of rpc */
|
||||||
bool_t (*cl_control)(struct __rpc_client *,
|
bool_t (*cl_control)(struct __rpc_client *,
|
||||||
unsigned int, void *);
|
unsigned int, void *);
|
||||||
} *cl_ops;
|
} *cl_ops;
|
||||||
caddr_t cl_private; /* private stuff */
|
caddr_t cl_private; /* private stuff */
|
||||||
|
@ -244,7 +244,7 @@ typedef struct __rpc_client {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Below are the client handle creation routines for the various
|
* Below are the client handle creation routines for the various
|
||||||
* implementations of client side rpc. They can return NULL if a
|
* implementations of client side rpc. They can return NULL if a
|
||||||
* creation failure occurs.
|
* creation failure occurs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ __END_DECLS
|
||||||
* unsigned int recvsz;
|
* unsigned int recvsz;
|
||||||
*/
|
*/
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
extern CLIENT *clnttcp_create(struct sockaddr_in *, unsigned long,
|
extern CLIENT *clnttcp_create(struct sockaddr_in *, unsigned long,
|
||||||
unsigned long, int *, unsigned int, unsigned int);
|
unsigned long, int *, unsigned int, unsigned int);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@ -313,9 +313,9 @@ __END_DECLS
|
||||||
* unsigned int recvsz;
|
* unsigned int recvsz;
|
||||||
*/
|
*/
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
extern CLIENT *clntudp_create(struct sockaddr_in *, unsigned long,
|
extern CLIENT *clntudp_create(struct sockaddr_in *, unsigned long,
|
||||||
unsigned long, struct timeval, int *);
|
unsigned long, struct timeval, int *);
|
||||||
extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, unsigned long,
|
extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, unsigned long,
|
||||||
unsigned long, struct timeval, int *, unsigned int, unsigned int);
|
unsigned long, struct timeval, int *, unsigned int, unsigned int);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ __END_DECLS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Like clnt_perror(), but is more verbose in its output
|
* Like clnt_perror(), but is more verbose in its output
|
||||||
*/
|
*/
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
extern void clnt_perrno(enum clnt_stat); /* stderr */
|
extern void clnt_perrno(enum clnt_stat); /* stderr */
|
||||||
extern char *clnt_sperrno(enum clnt_stat); /* string */
|
extern char *clnt_sperrno(enum clnt_stat); /* string */
|
||||||
|
@ -345,7 +345,7 @@ extern char *clnt_sperror(CLIENT *, char *); /* string */
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If a creation fails, the following allows the user to figure out why.
|
* If a creation fails, the following allows the user to figure out why.
|
||||||
*/
|
*/
|
||||||
struct rpc_createerr {
|
struct rpc_createerr {
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)pmap_clnt.h 1.11 88/02/08 SMI
|
* from: @(#)pmap_clnt.h 1.11 88/02/08 SMI
|
||||||
* @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC
|
* @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
* head = pmap_getmaps(address);
|
* head = pmap_getmaps(address);
|
||||||
* clnt_stat = pmap_rmtcall(address, program, version, procedure,
|
* clnt_stat = pmap_rmtcall(address, program, version, procedure,
|
||||||
* xdrargs, argsp, xdrres, resp, tout, port_ptr)
|
* xdrargs, argsp, xdrres, resp, tout, port_ptr)
|
||||||
* (works for udp only.)
|
* (works for udp only.)
|
||||||
* clnt_stat = clnt_broadcast(program, version, procedure,
|
* clnt_stat = clnt_broadcast(program, version, procedure,
|
||||||
* xdrargs, argsp, xdrres, resp, eachresult)
|
* xdrargs, argsp, xdrres, resp, eachresult)
|
||||||
* (like pmap_rmtcall, except the call is broadcasted to all
|
* (like pmap_rmtcall, except the call is broadcasted to all
|
||||||
|
@ -67,18 +67,18 @@
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
extern bool_t pmap_set(unsigned long, unsigned long, unsigned int,
|
extern bool_t pmap_set(unsigned long, unsigned long, unsigned int,
|
||||||
int);
|
int);
|
||||||
extern bool_t pmap_unset(unsigned long, unsigned long);
|
extern bool_t pmap_unset(unsigned long, unsigned long);
|
||||||
extern struct pmaplist *pmap_getmaps(struct sockaddr_in *);
|
extern struct pmaplist *pmap_getmaps(struct sockaddr_in *);
|
||||||
extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, unsigned long,
|
extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, unsigned long,
|
||||||
unsigned long, unsigned long, xdrproc_t, caddr_t,
|
unsigned long, unsigned long, xdrproc_t, caddr_t,
|
||||||
xdrproc_t, caddr_t, struct timeval,
|
xdrproc_t, caddr_t, struct timeval,
|
||||||
unsigned long *);
|
unsigned long *);
|
||||||
extern enum clnt_stat clnt_broadcast(unsigned long, unsigned long,
|
extern enum clnt_stat clnt_broadcast(unsigned long, unsigned long,
|
||||||
unsigned long, xdrproc_t, char *, xdrproc_t, char *,
|
unsigned long, xdrproc_t, char *, xdrproc_t, char *,
|
||||||
bool_t (*)(caddr_t, struct sockaddr_in *));
|
bool_t (*)(caddr_t, struct sockaddr_in *));
|
||||||
extern unsigned short pmap_getport(struct sockaddr_in *, unsigned long,
|
extern unsigned short pmap_getport(struct sockaddr_in *, unsigned long,
|
||||||
unsigned long, unsigned int);
|
unsigned long, unsigned int);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)pmap_prot.h 1.14 88/02/08 SMI
|
* from: @(#)pmap_prot.h 1.14 88/02/08 SMI
|
||||||
* @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC
|
* @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)pmap_rmt.h 1.2 88/02/08 SMI
|
* from: @(#)pmap_rmt.h 1.2 88/02/08 SMI
|
||||||
* @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC
|
* @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)rpc.h 1.9 88/02/08 SMI
|
* from: @(#)rpc.h 1.9 88/02/08 SMI
|
||||||
* @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC
|
* @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
#include <rpc/rpc_msg.h> /* protocol for rpc messages */
|
#include <rpc/rpc_msg.h> /* protocol for rpc messages */
|
||||||
#include <rpc/auth_unix.h> /* protocol for unix style cred */
|
#include <rpc/auth_unix.h> /* protocol for unix style cred */
|
||||||
/*
|
/*
|
||||||
* Uncomment-out the next line if you are building the rpc library with
|
* Uncomment-out the next line if you are building the rpc library with
|
||||||
* DES Authentication (see the README file in the secure_rpc/ directory).
|
* DES Authentication (see the README file in the secure_rpc/ directory).
|
||||||
*/
|
*/
|
||||||
#ifdef notdef
|
#ifdef notdef
|
||||||
|
|
|
@ -7,21 +7,21 @@
|
||||||
* This package is an SSL implementation written
|
* This package is an SSL implementation written
|
||||||
* by Eric Young (eay@mincom.oz.au).
|
* by Eric Young (eay@mincom.oz.au).
|
||||||
* The implementation was written so as to conform with Netscapes SSL.
|
* The implementation was written so as to conform with Netscapes SSL.
|
||||||
*
|
*
|
||||||
* This library is free for commercial and non-commercial use as long as
|
* This library is free for commercial and non-commercial use as long as
|
||||||
* the following conditions are aheared to. The following conditions
|
* the following conditions are aheared to. The following conditions
|
||||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||||
* included with this distribution is covered by the same copyright terms
|
* included with this distribution is covered by the same copyright terms
|
||||||
* except that the holder is Tim Hudson (tjh@mincom.oz.au).
|
* except that the holder is Tim Hudson (tjh@mincom.oz.au).
|
||||||
*
|
*
|
||||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||||
* the code are not to be removed.
|
* the code are not to be removed.
|
||||||
* If this package is used in a product, Eric Young should be given attribution
|
* If this package is used in a product, Eric Young should be given attribution
|
||||||
* as the author of the parts of the library used.
|
* as the author of the parts of the library used.
|
||||||
* This can be in the form of a textual message at program startup or
|
* This can be in the form of a textual message at program startup or
|
||||||
* in documentation (online or textual) provided with the package.
|
* in documentation (online or textual) provided with the package.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
* Eric Young (eay@mincom.oz.au)"
|
* Eric Young (eay@mincom.oz.au)"
|
||||||
* The word 'cryptographic' can be left out if the rouines from the library
|
* The word 'cryptographic' can be left out if the rouines from the library
|
||||||
* being used are not cryptographic related :-).
|
* being used are not cryptographic related :-).
|
||||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||||
* the apps directory (application code) you must include an acknowledgement:
|
* the apps directory (application code) you must include an acknowledgement:
|
||||||
* "This product includes software written by Tim Hudson (tjh@mincom.oz.au)"
|
* "This product includes software written by Tim Hudson (tjh@mincom.oz.au)"
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The licence and distribution terms for any publically available version or
|
* The licence and distribution terms for any publically available version or
|
||||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||||
* copied and put under another distribution licence
|
* copied and put under another distribution licence
|
||||||
|
@ -128,8 +128,8 @@ struct desparams {
|
||||||
*/
|
*/
|
||||||
#define DESIOCBLOCK _IOWR(d, 6, struct desparams)
|
#define DESIOCBLOCK _IOWR(d, 6, struct desparams)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Encrypt of small amount of data, quickly
|
* Encrypt of small amount of data, quickly
|
||||||
*/
|
*/
|
||||||
#define DESIOCQUICK _IOWR(d, 7, struct desparams)
|
#define DESIOCQUICK _IOWR(d, 7, struct desparams)
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)svc.h 1.20 88/02/08 SMI
|
* from: @(#)svc.h 1.20 88/02/08 SMI
|
||||||
* @(#)svc.h 2.2 88/07/29 4.0 RPCSRC
|
* @(#)svc.h 2.2 88/07/29 4.0 RPCSRC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ struct svc_req {
|
||||||
* unsigned long prog;
|
* unsigned long prog;
|
||||||
* unsigned long vers;
|
* unsigned long vers;
|
||||||
* void (*dispatch)();
|
* void (*dispatch)();
|
||||||
* int protocol; like TCP or UDP, zero means do not register
|
* int protocol; like TCP or UDP, zero means do not register
|
||||||
*/
|
*/
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
extern bool_t svc_register(SVCXPRT *, unsigned long, unsigned long,
|
extern bool_t svc_register(SVCXPRT *, unsigned long, unsigned long,
|
||||||
|
@ -211,7 +211,7 @@ __END_DECLS
|
||||||
/*
|
/*
|
||||||
* When the service routine is called, it must first check to see if it
|
* When the service routine is called, it must first check to see if it
|
||||||
* knows about the procedure; if not, it should call svcerr_noproc
|
* knows about the procedure; if not, it should call svcerr_noproc
|
||||||
* and return. If so, it should deserialize its arguments via
|
* and return. If so, it should deserialize its arguments via
|
||||||
* SVC_GETARGS (defined above). If the deserialization does not work,
|
* SVC_GETARGS (defined above). If the deserialization does not work,
|
||||||
* svcerr_decode should be called followed by a return. Successful
|
* svcerr_decode should be called followed by a return. Successful
|
||||||
* decoding of the arguments should be followed the execution of the
|
* decoding of the arguments should be followed the execution of the
|
||||||
|
@ -222,7 +222,7 @@ __END_DECLS
|
||||||
* Note: do not confuse access-control failure with weak authentication!
|
* Note: do not confuse access-control failure with weak authentication!
|
||||||
*
|
*
|
||||||
* NB: In pure implementations of rpc, the caller always waits for a reply
|
* NB: In pure implementations of rpc, the caller always waits for a reply
|
||||||
* msg. This message is sent when svc_sendreply is called.
|
* msg. This message is sent when svc_sendreply is called.
|
||||||
* Therefore pure service implementations should always call
|
* Therefore pure service implementations should always call
|
||||||
* svc_sendreply even if the function logically returns void; use
|
* svc_sendreply even if the function logically returns void; use
|
||||||
* xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows
|
* xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows
|
||||||
|
@ -244,7 +244,7 @@ extern void svcerr_auth(SVCXPRT *, enum auth_stat);
|
||||||
extern void svcerr_noprog(SVCXPRT *);
|
extern void svcerr_noprog(SVCXPRT *);
|
||||||
extern void svcerr_systemerr(SVCXPRT *);
|
extern void svcerr_systemerr(SVCXPRT *);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lowest level dispatching -OR- who owns this process anyway.
|
* Lowest level dispatching -OR- who owns this process anyway.
|
||||||
* Somebody has to wait for incoming requests and then call the correct
|
* Somebody has to wait for incoming requests and then call the correct
|
||||||
|
@ -258,7 +258,7 @@ __END_DECLS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Global keeper of rpc service descriptors in use
|
* Global keeper of rpc service descriptors in use
|
||||||
* dynamic; must be inspected before each call to select
|
* dynamic; must be inspected before each call to select
|
||||||
*/
|
*/
|
||||||
#include <sys/select.h> /* for fd_set */
|
#include <sys/select.h> /* for fd_set */
|
||||||
extern fd_set svc_fdset;
|
extern fd_set svc_fdset;
|
||||||
|
|
|
@ -105,10 +105,10 @@ typedef struct __rpc_xdr {
|
||||||
/* put a long to " */
|
/* put a long to " */
|
||||||
bool_t (*x_putlong)(struct __rpc_xdr *, long *);
|
bool_t (*x_putlong)(struct __rpc_xdr *, long *);
|
||||||
/* get some bytes from " */
|
/* get some bytes from " */
|
||||||
bool_t (*x_getbytes)(struct __rpc_xdr *, caddr_t,
|
bool_t (*x_getbytes)(struct __rpc_xdr *, caddr_t,
|
||||||
unsigned int);
|
unsigned int);
|
||||||
/* put some bytes to " */
|
/* put some bytes to " */
|
||||||
bool_t (*x_putbytes)(struct __rpc_xdr *, caddr_t,
|
bool_t (*x_putbytes)(struct __rpc_xdr *, caddr_t,
|
||||||
unsigned int);
|
unsigned int);
|
||||||
/* returns bytes off from beginning */
|
/* returns bytes off from beginning */
|
||||||
unsigned int (*x_getpostn)(struct __rpc_xdr *);
|
unsigned int (*x_getpostn)(struct __rpc_xdr *);
|
||||||
|
@ -254,16 +254,16 @@ extern bool_t xdr_int64_t(XDR *, int64_t *);
|
||||||
extern bool_t xdr_u_int64_t(XDR *, u_int64_t *);
|
extern bool_t xdr_u_int64_t(XDR *, u_int64_t *);
|
||||||
extern bool_t xdr_bool(XDR *, bool_t *);
|
extern bool_t xdr_bool(XDR *, bool_t *);
|
||||||
extern bool_t xdr_enum(XDR *, enum_t *);
|
extern bool_t xdr_enum(XDR *, enum_t *);
|
||||||
extern bool_t xdr_array(XDR *, char **, unsigned int *, unsigned int,
|
extern bool_t xdr_array(XDR *, char **, unsigned int *, unsigned int,
|
||||||
unsigned int, xdrproc_t);
|
unsigned int, xdrproc_t);
|
||||||
extern bool_t xdr_bytes(XDR *, char **, unsigned int *, unsigned int);
|
extern bool_t xdr_bytes(XDR *, char **, unsigned int *, unsigned int);
|
||||||
extern bool_t xdr_opaque(XDR *, caddr_t, unsigned int);
|
extern bool_t xdr_opaque(XDR *, caddr_t, unsigned int);
|
||||||
extern bool_t xdr_string(XDR *, char **, unsigned int);
|
extern bool_t xdr_string(XDR *, char **, unsigned int);
|
||||||
extern bool_t xdr_union(XDR *, enum_t *, char *, struct xdr_discrim *,
|
extern bool_t xdr_union(XDR *, enum_t *, char *, struct xdr_discrim *,
|
||||||
xdrproc_t);
|
xdrproc_t);
|
||||||
extern bool_t xdr_char(XDR *, char *);
|
extern bool_t xdr_char(XDR *, char *);
|
||||||
extern bool_t xdr_u_char(XDR *, unsigned char *);
|
extern bool_t xdr_u_char(XDR *, unsigned char *);
|
||||||
extern bool_t xdr_vector(XDR *, char *, unsigned int, unsigned int,
|
extern bool_t xdr_vector(XDR *, char *, unsigned int, unsigned int,
|
||||||
xdrproc_t);
|
xdrproc_t);
|
||||||
extern bool_t xdr_float(XDR *, float *);
|
extern bool_t xdr_float(XDR *, float *);
|
||||||
extern bool_t xdr_double(XDR *, double *);
|
extern bool_t xdr_double(XDR *, double *);
|
||||||
|
@ -277,7 +277,7 @@ __END_DECLS
|
||||||
* Common opaque bytes objects used by many rpc protocols;
|
* Common opaque bytes objects used by many rpc protocols;
|
||||||
* declared here due to commonality.
|
* declared here due to commonality.
|
||||||
*/
|
*/
|
||||||
#define MAX_NETOBJ_SZ 1024
|
#define MAX_NETOBJ_SZ 1024
|
||||||
struct netobj {
|
struct netobj {
|
||||||
unsigned int n_len;
|
unsigned int n_len;
|
||||||
char *n_bytes;
|
char *n_bytes;
|
||||||
|
|
|
@ -311,7 +311,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $verbose; then
|
if $verbose; then
|
||||||
printf "\nReloc counts:\nbefore:\n"
|
printf "\nReloc counts:\nbefore:\n"
|
||||||
grep ^R r1
|
grep ^R r1
|
||||||
printf "\nafter:\n"
|
printf "\nafter:\n"
|
||||||
grep ^R r2
|
grep ^R r2
|
||||||
|
|
|
@ -982,7 +982,7 @@ print(struct match *m, const char *caption, states st, int ch, FILE *d)
|
||||||
(void)fprintf(d, "\n");
|
(void)fprintf(d, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
- at - print current situation
|
- at - print current situation
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -89,7 +89,7 @@ regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
|
||||||
for (r = rerrs; r->code != 0; r++)
|
for (r = rerrs; r->code != 0; r++)
|
||||||
if (r->code == target)
|
if (r->code == target)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (errcode®_ITOA) {
|
if (errcode®_ITOA) {
|
||||||
if (r->code != 0) {
|
if (r->code != 0) {
|
||||||
assert(strlen(r->name) < sizeof(convbuf));
|
assert(strlen(r->name) < sizeof(convbuf));
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* auth_none.c
|
* auth_none.c
|
||||||
* Creates a client authentication handle for passing "null"
|
* Creates a client authentication handle for passing "null"
|
||||||
* credentials and verifiers to remote systems.
|
* credentials and verifiers to remote systems.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -106,7 +106,7 @@ authnone_marshal(AUTH *client, XDR *xdrs)
|
||||||
ap->marshalled_client, ap->mcnt));
|
ap->marshalled_client, ap->mcnt));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
authnone_verf(struct __rpc_auth *none)
|
authnone_verf(struct __rpc_auth *none)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* auth_unix.c, Implements UNIX style authentication parameters.
|
* auth_unix.c, Implements UNIX style authentication parameters.
|
||||||
*
|
*
|
||||||
* The system is very weak. The client uses no encryption for its
|
* The system is very weak. The client uses no encryption for its
|
||||||
* credentials and only sends null verifiers. The server sends backs
|
* credentials and only sends null verifiers. The server sends backs
|
||||||
* null verifiers or optionally a verifier that suggests a new short hand
|
* null verifiers or optionally a verifier that suggests a new short hand
|
||||||
|
@ -133,15 +133,15 @@ authunix_create(char *machname, int uid, int gid, int len, int *aup_gids)
|
||||||
* Serialize the parameters into origcred
|
* Serialize the parameters into origcred
|
||||||
*/
|
*/
|
||||||
xdrmem_create(&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE);
|
xdrmem_create(&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE);
|
||||||
if (!xdr_authunix_parms(&xdrs, &aup))
|
if (!xdr_authunix_parms(&xdrs, &aup))
|
||||||
goto authfail;
|
goto authfail;
|
||||||
au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs);
|
au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs);
|
||||||
au->au_origcred.oa_flavor = AUTH_UNIX;
|
au->au_origcred.oa_flavor = AUTH_UNIX;
|
||||||
#ifdef KERNEL
|
#ifdef KERNEL
|
||||||
au->au_origcred.oa_base = mem_alloc((u_int) len);
|
au->au_origcred.oa_base = mem_alloc((u_int) len);
|
||||||
#else
|
#else
|
||||||
if ((au->au_origcred.oa_base = mem_alloc((u_int) len)) == NULL)
|
if ((au->au_origcred.oa_base = mem_alloc((u_int) len)) == NULL)
|
||||||
goto authfail;
|
goto authfail;
|
||||||
#endif
|
#endif
|
||||||
memcpy(au->au_origcred.oa_base, mymem, (u_int)len);
|
memcpy(au->au_origcred.oa_base, mymem, (u_int)len);
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ authunix_refresh(AUTH *auth)
|
||||||
xdrmem_create(&xdrs, au->au_origcred.oa_base,
|
xdrmem_create(&xdrs, au->au_origcred.oa_base,
|
||||||
au->au_origcred.oa_length, XDR_DECODE);
|
au->au_origcred.oa_length, XDR_DECODE);
|
||||||
stat = xdr_authunix_parms(&xdrs, &aup);
|
stat = xdr_authunix_parms(&xdrs, &aup);
|
||||||
if (! stat)
|
if (! stat)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
/* update the time and serialize in place */
|
/* update the time and serialize in place */
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generic client creation: takes (hostname, program-number, protocol) and
|
* Generic client creation: takes (hostname, program-number, protocol) and
|
||||||
* returns client handle. Default options are set, which the user can
|
* returns client handle. Default options are set, which the user can
|
||||||
* change using the rpc equivalent of ioctl()'s.
|
* change using the rpc equivalent of ioctl()'s.
|
||||||
*/
|
*/
|
||||||
CLIENT *
|
CLIENT *
|
||||||
|
@ -62,7 +62,7 @@ clnt_create(char *hostname, u_long prog, u_long vers, char *proto)
|
||||||
* Only support INET for now
|
* Only support INET for now
|
||||||
*/
|
*/
|
||||||
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
|
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
|
||||||
rpc_createerr.cf_error.re_errno = EAFNOSUPPORT;
|
rpc_createerr.cf_error.re_errno = EAFNOSUPPORT;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
memset(&sin, 0, sizeof(sin));
|
memset(&sin, 0, sizeof(sin));
|
||||||
|
@ -73,7 +73,7 @@ clnt_create(char *hostname, u_long prog, u_long vers, char *proto)
|
||||||
p = getprotobyname(proto);
|
p = getprotobyname(proto);
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
|
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
|
||||||
rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
|
rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
sock = RPC_ANYSOCK;
|
sock = RPC_ANYSOCK;
|
||||||
|
@ -94,7 +94,7 @@ clnt_create(char *hostname, u_long prog, u_long vers, char *proto)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
|
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
|
||||||
rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
|
rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
return (client);
|
return (client);
|
||||||
|
|
|
@ -103,7 +103,7 @@ clntraw_create(u_long prog, u_long vers)
|
||||||
call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
|
call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
|
||||||
call_msg.rm_call.cb_prog = prog;
|
call_msg.rm_call.cb_prog = prog;
|
||||||
call_msg.rm_call.cb_vers = vers;
|
call_msg.rm_call.cb_vers = vers;
|
||||||
xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
|
xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
|
||||||
if (!xdr_callhdr(xdrs, &call_msg))
|
if (!xdr_callhdr(xdrs, &call_msg))
|
||||||
goto fail;
|
goto fail;
|
||||||
clp->mcnt = XDR_GETPOS(xdrs);
|
clp->mcnt = XDR_GETPOS(xdrs);
|
||||||
|
@ -131,7 +131,7 @@ fail:
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum clnt_stat
|
static enum clnt_stat
|
||||||
clntraw_call(CLIENT *h, u_long proc, xdrproc_t xargs, caddr_t argsp,
|
clntraw_call(CLIENT *h, u_long proc, xdrproc_t xargs, caddr_t argsp,
|
||||||
xdrproc_t xresults, caddr_t resultsp, struct timeval timeout)
|
xdrproc_t xresults, caddr_t resultsp, struct timeval timeout)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* clnt_simple.c
|
* clnt_simple.c
|
||||||
* Simplified front end to rpc.
|
* Simplified front end to rpc.
|
||||||
*/
|
*/
|
||||||
|
@ -81,7 +81,7 @@ callrpc(char *host, int prognum, int versnum, int procnum, xdrproc_t inproc,
|
||||||
}
|
}
|
||||||
if (crp->valid && crp->oldprognum == prognum && crp->oldversnum == versnum
|
if (crp->valid && crp->oldprognum == prognum && crp->oldversnum == versnum
|
||||||
&& strcmp(crp->oldhost, host) == 0) {
|
&& strcmp(crp->oldhost, host) == 0) {
|
||||||
/* reuse old client */
|
/* reuse old client */
|
||||||
} else {
|
} else {
|
||||||
crp->valid = 0;
|
crp->valid = 0;
|
||||||
if (crp->socket != -1) {
|
if (crp->socket != -1) {
|
||||||
|
@ -114,7 +114,7 @@ callrpc(char *host, int prognum, int versnum, int procnum, xdrproc_t inproc,
|
||||||
tottimeout.tv_usec = 0;
|
tottimeout.tv_usec = 0;
|
||||||
clnt_stat = clnt_call(crp->client, procnum, inproc, in,
|
clnt_stat = clnt_call(crp->client, procnum, inproc, in,
|
||||||
outproc, out, tottimeout);
|
outproc, out, tottimeout);
|
||||||
/*
|
/*
|
||||||
* if call failed, empty cache
|
* if call failed, empty cache
|
||||||
*/
|
*/
|
||||||
if (clnt_stat != RPC_SUCCESS)
|
if (clnt_stat != RPC_SUCCESS)
|
||||||
|
|
|
@ -83,7 +83,7 @@ struct ct_data {
|
||||||
int ct_connected; /* pre-connected */
|
int ct_connected; /* pre-connected */
|
||||||
struct timeval ct_wait;
|
struct timeval ct_wait;
|
||||||
bool_t ct_waitset; /* wait set by clnt_control? */
|
bool_t ct_waitset; /* wait set by clnt_control? */
|
||||||
struct sockaddr_in ct_addr;
|
struct sockaddr_in ct_addr;
|
||||||
struct rpc_err ct_error;
|
struct rpc_err ct_error;
|
||||||
char ct_mcall[MCALL_MSG_SIZE]; /* marshalled callmsg */
|
char ct_mcall[MCALL_MSG_SIZE]; /* marshalled callmsg */
|
||||||
u_int ct_mpos; /* pos after marshal */
|
u_int ct_mpos; /* pos after marshal */
|
||||||
|
|
|
@ -66,7 +66,7 @@ static const struct clnt_ops udp_ops = {
|
||||||
clntudp_control
|
clntudp_control
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Private data kept per client handle
|
* Private data kept per client handle
|
||||||
*/
|
*/
|
||||||
struct cu_data {
|
struct cu_data {
|
||||||
|
@ -198,7 +198,7 @@ clntudp_create(struct sockaddr_in *raddr, u_long program, u_long version,
|
||||||
}
|
}
|
||||||
DEF_WEAK(clntudp_create);
|
DEF_WEAK(clntudp_create);
|
||||||
|
|
||||||
static enum clnt_stat
|
static enum clnt_stat
|
||||||
clntudp_call(CLIENT *cl, /* client handle */
|
clntudp_call(CLIENT *cl, /* client handle */
|
||||||
u_long proc, /* procedure number */
|
u_long proc, /* procedure number */
|
||||||
xdrproc_t xargs, /* xdr routine for args */
|
xdrproc_t xargs, /* xdr routine for args */
|
||||||
|
@ -304,11 +304,11 @@ send_again:
|
||||||
do {
|
do {
|
||||||
fromlen = sizeof(struct sockaddr);
|
fromlen = sizeof(struct sockaddr);
|
||||||
if (cu->cu_connected) {
|
if (cu->cu_connected) {
|
||||||
inlen = recv(cu->cu_sock, cu->cu_inbuf,
|
inlen = recv(cu->cu_sock, cu->cu_inbuf,
|
||||||
(int) cu->cu_recvsz, 0);
|
(int) cu->cu_recvsz, 0);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
inlen = recvfrom(cu->cu_sock, cu->cu_inbuf,
|
inlen = recvfrom(cu->cu_sock, cu->cu_inbuf,
|
||||||
(int) cu->cu_recvsz, 0,
|
(int) cu->cu_recvsz, 0,
|
||||||
(struct sockaddr *)&from, &fromlen);
|
(struct sockaddr *)&from, &fromlen);
|
||||||
}
|
}
|
||||||
|
@ -320,7 +320,7 @@ send_again:
|
||||||
return (cu->cu_error.re_status = RPC_CANTRECV);
|
return (cu->cu_error.re_status = RPC_CANTRECV);
|
||||||
}
|
}
|
||||||
if (inlen < sizeof(u_int32_t))
|
if (inlen < sizeof(u_int32_t))
|
||||||
continue;
|
continue;
|
||||||
/* see if reply transaction id matches sent id */
|
/* see if reply transaction id matches sent id */
|
||||||
if (((struct rpc_msg *)(cu->cu_inbuf))->rm_xid !=
|
if (((struct rpc_msg *)(cu->cu_inbuf))->rm_xid !=
|
||||||
((struct rpc_msg *)(cu->cu_outbuf))->rm_xid)
|
((struct rpc_msg *)(cu->cu_outbuf))->rm_xid)
|
||||||
|
@ -359,7 +359,7 @@ send_again:
|
||||||
xdrs->x_op = XDR_FREE;
|
xdrs->x_op = XDR_FREE;
|
||||||
(void)xdr_opaque_auth(xdrs,
|
(void)xdr_opaque_auth(xdrs,
|
||||||
&(reply_msg.acpted_rply.ar_verf));
|
&(reply_msg.acpted_rply.ar_verf));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* maybe our credentials need to be refreshed ... */
|
/* maybe our credentials need to be refreshed ... */
|
||||||
if (nrefreshes > 0 && AUTH_REFRESH(cl->cl_auth)) {
|
if (nrefreshes > 0 && AUTH_REFRESH(cl->cl_auth)) {
|
||||||
|
@ -398,7 +398,7 @@ clntudp_freeres(CLIENT *cl, xdrproc_t xdr_res, caddr_t res_ptr)
|
||||||
return ((*xdr_res)(xdrs, res_ptr));
|
return ((*xdr_res)(xdrs, res_ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clntudp_abort(CLIENT *clnt)
|
clntudp_abort(CLIENT *clnt)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -432,7 +432,7 @@ clntudp_control(CLIENT *cl, u_int request, void *info)
|
||||||
}
|
}
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clntudp_destroy(CLIENT *cl)
|
clntudp_destroy(CLIENT *cl)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <ifaddrs.h>
|
#include <ifaddrs.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* don't use gethostbyname, which would invoke yellow pages
|
* don't use gethostbyname, which would invoke yellow pages
|
||||||
*
|
*
|
||||||
* Avoid loopback interfaces. We return information from a loopback
|
* Avoid loopback interfaces. We return information from a loopback
|
||||||
|
|
|
@ -45,8 +45,8 @@ bool_t
|
||||||
xdr_pmap(XDR *xdrs, struct pmap *regs)
|
xdr_pmap(XDR *xdrs, struct pmap *regs)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (xdr_u_long(xdrs, ®s->pm_prog) &&
|
if (xdr_u_long(xdrs, ®s->pm_prog) &&
|
||||||
xdr_u_long(xdrs, ®s->pm_vers) &&
|
xdr_u_long(xdrs, ®s->pm_vers) &&
|
||||||
xdr_u_long(xdrs, ®s->pm_prot))
|
xdr_u_long(xdrs, ®s->pm_prot))
|
||||||
return (xdr_u_long(xdrs, ®s->pm_port));
|
return (xdr_u_long(xdrs, ®s->pm_port));
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#include <rpc/pmap_prot.h>
|
#include <rpc/pmap_prot.h>
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* What is going on with linked lists? (!)
|
* What is going on with linked lists? (!)
|
||||||
* First recall the link list declaration from pmap_prot.h:
|
* First recall the link list declaration from pmap_prot.h:
|
||||||
*
|
*
|
||||||
|
@ -50,11 +50,11 @@
|
||||||
* struct pmaplist *pml_map;
|
* struct pmaplist *pml_map;
|
||||||
* };
|
* };
|
||||||
*
|
*
|
||||||
* Compare that declaration with a corresponding xdr declaration that
|
* Compare that declaration with a corresponding xdr declaration that
|
||||||
* is (a) pointer-less, and (b) recursive:
|
* is (a) pointer-less, and (b) recursive:
|
||||||
*
|
*
|
||||||
* typedef union switch (bool_t) {
|
* typedef union switch (bool_t) {
|
||||||
*
|
*
|
||||||
* case TRUE: struct {
|
* case TRUE: struct {
|
||||||
* struct pmap;
|
* struct pmap;
|
||||||
* pmaplist_t foo;
|
* pmaplist_t foo;
|
||||||
|
@ -67,8 +67,8 @@
|
||||||
* the C declaration has no bool_t variable. The bool_t can be
|
* the C declaration has no bool_t variable. The bool_t can be
|
||||||
* interpreted as ``more data follows me''; if FALSE then nothing
|
* interpreted as ``more data follows me''; if FALSE then nothing
|
||||||
* follows this bool_t; if TRUE then the bool_t is followed by
|
* follows this bool_t; if TRUE then the bool_t is followed by
|
||||||
* an actual struct pmap, and then (recursively) by the
|
* an actual struct pmap, and then (recursively) by the
|
||||||
* xdr union, pamplist_t.
|
* xdr union, pamplist_t.
|
||||||
*
|
*
|
||||||
* This could be implemented via the xdr_union primitive, though this
|
* This could be implemented via the xdr_union primitive, though this
|
||||||
* would cause a one recursive call per element in the list. Rather than do
|
* would cause a one recursive call per element in the list. Rather than do
|
||||||
|
@ -103,7 +103,7 @@ xdr_pmaplist(XDR *xdrs, struct pmaplist **rp)
|
||||||
* before we free the current object ...
|
* before we free the current object ...
|
||||||
*/
|
*/
|
||||||
if (freeing)
|
if (freeing)
|
||||||
next = &((*rp)->pml_next);
|
next = &((*rp)->pml_next);
|
||||||
if (! xdr_reference(xdrs, (caddr_t *)rp,
|
if (! xdr_reference(xdrs, (caddr_t *)rp,
|
||||||
(u_int)sizeof(struct pmaplist), xdr_pmap))
|
(u_int)sizeof(struct pmaplist), xdr_pmap))
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
|
|
|
@ -148,7 +148,7 @@ DEF_WEAK(xdr_rmtcallres);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following is kludged-up support for simple rpc broadcasts.
|
* The following is kludged-up support for simple rpc broadcasts.
|
||||||
* Someday a large, complicated system will replace these trivial
|
* Someday a large, complicated system will replace these trivial
|
||||||
* routines which only support udp/ip .
|
* routines which only support udp/ip .
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
|
@ -200,7 +200,7 @@ newgetbroadcastnets(struct in_addr **addrsp)
|
||||||
|
|
||||||
typedef bool_t (*resultproc_t)(caddr_t, struct sockaddr_in *);
|
typedef bool_t (*resultproc_t)(caddr_t, struct sockaddr_in *);
|
||||||
|
|
||||||
enum clnt_stat
|
enum clnt_stat
|
||||||
clnt_broadcast(u_long prog, /* program number */
|
clnt_broadcast(u_long prog, /* program number */
|
||||||
u_long vers, /* version number */
|
u_long vers, /* version number */
|
||||||
u_long proc, /* procedure number */
|
u_long proc, /* procedure number */
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include <rpc/rpc.h>
|
#include <rpc/rpc.h>
|
||||||
/*
|
/*
|
||||||
* This file should only contain common data (global data) that is exported
|
* This file should only contain common data (global data) that is exported
|
||||||
* by public interfaces
|
* by public interfaces
|
||||||
*/
|
*/
|
||||||
struct opaque_auth _null_auth;
|
struct opaque_auth _null_auth;
|
||||||
fd_set svc_fdset;
|
fd_set svc_fdset;
|
||||||
|
|
|
@ -266,11 +266,11 @@ svc_fd_remove(int sock)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* De-activate a transport handle.
|
* De-activate a transport handle.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
xprt_unregister(SVCXPRT *xprt)
|
xprt_unregister(SVCXPRT *xprt)
|
||||||
{
|
{
|
||||||
int sock = xprt->xp_sock;
|
int sock = xprt->xp_sock;
|
||||||
|
|
||||||
if (xports[sock] == xprt) {
|
if (xports[sock] == xprt) {
|
||||||
|
@ -368,15 +368,15 @@ done:
|
||||||
bool_t
|
bool_t
|
||||||
svc_sendreply(SVCXPRT *xprt, xdrproc_t xdr_results, caddr_t xdr_location)
|
svc_sendreply(SVCXPRT *xprt, xdrproc_t xdr_results, caddr_t xdr_location)
|
||||||
{
|
{
|
||||||
struct rpc_msg rply;
|
struct rpc_msg rply;
|
||||||
|
|
||||||
rply.rm_direction = REPLY;
|
rply.rm_direction = REPLY;
|
||||||
rply.rm_reply.rp_stat = MSG_ACCEPTED;
|
rply.rm_reply.rp_stat = MSG_ACCEPTED;
|
||||||
rply.acpted_rply.ar_verf = xprt->xp_verf;
|
rply.acpted_rply.ar_verf = xprt->xp_verf;
|
||||||
rply.acpted_rply.ar_stat = SUCCESS;
|
rply.acpted_rply.ar_stat = SUCCESS;
|
||||||
rply.acpted_rply.ar_results.where = xdr_location;
|
rply.acpted_rply.ar_results.where = xdr_location;
|
||||||
rply.acpted_rply.ar_results.proc = xdr_results;
|
rply.acpted_rply.ar_results.proc = xdr_results;
|
||||||
return (SVC_REPLY(xprt, &rply));
|
return (SVC_REPLY(xprt, &rply));
|
||||||
}
|
}
|
||||||
DEF_WEAK(svc_sendreply);
|
DEF_WEAK(svc_sendreply);
|
||||||
|
|
||||||
|
@ -401,13 +401,13 @@ svcerr_noproc(SVCXPRT *xprt)
|
||||||
void
|
void
|
||||||
svcerr_decode(SVCXPRT *xprt)
|
svcerr_decode(SVCXPRT *xprt)
|
||||||
{
|
{
|
||||||
struct rpc_msg rply;
|
struct rpc_msg rply;
|
||||||
|
|
||||||
rply.rm_direction = REPLY;
|
rply.rm_direction = REPLY;
|
||||||
rply.rm_reply.rp_stat = MSG_ACCEPTED;
|
rply.rm_reply.rp_stat = MSG_ACCEPTED;
|
||||||
rply.acpted_rply.ar_verf = xprt->xp_verf;
|
rply.acpted_rply.ar_verf = xprt->xp_verf;
|
||||||
rply.acpted_rply.ar_stat = GARBAGE_ARGS;
|
rply.acpted_rply.ar_stat = GARBAGE_ARGS;
|
||||||
SVC_REPLY(xprt, &rply);
|
SVC_REPLY(xprt, &rply);
|
||||||
}
|
}
|
||||||
DEF_WEAK(svcerr_decode);
|
DEF_WEAK(svcerr_decode);
|
||||||
|
|
||||||
|
@ -417,13 +417,13 @@ DEF_WEAK(svcerr_decode);
|
||||||
void
|
void
|
||||||
svcerr_systemerr(SVCXPRT *xprt)
|
svcerr_systemerr(SVCXPRT *xprt)
|
||||||
{
|
{
|
||||||
struct rpc_msg rply;
|
struct rpc_msg rply;
|
||||||
|
|
||||||
rply.rm_direction = REPLY;
|
rply.rm_direction = REPLY;
|
||||||
rply.rm_reply.rp_stat = MSG_ACCEPTED;
|
rply.rm_reply.rp_stat = MSG_ACCEPTED;
|
||||||
rply.acpted_rply.ar_verf = xprt->xp_verf;
|
rply.acpted_rply.ar_verf = xprt->xp_verf;
|
||||||
rply.acpted_rply.ar_stat = SYSTEM_ERR;
|
rply.acpted_rply.ar_stat = SYSTEM_ERR;
|
||||||
SVC_REPLY(xprt, &rply);
|
SVC_REPLY(xprt, &rply);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -455,7 +455,7 @@ svcerr_weakauth(SVCXPRT *xprt)
|
||||||
/*
|
/*
|
||||||
* Program unavailable error reply
|
* Program unavailable error reply
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
svcerr_noprog(SVCXPRT *xprt)
|
svcerr_noprog(SVCXPRT *xprt)
|
||||||
{
|
{
|
||||||
struct rpc_msg rply;
|
struct rpc_msg rply;
|
||||||
|
@ -496,9 +496,9 @@ DEF_WEAK(svcerr_progvers);
|
||||||
* the "raw" parameters (msg.rm_call.cb_cred and msg.rm_call.cb_verf) and
|
* the "raw" parameters (msg.rm_call.cb_cred and msg.rm_call.cb_verf) and
|
||||||
* the "cooked" credentials (rqst->rq_clntcred).
|
* the "cooked" credentials (rqst->rq_clntcred).
|
||||||
* However, this function does not know the structure of the cooked
|
* However, this function does not know the structure of the cooked
|
||||||
* credentials, so it make the following assumptions:
|
* credentials, so it make the following assumptions:
|
||||||
* a) the structure is contiguous (no pointers), and
|
* a) the structure is contiguous (no pointers), and
|
||||||
* b) the cred structure size does not exceed RQCRED_SIZE bytes.
|
* b) the cred structure size does not exceed RQCRED_SIZE bytes.
|
||||||
* In all events, all three parameters are freed upon exit from this routine.
|
* In all events, all three parameters are freed upon exit from this routine.
|
||||||
* The storage is trivially management on the call stack in userland, but
|
* The storage is trivially management on the call stack in userland, but
|
||||||
* is mallocated in kernel land.
|
* is mallocated in kernel land.
|
||||||
|
|
|
@ -39,16 +39,16 @@
|
||||||
#include <rpc/rpc.h>
|
#include <rpc/rpc.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* svcauthsw is the bdevsw of server side authentication.
|
* svcauthsw is the bdevsw of server side authentication.
|
||||||
*
|
*
|
||||||
* Server side authenticators are called from authenticate by
|
* Server side authenticators are called from authenticate by
|
||||||
* using the client auth struct flavor field to index into svcauthsw.
|
* using the client auth struct flavor field to index into svcauthsw.
|
||||||
* The server auth flavors must implement a routine that looks
|
* The server auth flavors must implement a routine that looks
|
||||||
* like:
|
* like:
|
||||||
*
|
*
|
||||||
* enum auth_stat
|
* enum auth_stat
|
||||||
* flavorx_auth(rqst, msg)
|
* flavorx_auth(rqst, msg)
|
||||||
* struct svc_req *rqst;
|
* struct svc_req *rqst;
|
||||||
* struct rpc_msg *msg;
|
* struct rpc_msg *msg;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -120,7 +120,7 @@ DEF_STRONG(_svcauth_unix);
|
||||||
* Shorthand unix authenticator
|
* Shorthand unix authenticator
|
||||||
* Looks up longhand in a cache.
|
* Looks up longhand in a cache.
|
||||||
*/
|
*/
|
||||||
enum auth_stat
|
enum auth_stat
|
||||||
_svcauth_short(struct svc_req *rqst, struct rpc_msg *msg)
|
_svcauth_short(struct svc_req *rqst, struct rpc_msg *msg)
|
||||||
{
|
{
|
||||||
return (AUTH_REJECTEDCRED);
|
return (AUTH_REJECTEDCRED);
|
||||||
|
|
|
@ -140,7 +140,7 @@ svcraw_getargs(SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
|
||||||
|
|
||||||
static bool_t
|
static bool_t
|
||||||
svcraw_freeargs(SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
|
svcraw_freeargs(SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
|
||||||
{
|
{
|
||||||
struct svcraw_private *srp = svcraw_private;
|
struct svcraw_private *srp = svcraw_private;
|
||||||
XDR *xdrs;
|
XDR *xdrs;
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ svcraw_freeargs(SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
|
||||||
xdrs = &srp->xdr_stream;
|
xdrs = &srp->xdr_stream;
|
||||||
xdrs->x_op = XDR_FREE;
|
xdrs->x_op = XDR_FREE;
|
||||||
return ((*xdr_args)(xdrs, args_ptr));
|
return ((*xdr_args)(xdrs, args_ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
svcraw_destroy(SVCXPRT *xprt)
|
svcraw_destroy(SVCXPRT *xprt)
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* svc_simple.c
|
* svc_simple.c
|
||||||
* Simplified front end to rpc.
|
* Simplified front end to rpc.
|
||||||
*/
|
*/
|
||||||
|
@ -59,7 +59,7 @@ registerrpc(int prognum, int versnum, int procnum, char *(*progname)(),
|
||||||
xdrproc_t inproc, xdrproc_t outproc)
|
xdrproc_t inproc, xdrproc_t outproc)
|
||||||
{
|
{
|
||||||
struct proglst *pl;
|
struct proglst *pl;
|
||||||
|
|
||||||
if (procnum == NULLPROC)
|
if (procnum == NULLPROC)
|
||||||
return (-1);
|
return (-1);
|
||||||
if (transp == NULL) {
|
if (transp == NULL) {
|
||||||
|
@ -68,7 +68,7 @@ registerrpc(int prognum, int versnum, int procnum, char *(*progname)(),
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
(void) pmap_unset((u_long)prognum, (u_long)versnum);
|
(void) pmap_unset((u_long)prognum, (u_long)versnum);
|
||||||
if (!svc_register(transp, (u_long)prognum, (u_long)versnum,
|
if (!svc_register(transp, (u_long)prognum, (u_long)versnum,
|
||||||
universal, IPPROTO_UDP))
|
universal, IPPROTO_UDP))
|
||||||
return (-1);
|
return (-1);
|
||||||
pl = malloc(sizeof(struct proglst));
|
pl = malloc(sizeof(struct proglst));
|
||||||
|
@ -92,7 +92,7 @@ universal(struct svc_req *rqstp, SVCXPRT *transp)
|
||||||
char xdrbuf[UDPMSGSIZE];
|
char xdrbuf[UDPMSGSIZE];
|
||||||
struct proglst *pl;
|
struct proglst *pl;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* enforce "procnum 0 is echo" convention
|
* enforce "procnum 0 is echo" convention
|
||||||
*/
|
*/
|
||||||
if (rqstp->rq_proc == NULLPROC) {
|
if (rqstp->rq_proc == NULLPROC) {
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* svc_tcp.c, Server side for TCP/IP based RPC.
|
* svc_tcp.c, Server side for TCP/IP based RPC.
|
||||||
*
|
*
|
||||||
* Actually implements two flavors of transporter -
|
* Actually implements two flavors of transporter -
|
||||||
* a tcp rendezvouser (a listener and connection establisher)
|
* a tcp rendezvouser (a listener and connection establisher)
|
||||||
|
@ -199,7 +199,7 @@ makefd_xprt(int fd, u_int sendsize, u_int recvsize)
|
||||||
{
|
{
|
||||||
SVCXPRT *xprt;
|
SVCXPRT *xprt;
|
||||||
struct tcp_conn *cd;
|
struct tcp_conn *cd;
|
||||||
|
|
||||||
xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
|
xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
|
||||||
if (xprt == NULL)
|
if (xprt == NULL)
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -258,7 +258,7 @@ rendezvous_request(SVCXPRT *xprt, struct rpc_msg *ignored)
|
||||||
(char *)&opts, &optsize) == 0 &&
|
(char *)&opts, &optsize) == 0 &&
|
||||||
optsize != 0) {
|
optsize != 0) {
|
||||||
for (i = 0; (char *)&opts.ipopt_list[i] - (char *)&opts <
|
for (i = 0; (char *)&opts.ipopt_list[i] - (char *)&opts <
|
||||||
optsize; ) {
|
optsize; ) {
|
||||||
u_char c = (u_char)opts.ipopt_list[i];
|
u_char c = (u_char)opts.ipopt_list[i];
|
||||||
if (c == IPOPT_LSRR || c == IPOPT_SSRR) {
|
if (c == IPOPT_LSRR || c == IPOPT_SSRR) {
|
||||||
close(sock);
|
close(sock);
|
||||||
|
|
|
@ -173,7 +173,7 @@ static enum xprt_stat
|
||||||
svcudp_stat(SVCXPRT *xprt)
|
svcudp_stat(SVCXPRT *xprt)
|
||||||
{
|
{
|
||||||
|
|
||||||
return (XPRT_IDLE);
|
return (XPRT_IDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool_t
|
static bool_t
|
||||||
|
@ -294,7 +294,7 @@ struct cache_node {
|
||||||
/*
|
/*
|
||||||
* Next node on the list, if there is a collision
|
* Next node on the list, if there is a collision
|
||||||
*/
|
*/
|
||||||
cache_ptr cache_next;
|
cache_ptr cache_next;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -316,11 +316,11 @@ struct udp_cache {
|
||||||
* the hashing function
|
* the hashing function
|
||||||
*/
|
*/
|
||||||
#define CACHE_LOC(transp, xid) \
|
#define CACHE_LOC(transp, xid) \
|
||||||
(xid % (SPARSENESS*((struct udp_cache *) su_data(transp)->su_cache)->uc_size))
|
(xid % (SPARSENESS*((struct udp_cache *) su_data(transp)->su_cache)->uc_size))
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable use of the cache.
|
* Enable use of the cache.
|
||||||
* Note: there is no disable.
|
* Note: there is no disable.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
|
@ -330,7 +330,7 @@ svcudp_enablecache(SVCXPRT *transp, u_long size)
|
||||||
struct udp_cache *uc;
|
struct udp_cache *uc;
|
||||||
|
|
||||||
if (su->su_cache != NULL)
|
if (su->su_cache != NULL)
|
||||||
return(0);
|
return(0);
|
||||||
uc = malloc(sizeof(*uc));
|
uc = malloc(sizeof(*uc));
|
||||||
if (uc == NULL)
|
if (uc == NULL)
|
||||||
return(0);
|
return(0);
|
||||||
|
@ -358,7 +358,7 @@ svcudp_enablecache(SVCXPRT *transp, u_long size)
|
||||||
static void
|
static void
|
||||||
cache_set(SVCXPRT *xprt, u_long replylen)
|
cache_set(SVCXPRT *xprt, u_long replylen)
|
||||||
{
|
{
|
||||||
cache_ptr victim;
|
cache_ptr victim;
|
||||||
cache_ptr *vicp;
|
cache_ptr *vicp;
|
||||||
struct svcudp_data *su = su_data(xprt);
|
struct svcudp_data *su = su_data(xprt);
|
||||||
struct udp_cache *uc = (struct udp_cache *) su->su_cache;
|
struct udp_cache *uc = (struct udp_cache *) su->su_cache;
|
||||||
|
@ -372,9 +372,9 @@ cache_set(SVCXPRT *xprt, u_long replylen)
|
||||||
victim = uc->uc_fifo[uc->uc_nextvictim];
|
victim = uc->uc_fifo[uc->uc_nextvictim];
|
||||||
if (victim != NULL) {
|
if (victim != NULL) {
|
||||||
loc = CACHE_LOC(xprt, victim->cache_xid);
|
loc = CACHE_LOC(xprt, victim->cache_xid);
|
||||||
for (vicp = &uc->uc_entries[loc];
|
for (vicp = &uc->uc_entries[loc];
|
||||||
*vicp != NULL && *vicp != victim;
|
*vicp != NULL && *vicp != victim;
|
||||||
vicp = &(*vicp)->cache_next)
|
vicp = &(*vicp)->cache_next)
|
||||||
;
|
;
|
||||||
if (*vicp == NULL) {
|
if (*vicp == NULL) {
|
||||||
return;
|
return;
|
||||||
|
@ -406,7 +406,7 @@ cache_set(SVCXPRT *xprt, u_long replylen)
|
||||||
victim->cache_prog = uc->uc_prog;
|
victim->cache_prog = uc->uc_prog;
|
||||||
victim->cache_addr = uc->uc_addr;
|
victim->cache_addr = uc->uc_addr;
|
||||||
loc = CACHE_LOC(xprt, victim->cache_xid);
|
loc = CACHE_LOC(xprt, victim->cache_xid);
|
||||||
victim->cache_next = uc->uc_entries[loc];
|
victim->cache_next = uc->uc_entries[loc];
|
||||||
uc->uc_entries[loc] = victim;
|
uc->uc_entries[loc] = victim;
|
||||||
uc->uc_fifo[uc->uc_nextvictim++] = victim;
|
uc->uc_fifo[uc->uc_nextvictim++] = victim;
|
||||||
uc->uc_nextvictim %= uc->uc_size;
|
uc->uc_nextvictim %= uc->uc_size;
|
||||||
|
|
|
@ -85,7 +85,7 @@ static const struct xdr_ops xdrmem_ops_unaligned = {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The procedure xdrmem_create initializes a stream descriptor for a
|
* The procedure xdrmem_create initializes a stream descriptor for a
|
||||||
* memory buffer.
|
* memory buffer.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
xdrmem_create(XDR *xdrs, caddr_t addr, u_int size, enum xdr_op op)
|
xdrmem_create(XDR *xdrs, caddr_t addr, u_int size, enum xdr_op op)
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
* by n bytes of data, where n is contained in the header. The header
|
* by n bytes of data, where n is contained in the header. The header
|
||||||
* is represented as a htonl(u_int32_t). The high order bit encodes
|
* is represented as a htonl(u_int32_t). The high order bit encodes
|
||||||
* whether or not the fragment is the last fragment of the record
|
* whether or not the fragment is the last fragment of the record
|
||||||
* (1 => fragment is last, 0 => more fragments to follow.
|
* (1 => fragment is last, 0 => more fragments to follow.
|
||||||
* The other 31 bits encode the byte length of the fragment.
|
* The other 31 bits encode the byte length of the fragment.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -169,8 +169,8 @@ xdrrec_create(XDR *xdrs, u_int sendsize, u_int recvsize, caddr_t tcp_handle,
|
||||||
(RECSTREAM *)mem_alloc(sizeof(RECSTREAM));
|
(RECSTREAM *)mem_alloc(sizeof(RECSTREAM));
|
||||||
|
|
||||||
if (rstrm == NULL) {
|
if (rstrm == NULL) {
|
||||||
/*
|
/*
|
||||||
* This is bad. Should rework xdrrec_create to
|
* This is bad. Should rework xdrrec_create to
|
||||||
* return a handle, and in this case return NULL
|
* return a handle, and in this case return NULL
|
||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
|
@ -285,7 +285,7 @@ xdrrec_getbytes(XDR *xdrs, caddr_t addr, u_int len)
|
||||||
current = (len < current) ? len : current;
|
current = (len < current) ? len : current;
|
||||||
if (! get_input_bytes(rstrm, addr, current))
|
if (! get_input_bytes(rstrm, addr, current))
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
addr += current;
|
addr += current;
|
||||||
rstrm->fbtbc -= current;
|
rstrm->fbtbc -= current;
|
||||||
len -= current;
|
len -= current;
|
||||||
}
|
}
|
||||||
|
@ -457,7 +457,7 @@ DEF_WEAK(xdrrec_skiprecord);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Look ahead function.
|
* Look ahead function.
|
||||||
* Returns TRUE iff there is no more input in the buffer
|
* Returns TRUE iff there is no more input in the buffer
|
||||||
* after consuming the rest of the current record.
|
* after consuming the rest of the current record.
|
||||||
*/
|
*/
|
||||||
bool_t
|
bool_t
|
||||||
|
@ -604,7 +604,7 @@ static bool_t
|
||||||
flush_out(RECSTREAM *rstrm, int32_t eor)
|
flush_out(RECSTREAM *rstrm, int32_t eor)
|
||||||
{
|
{
|
||||||
u_long eormask = (eor == TRUE) ? LAST_FRAG : 0;
|
u_long eormask = (eor == TRUE) ? LAST_FRAG : 0;
|
||||||
u_int32_t len = (u_long)(rstrm->out_finger) -
|
u_int32_t len = (u_long)(rstrm->out_finger) -
|
||||||
(u_long)(rstrm->frag_header) - sizeof(u_int32_t);
|
(u_long)(rstrm->frag_header) - sizeof(u_int32_t);
|
||||||
|
|
||||||
*(rstrm->frag_header) = htonl(len | eormask);
|
*(rstrm->frag_header) = htonl(len | eormask);
|
||||||
|
|
|
@ -142,7 +142,7 @@ xdrstdio_getpos(XDR *xdrs)
|
||||||
|
|
||||||
static bool_t
|
static bool_t
|
||||||
xdrstdio_setpos(XDR *xdrs, u_int pos)
|
xdrstdio_setpos(XDR *xdrs, u_int pos)
|
||||||
{
|
{
|
||||||
|
|
||||||
return ((fseeko((FILE *)xdrs->x_private, pos, SEEK_SET) == -1) ?
|
return ((fseeko((FILE *)xdrs->x_private, pos, SEEK_SET) == -1) ?
|
||||||
FALSE : TRUE);
|
FALSE : TRUE);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* are met:
|
* are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
|
|
@ -5,21 +5,21 @@
|
||||||
* This package is an SSL implementation written
|
* This package is an SSL implementation written
|
||||||
* by Eric Young (eay@cryptsoft.com).
|
* by Eric Young (eay@cryptsoft.com).
|
||||||
* The implementation was written so as to conform with Netscapes SSL.
|
* The implementation was written so as to conform with Netscapes SSL.
|
||||||
*
|
*
|
||||||
* This library is free for commercial and non-commercial use as long as
|
* This library is free for commercial and non-commercial use as long as
|
||||||
* the following conditions are aheared to. The following conditions
|
* the following conditions are aheared to. The following conditions
|
||||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||||
* included with this distribution is covered by the same copyright terms
|
* included with this distribution is covered by the same copyright terms
|
||||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||||
*
|
*
|
||||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||||
* the code are not to be removed.
|
* the code are not to be removed.
|
||||||
* If this package is used in a product, Eric Young should be given attribution
|
* If this package is used in a product, Eric Young should be given attribution
|
||||||
* as the author of the parts of the library used.
|
* as the author of the parts of the library used.
|
||||||
* This can be in the form of a textual message at program startup or
|
* This can be in the form of a textual message at program startup or
|
||||||
* in documentation (online or textual) provided with the package.
|
* in documentation (online or textual) provided with the package.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
|
@ -34,10 +34,10 @@
|
||||||
* Eric Young (eay@cryptsoft.com)"
|
* Eric Young (eay@cryptsoft.com)"
|
||||||
* The word 'cryptographic' can be left out if the rouines from the library
|
* The word 'cryptographic' can be left out if the rouines from the library
|
||||||
* being used are not cryptographic related :-).
|
* being used are not cryptographic related :-).
|
||||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||||
* the apps directory (application code) you must include an acknowledgement:
|
* the apps directory (application code) you must include an acknowledgement:
|
||||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The licence and distribution terms for any publically available version or
|
* The licence and distribution terms for any publically available version or
|
||||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||||
* copied and put under another distribution licence
|
* copied and put under another distribution licence
|
||||||
|
@ -87,7 +87,7 @@ typedef struct bio_connect_st {
|
||||||
struct sockaddr_in them;
|
struct sockaddr_in them;
|
||||||
|
|
||||||
/* int socket; this will be kept in bio->num so that it is
|
/* int socket; this will be kept in bio->num so that it is
|
||||||
* compatible with the bss_sock bio */
|
* compatible with the bss_sock bio */
|
||||||
|
|
||||||
/* called when the connection is initially made
|
/* called when the connection is initially made
|
||||||
* callback(BIO,state,ret); The callback should return
|
* callback(BIO,state,ret); The callback should return
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* $OpenBSD: bss_dgram.c,v 1.44 2022/12/26 07:18:51 jmc Exp $ */
|
/* $OpenBSD: bss_dgram.c,v 1.44 2022/12/26 07:18:51 jmc Exp $ */
|
||||||
/*
|
/*
|
||||||
* DTLS implementation written by Nagendra Modadugu
|
* DTLS implementation written by Nagendra Modadugu
|
||||||
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
|
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
|
||||||
*/
|
*/
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* are met:
|
* are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
|
|
@ -5,21 +5,21 @@
|
||||||
* This package is an SSL implementation written
|
* This package is an SSL implementation written
|
||||||
* by Eric Young (eay@cryptsoft.com).
|
* by Eric Young (eay@cryptsoft.com).
|
||||||
* The implementation was written so as to conform with Netscapes SSL.
|
* The implementation was written so as to conform with Netscapes SSL.
|
||||||
*
|
*
|
||||||
* This library is free for commercial and non-commercial use as long as
|
* This library is free for commercial and non-commercial use as long as
|
||||||
* the following conditions are aheared to. The following conditions
|
* the following conditions are aheared to. The following conditions
|
||||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||||
* included with this distribution is covered by the same copyright terms
|
* included with this distribution is covered by the same copyright terms
|
||||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||||
*
|
*
|
||||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||||
* the code are not to be removed.
|
* the code are not to be removed.
|
||||||
* If this package is used in a product, Eric Young should be given attribution
|
* If this package is used in a product, Eric Young should be given attribution
|
||||||
* as the author of the parts of the library used.
|
* as the author of the parts of the library used.
|
||||||
* This can be in the form of a textual message at program startup or
|
* This can be in the form of a textual message at program startup or
|
||||||
* in documentation (online or textual) provided with the package.
|
* in documentation (online or textual) provided with the package.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
|
@ -34,10 +34,10 @@
|
||||||
* Eric Young (eay@cryptsoft.com)"
|
* Eric Young (eay@cryptsoft.com)"
|
||||||
* The word 'cryptographic' can be left out if the rouines from the library
|
* The word 'cryptographic' can be left out if the rouines from the library
|
||||||
* being used are not cryptographic related :-).
|
* being used are not cryptographic related :-).
|
||||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||||
* the apps directory (application code) you must include an acknowledgement:
|
* the apps directory (application code) you must include an acknowledgement:
|
||||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The licence and distribution terms for any publically available version or
|
* The licence and distribution terms for any publically available version or
|
||||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||||
* copied and put under another distribution licence
|
* copied and put under another distribution licence
|
||||||
|
|
|
@ -5,21 +5,21 @@
|
||||||
* This package is an SSL implementation written
|
* This package is an SSL implementation written
|
||||||
* by Eric Young (eay@cryptsoft.com).
|
* by Eric Young (eay@cryptsoft.com).
|
||||||
* The implementation was written so as to conform with Netscapes SSL.
|
* The implementation was written so as to conform with Netscapes SSL.
|
||||||
*
|
*
|
||||||
* This library is free for commercial and non-commercial use as long as
|
* This library is free for commercial and non-commercial use as long as
|
||||||
* the following conditions are aheared to. The following conditions
|
* the following conditions are aheared to. The following conditions
|
||||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||||
* included with this distribution is covered by the same copyright terms
|
* included with this distribution is covered by the same copyright terms
|
||||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||||
*
|
*
|
||||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||||
* the code are not to be removed.
|
* the code are not to be removed.
|
||||||
* If this package is used in a product, Eric Young should be given attribution
|
* If this package is used in a product, Eric Young should be given attribution
|
||||||
* as the author of the parts of the library used.
|
* as the author of the parts of the library used.
|
||||||
* This can be in the form of a textual message at program startup or
|
* This can be in the form of a textual message at program startup or
|
||||||
* in documentation (online or textual) provided with the package.
|
* in documentation (online or textual) provided with the package.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
|
@ -34,10 +34,10 @@
|
||||||
* Eric Young (eay@cryptsoft.com)"
|
* Eric Young (eay@cryptsoft.com)"
|
||||||
* The word 'cryptographic' can be left out if the rouines from the library
|
* The word 'cryptographic' can be left out if the rouines from the library
|
||||||
* being used are not cryptographic related :-).
|
* being used are not cryptographic related :-).
|
||||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||||
* the apps directory (application code) you must include an acknowledgement:
|
* the apps directory (application code) you must include an acknowledgement:
|
||||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The licence and distribution terms for any publically available version or
|
* The licence and distribution terms for any publically available version or
|
||||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||||
* copied and put under another distribution licence
|
* copied and put under another distribution licence
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* are met:
|
* are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
|
|
@ -5,21 +5,21 @@
|
||||||
* This package is an SSL implementation written
|
* This package is an SSL implementation written
|
||||||
* by Eric Young (eay@cryptsoft.com).
|
* by Eric Young (eay@cryptsoft.com).
|
||||||
* The implementation was written so as to conform with Netscapes SSL.
|
* The implementation was written so as to conform with Netscapes SSL.
|
||||||
*
|
*
|
||||||
* This library is free for commercial and non-commercial use as long as
|
* This library is free for commercial and non-commercial use as long as
|
||||||
* the following conditions are aheared to. The following conditions
|
* the following conditions are aheared to. The following conditions
|
||||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||||
* included with this distribution is covered by the same copyright terms
|
* included with this distribution is covered by the same copyright terms
|
||||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||||
*
|
*
|
||||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||||
* the code are not to be removed.
|
* the code are not to be removed.
|
||||||
* If this package is used in a product, Eric Young should be given attribution
|
* If this package is used in a product, Eric Young should be given attribution
|
||||||
* as the author of the parts of the library used.
|
* as the author of the parts of the library used.
|
||||||
* This can be in the form of a textual message at program startup or
|
* This can be in the form of a textual message at program startup or
|
||||||
* in documentation (online or textual) provided with the package.
|
* in documentation (online or textual) provided with the package.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
|
@ -34,10 +34,10 @@
|
||||||
* Eric Young (eay@cryptsoft.com)"
|
* Eric Young (eay@cryptsoft.com)"
|
||||||
* The word 'cryptographic' can be left out if the rouines from the library
|
* The word 'cryptographic' can be left out if the rouines from the library
|
||||||
* being used are not cryptographic related :-).
|
* being used are not cryptographic related :-).
|
||||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||||
* the apps directory (application code) you must include an acknowledgement:
|
* the apps directory (application code) you must include an acknowledgement:
|
||||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The licence and distribution terms for any publically available version or
|
* The licence and distribution terms for any publically available version or
|
||||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||||
* copied and put under another distribution licence
|
* copied and put under another distribution licence
|
||||||
|
@ -351,7 +351,7 @@ mem_gets(BIO *bio, char *out, int out_len)
|
||||||
/*
|
/*
|
||||||
* i is now the max num of bytes to copy, either out_max or up to and
|
* i is now the max num of bytes to copy, either out_max or up to and
|
||||||
* including the first newline
|
* including the first newline
|
||||||
*/
|
*/
|
||||||
if ((ret = mem_read(bio, out, i)) > 0)
|
if ((ret = mem_read(bio, out, i)) > 0)
|
||||||
out[ret] = '\0';
|
out[ret] = '\0';
|
||||||
|
|
||||||
|
|
|
@ -5,21 +5,21 @@
|
||||||
* This package is an SSL implementation written
|
* This package is an SSL implementation written
|
||||||
* by Eric Young (eay@cryptsoft.com).
|
* by Eric Young (eay@cryptsoft.com).
|
||||||
* The implementation was written so as to conform with Netscapes SSL.
|
* The implementation was written so as to conform with Netscapes SSL.
|
||||||
*
|
*
|
||||||
* This library is free for commercial and non-commercial use as long as
|
* This library is free for commercial and non-commercial use as long as
|
||||||
* the following conditions are aheared to. The following conditions
|
* the following conditions are aheared to. The following conditions
|
||||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||||
* included with this distribution is covered by the same copyright terms
|
* included with this distribution is covered by the same copyright terms
|
||||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||||
*
|
*
|
||||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||||
* the code are not to be removed.
|
* the code are not to be removed.
|
||||||
* If this package is used in a product, Eric Young should be given attribution
|
* If this package is used in a product, Eric Young should be given attribution
|
||||||
* as the author of the parts of the library used.
|
* as the author of the parts of the library used.
|
||||||
* This can be in the form of a textual message at program startup or
|
* This can be in the form of a textual message at program startup or
|
||||||
* in documentation (online or textual) provided with the package.
|
* in documentation (online or textual) provided with the package.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
|
@ -34,10 +34,10 @@
|
||||||
* Eric Young (eay@cryptsoft.com)"
|
* Eric Young (eay@cryptsoft.com)"
|
||||||
* The word 'cryptographic' can be left out if the rouines from the library
|
* The word 'cryptographic' can be left out if the rouines from the library
|
||||||
* being used are not cryptographic related :-).
|
* being used are not cryptographic related :-).
|
||||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||||
* the apps directory (application code) you must include an acknowledgement:
|
* the apps directory (application code) you must include an acknowledgement:
|
||||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The licence and distribution terms for any publically available version or
|
* The licence and distribution terms for any publically available version or
|
||||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||||
* copied and put under another distribution licence
|
* copied and put under another distribution licence
|
||||||
|
|
|
@ -5,21 +5,21 @@
|
||||||
* This package is an SSL implementation written
|
* This package is an SSL implementation written
|
||||||
* by Eric Young (eay@cryptsoft.com).
|
* by Eric Young (eay@cryptsoft.com).
|
||||||
* The implementation was written so as to conform with Netscapes SSL.
|
* The implementation was written so as to conform with Netscapes SSL.
|
||||||
*
|
*
|
||||||
* This library is free for commercial and non-commercial use as long as
|
* This library is free for commercial and non-commercial use as long as
|
||||||
* the following conditions are aheared to. The following conditions
|
* the following conditions are aheared to. The following conditions
|
||||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||||
* included with this distribution is covered by the same copyright terms
|
* included with this distribution is covered by the same copyright terms
|
||||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||||
*
|
*
|
||||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||||
* the code are not to be removed.
|
* the code are not to be removed.
|
||||||
* If this package is used in a product, Eric Young should be given attribution
|
* If this package is used in a product, Eric Young should be given attribution
|
||||||
* as the author of the parts of the library used.
|
* as the author of the parts of the library used.
|
||||||
* This can be in the form of a textual message at program startup or
|
* This can be in the form of a textual message at program startup or
|
||||||
* in documentation (online or textual) provided with the package.
|
* in documentation (online or textual) provided with the package.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
|
@ -34,10 +34,10 @@
|
||||||
* Eric Young (eay@cryptsoft.com)"
|
* Eric Young (eay@cryptsoft.com)"
|
||||||
* The word 'cryptographic' can be left out if the rouines from the library
|
* The word 'cryptographic' can be left out if the rouines from the library
|
||||||
* being used are not cryptographic related :-).
|
* being used are not cryptographic related :-).
|
||||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||||
* the apps directory (application code) you must include an acknowledgement:
|
* the apps directory (application code) you must include an acknowledgement:
|
||||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The licence and distribution terms for any publically available version or
|
* The licence and distribution terms for any publically available version or
|
||||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||||
* copied and put under another distribution licence
|
* copied and put under another distribution licence
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: x509_vfy.c,v 1.122 2023/05/08 14:51:00 tb Exp $ */
|
/* $OpenBSD: x509_vfy.c,v 1.123 2023/05/14 20:20:40 tb Exp $ */
|
||||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -2308,8 +2308,8 @@ X509_STORE_CTX_free(X509_STORE_CTX *ctx)
|
||||||
LCRYPTO_ALIAS(X509_STORE_CTX_free);
|
LCRYPTO_ALIAS(X509_STORE_CTX_free);
|
||||||
|
|
||||||
int
|
int
|
||||||
X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509,
|
X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *leaf,
|
||||||
STACK_OF(X509) *chain)
|
STACK_OF(X509) *untrusted)
|
||||||
{
|
{
|
||||||
int param_ret = 1;
|
int param_ret = 1;
|
||||||
|
|
||||||
|
@ -2337,8 +2337,8 @@ X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509,
|
||||||
* possible even on early exits.
|
* possible even on early exits.
|
||||||
*/
|
*/
|
||||||
ctx->store = store;
|
ctx->store = store;
|
||||||
ctx->cert = x509;
|
ctx->cert = leaf;
|
||||||
ctx->untrusted = chain;
|
ctx->untrusted = untrusted;
|
||||||
|
|
||||||
if (store && store->verify)
|
if (store && store->verify)
|
||||||
ctx->verify = store->verify;
|
ctx->verify = store->verify;
|
||||||
|
|
|
@ -36,7 +36,7 @@ MAKE_FLAGS+= _REGRESS_TMP=${_REGRESS_TMP}
|
||||||
${_REGRESS_CLEAN}
|
${_REGRESS_CLEAN}
|
||||||
|
|
||||||
.END: .SILENT
|
.END: .SILENT
|
||||||
.if ${.TARGETS:Mall} || ${.TARGETS:Mregress}
|
.if ${.TARGETS:Mall} || ${.TARGETS:Mregress}
|
||||||
echo ====================================================================
|
echo ====================================================================
|
||||||
.if empty(REGRESS_MAIL) || empty(_REGRESS_TMP)
|
.if empty(REGRESS_MAIL) || empty(_REGRESS_TMP)
|
||||||
echo You can set REGRESS_LOG to point to a file and mail it manually.
|
echo You can set REGRESS_LOG to point to a file and mail it manually.
|
||||||
|
|
|
@ -11,7 +11,7 @@ function test_expr {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# The first arg will get eval'd so escape any meta characters
|
# The first arg will get eval'd so escape any meta characters
|
||||||
# The 2nd arg is an expected string/response from expr for that op.
|
# The 2nd arg is an expected string/response from expr for that op.
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ test_expr '1 - -5' '6'
|
||||||
# More complex math test for precedence
|
# More complex math test for precedence
|
||||||
test_expr '-3 + -1 \* 4 + 3 / -6' '-7'
|
test_expr '-3 + -1 \* 4 + 3 / -6' '-7'
|
||||||
|
|
||||||
# The next two are messy but the shell escapes cause that.
|
# The next two are messy but the shell escapes cause that.
|
||||||
# Test precendence
|
# Test precendence
|
||||||
test_expr 'X1/2/3 : X\\\(.\*[^/]\\\)//\*[^/][^/]\*/\*$ \| . : \\\(.\\\)' '1/2'
|
test_expr 'X1/2/3 : X\\\(.\*[^/]\\\)//\*[^/][^/]\*/\*$ \| . : \\\(.\\\)' '1/2'
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ REGRESS_TARGETS= ${C_TARGETS} ${CPP_TARGETS}
|
||||||
|
|
||||||
.for i in ${C_MODULES}
|
.for i in ${C_MODULES}
|
||||||
. for j in ${C_${i:U}}
|
. for j in ${C_${i:U}}
|
||||||
C_TARGETS+= c-${i}-${j}
|
C_TARGETS+= c-${i}-${j}
|
||||||
c-${i}-${j}:
|
c-${i}-${j}:
|
||||||
${TCC} ${TCFLAGS} -o /dev/null ${i}-${j}.c 2>&1 | sed '/^\/tmp\//d;s/(\.text+0x[0-9a-f]*)//' | diff -u - ${.CURDIR}/${i}-${j}.c${EXP}
|
${TCC} ${TCFLAGS} -o /dev/null ${i}-${j}.c 2>&1 | sed '/^\/tmp\//d;s/(\.text+0x[0-9a-f]*)//' | diff -u - ${.CURDIR}/${i}-${j}.c${EXP}
|
||||||
. endfor
|
. endfor
|
||||||
|
@ -59,9 +59,9 @@ NOOBJ= Yes
|
||||||
REGRESS_EXPECTED_FAILURES= c-getcwd-1
|
REGRESS_EXPECTED_FAILURES= c-getcwd-1
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${BUILD_GCC3:L} == "yes"
|
.if ${BUILD_GCC3:L} == "yes"
|
||||||
EXP= .exp.gcc3
|
EXP= .exp.gcc3
|
||||||
.elif ${BUILD_GCC4:L} == "yes"
|
.elif ${BUILD_GCC4:L} == "yes"
|
||||||
EXP= .exp.gcc4
|
EXP= .exp.gcc4
|
||||||
.else
|
.else
|
||||||
regress:
|
regress:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# $OpenBSD: Makefile,v 1.19 2022/08/20 14:13:48 sthen Exp $
|
# $OpenBSD: Makefile,v 1.19 2022/08/20 14:13:48 sthen Exp $
|
||||||
|
|
||||||
SUBDIR+= elf hidden weak dlsym dlopen dlclose lazy
|
SUBDIR+= elf hidden weak dlsym dlopen dlclose lazy
|
||||||
SUBDIR+= constructor
|
SUBDIR+= constructor
|
||||||
SUBDIR+= link-order edgecases initfirst
|
SUBDIR+= link-order edgecases initfirst
|
||||||
SUBDIR+= df_1_noopen randomdata subst dependencies
|
SUBDIR+= df_1_noopen randomdata subst dependencies
|
||||||
SUBDIR+= init-env nodelete noload
|
SUBDIR+= init-env nodelete noload
|
||||||
|
|
|
@ -27,7 +27,7 @@ LDADD=
|
||||||
LDADD+=-lab
|
LDADD+=-lab
|
||||||
LDADD+=-laa
|
LDADD+=-laa
|
||||||
LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR)
|
LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR)
|
||||||
NOMAN=
|
NOMAN=
|
||||||
CC=c++
|
CC=c++
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ LDADD=
|
||||||
LDADD+=-laa
|
LDADD+=-laa
|
||||||
LDADD+=-lab
|
LDADD+=-lab
|
||||||
LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR)
|
LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR)
|
||||||
NOMAN=
|
NOMAN=
|
||||||
CC=c++
|
CC=c++
|
||||||
|
|
||||||
|
|
|
@ -20,4 +20,4 @@ int funaa(void)
|
||||||
{
|
{
|
||||||
return 1 + symbb;
|
return 1 + symbb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,4 +20,4 @@ int funaa(void)
|
||||||
{
|
{
|
||||||
return 1 + symbb;
|
return 1 + symbb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "aa.h"
|
#include "aa.h"
|
||||||
char strbuf[512];
|
char strbuf[512];
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
const char *libname = "libaa";
|
const char *libname = "libaa";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ LDADD=
|
||||||
#LDADD+=-lab
|
#LDADD+=-lab
|
||||||
#LDADD+=-laa
|
#LDADD+=-laa
|
||||||
#LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR)
|
#LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR)
|
||||||
NOMAN=
|
NOMAN=
|
||||||
CC=c++
|
CC=c++
|
||||||
LD_LIBRARY_PATH=$(AA_OBJDIR):$(AB_OBJDIR)
|
LD_LIBRARY_PATH=$(AA_OBJDIR):$(AB_OBJDIR)
|
||||||
|
|
|
@ -27,7 +27,7 @@ LDADD=
|
||||||
LDADD+=-laa
|
LDADD+=-laa
|
||||||
LDADD+=-lab
|
LDADD+=-lab
|
||||||
LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR)
|
LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR)
|
||||||
NOMAN=
|
NOMAN=
|
||||||
CC=c++
|
CC=c++
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ LDADD=
|
||||||
#LDADD+=-lac
|
#LDADD+=-lac
|
||||||
LDFLAGS=-L$(AA_OBJDIR) -L$(AC_OBJDIR)
|
LDFLAGS=-L$(AA_OBJDIR) -L$(AC_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-disable-new-dtags
|
LDFLAGS+= -Wl,-disable-new-dtags
|
||||||
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AC_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AC_OBJDIR)
|
||||||
NOMAN=
|
NOMAN=
|
||||||
CC=c++
|
CC=c++
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@ LDADD=
|
||||||
#LDADD+=-laa
|
#LDADD+=-laa
|
||||||
#LDADD+=-lac
|
#LDADD+=-lac
|
||||||
LDFLAGS=-L$(AA_OBJDIR) -L$(AC_OBJDIR)
|
LDFLAGS=-L$(AA_OBJDIR) -L$(AC_OBJDIR)
|
||||||
#LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AC_OBJDIR)
|
#LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AC_OBJDIR)
|
||||||
# This intentionally leaves out AA_OBJDIR from -rpath
|
# This intentionally leaves out AA_OBJDIR from -rpath
|
||||||
LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR)
|
||||||
NOMAN=
|
NOMAN=
|
||||||
CC=c++
|
CC=c++
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
SUBDIR=libaa_g libaa_b prog1
|
SUBDIR=libaa_g libaa_b prog1
|
||||||
|
|
||||||
.include <bsd.subdir.mk>
|
.include <bsd.subdir.mk>
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Public domain - Matthieu Herrb 2002
|
* Public domain - Matthieu Herrb 2002
|
||||||
*
|
*
|
||||||
* $OpenBSD: elfbug.h,v 1.1 2002/02/05 21:47:23 matthieu Exp $
|
* $OpenBSD: elfbug.h,v 1.1 2002/02/05 21:47:23 matthieu Exp $
|
||||||
*/
|
*/
|
||||||
extern int (*func)(void);
|
extern int (*func)(void);
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -44,11 +44,11 @@ AE_OBJDIR!= if [ -d $(AE_DIR)/${__objdir} ]; then \
|
||||||
LDADD=-laa
|
LDADD=-laa
|
||||||
LDFLAGS= -L$(AA_OBJDIR)
|
LDFLAGS= -L$(AA_OBJDIR)
|
||||||
LDFLAGS+= -Wl,--disable-new-dtags
|
LDFLAGS+= -Wl,--disable-new-dtags
|
||||||
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AB_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AB_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AD_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AD_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AE_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AE_OBJDIR)
|
||||||
NOMAN=
|
NOMAN=
|
||||||
CC=c++
|
CC=c++
|
||||||
|
|
||||||
|
|
|
@ -44,11 +44,11 @@ AE_OBJDIR!= if [ -d $(AE_DIR)/${__objdir} ]; then \
|
||||||
LDADD=-laa
|
LDADD=-laa
|
||||||
LDFLAGS= -L$(AA_OBJDIR)
|
LDFLAGS= -L$(AA_OBJDIR)
|
||||||
LDFLAGS+= -Wl,--disable-new-dtags
|
LDFLAGS+= -Wl,--disable-new-dtags
|
||||||
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AB_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AB_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AC_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AD_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AD_OBJDIR)
|
||||||
LDFLAGS+= -Wl,-rpath,$(AE_OBJDIR)
|
LDFLAGS+= -Wl,-rpath,$(AE_OBJDIR)
|
||||||
NOMAN=
|
NOMAN=
|
||||||
CC=c++
|
CC=c++
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,6 @@ foo(void)
|
||||||
{
|
{
|
||||||
if (h == NULL)
|
if (h == NULL)
|
||||||
foo_init();
|
foo_init();
|
||||||
|
|
||||||
return bar();
|
return bar();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ int
|
||||||
checksym(const char *name)
|
checksym(const char *name)
|
||||||
{
|
{
|
||||||
void *sym = dlsym(RTLD_DEFAULT, name);
|
void *sym = dlsym(RTLD_DEFAULT, name);
|
||||||
|
|
||||||
if (sym != NULL) {
|
if (sym != NULL) {
|
||||||
printf("symbol present: %s\n", name);
|
printf("symbol present: %s\n", name);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -35,7 +35,7 @@ main(int argc, char *argv[])
|
||||||
/* symbol should not be here at startup */
|
/* symbol should not be here at startup */
|
||||||
if (checksym(SYMBOL) == 1)
|
if (checksym(SYMBOL) == 1)
|
||||||
errx(1, "symbol found: %s", SYMBOL);
|
errx(1, "symbol found: %s", SYMBOL);
|
||||||
|
|
||||||
printf("opening\n");
|
printf("opening\n");
|
||||||
if ((h1 = dlopen(LIBNAME, RTLD_GLOBAL)) == NULL)
|
if ((h1 = dlopen(LIBNAME, RTLD_GLOBAL)) == NULL)
|
||||||
errx(1, "dlopen: h1: %s: %s", LIBNAME, dlerror());
|
errx(1, "dlopen: h1: %s: %s", LIBNAME, dlerror());
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
major=1
|
major=1
|
||||||
minor=0
|
minor=0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: vnconfig.c,v 1.12 2022/10/04 06:52:52 kn Exp $ */
|
/* $OpenBSD: vnconfig.c,v 1.13 2023/05/14 18:34:02 krw Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1993 University of Utah.
|
* Copyright (c) 1993 University of Utah.
|
||||||
* Copyright (c) 1990, 1993
|
* Copyright (c) 1990, 1993
|
||||||
|
@ -300,6 +300,7 @@ config(char *file, char *dev, struct disklabel *dp, char *key, size_t keylen)
|
||||||
|
|
||||||
memset(&vndio, 0, sizeof vndio);
|
memset(&vndio, 0, sizeof vndio);
|
||||||
vndio.vnd_file = file;
|
vndio.vnd_file = file;
|
||||||
|
vndio.vnd_type = (dp && dp->d_type) ? dp->d_type : DTYPE_VND;
|
||||||
vndio.vnd_secsize = (dp && dp->d_secsize) ? dp->d_secsize : DEV_BSIZE;
|
vndio.vnd_secsize = (dp && dp->d_secsize) ? dp->d_secsize : DEV_BSIZE;
|
||||||
vndio.vnd_nsectors = (dp && dp->d_nsectors) ? dp->d_nsectors : 100;
|
vndio.vnd_nsectors = (dp && dp->d_nsectors) ? dp->d_nsectors : 100;
|
||||||
vndio.vnd_ntracks = (dp && dp->d_ntracks) ? dp->d_ntracks : 1;
|
vndio.vnd_ntracks = (dp && dp->d_ntracks) ? dp->d_ntracks : 1;
|
||||||
|
|
|
@ -176,7 +176,7 @@ gpt_chk_mbr(struct dos_partition *dp, u_int64_t dsize)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Try to find the disk address of the first MBR OpenBSD partition.
|
* Try to find the disk address of the first MBR SecBSD partition.
|
||||||
*
|
*
|
||||||
* N.B.: must boot from a partition within first 2^32-1 sectors!
|
* N.B.: must boot from a partition within first 2^32-1 sectors!
|
||||||
*
|
*
|
||||||
|
@ -210,7 +210,7 @@ again:
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search for OpenBSD partition */
|
/* Search for SecBSD partition */
|
||||||
nextebr = 0;
|
nextebr = 0;
|
||||||
for (i = 0; i < NDOSPART; i++) {
|
for (i = 0; i < NDOSPART; i++) {
|
||||||
dp = &mbr.dmbr_parts[i];
|
dp = &mbr.dmbr_parts[i];
|
||||||
|
@ -253,7 +253,7 @@ again:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Try to find the disk address of the first GPT OpenBSD partition.
|
* Try to find the disk address of the first GPT SecBSD partition.
|
||||||
*
|
*
|
||||||
* N.B.: must boot from a partition within first 2^32-1 sectors!
|
* N.B.: must boot from a partition within first 2^32-1 sectors!
|
||||||
*
|
*
|
||||||
|
@ -275,7 +275,7 @@ findopenbsd_gpt(efi_diskinfo_t ed, const char **err)
|
||||||
static struct uuid *openbsd_uuid = NULL, openbsd_uuid_space;
|
static struct uuid *openbsd_uuid = NULL, openbsd_uuid_space;
|
||||||
static u_char buf[4096];
|
static u_char buf[4096];
|
||||||
|
|
||||||
/* Prepare OpenBSD UUID */
|
/* Prepare SecBSD UUID */
|
||||||
if (openbsd_uuid == NULL) {
|
if (openbsd_uuid == NULL) {
|
||||||
/* XXX: should be replaced by uuid_dec_be() */
|
/* XXX: should be replaced by uuid_dec_be() */
|
||||||
memcpy(&openbsd_uuid_space, openbsd_uuid_code,
|
memcpy(&openbsd_uuid_space, openbsd_uuid_code,
|
||||||
|
@ -368,7 +368,7 @@ findopenbsd_gpt(efi_diskinfo_t ed, const char **err)
|
||||||
lba = letoh64(gp.gp_lba_start);
|
lba = letoh64(gp.gp_lba_start);
|
||||||
/* Bootloaders do not current handle addresses > UINT_MAX! */
|
/* Bootloaders do not current handle addresses > UINT_MAX! */
|
||||||
if (lba > UINT_MAX || EFI_SECTOBLK(ed, lba) > UINT_MAX) {
|
if (lba > UINT_MAX || EFI_SECTOBLK(ed, lba) > UINT_MAX) {
|
||||||
*err = "OpenBSD Partition LBA > 2**32 - 1";
|
*err = "SecBSD Partition LBA > 2**32 - 1";
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
return (u_int)lba;
|
return (u_int)lba;
|
||||||
|
@ -414,14 +414,14 @@ efi_getdisklabel(efi_diskinfo_t ed, struct disklabel *label)
|
||||||
if (start == (u_int)-1) {
|
if (start == (u_int)-1) {
|
||||||
if (err != NULL)
|
if (err != NULL)
|
||||||
return (err);
|
return (err);
|
||||||
return ("no OpenBSD GPT partition");
|
return ("no SecBSD GPT partition");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
start = findopenbsd(ed, &err);
|
start = findopenbsd(ed, &err);
|
||||||
if (start == (u_int)-1) {
|
if (start == (u_int)-1) {
|
||||||
if (err != NULL)
|
if (err != NULL)
|
||||||
return (err);
|
return (err);
|
||||||
return "no OpenBSD MBR partition\n";
|
return "no SecBSD MBR partition\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -548,11 +548,11 @@ sr_getdisklabel(struct sr_boot_volume *bv, struct disklabel *label)
|
||||||
if (start == (u_int)-1) {
|
if (start == (u_int)-1) {
|
||||||
if (err != NULL)
|
if (err != NULL)
|
||||||
return (err);
|
return (err);
|
||||||
return "no OpenBSD partition\n";
|
return "no SecBSD partition\n";
|
||||||
}
|
}
|
||||||
} else if (mbr.dmbr_sign == DOSMBR_SIGNATURE) {
|
} else if (mbr.dmbr_sign == DOSMBR_SIGNATURE) {
|
||||||
|
|
||||||
/* Search for OpenBSD partition */
|
/* Search for SecBSD partition */
|
||||||
for (i = 0; i < NDOSPART; i++) {
|
for (i = 0; i < NDOSPART; i++) {
|
||||||
dp = &mbr.dmbr_parts[i];
|
dp = &mbr.dmbr_parts[i];
|
||||||
if (!dp->dp_size)
|
if (!dp->dp_size)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: vnd.c,v 1.180 2023/03/08 04:43:08 guenther Exp $ */
|
/* $OpenBSD: vnd.c,v 1.181 2023/05/14 18:34:02 krw Exp $ */
|
||||||
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
|
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -85,6 +85,7 @@ struct vnd_softc {
|
||||||
|
|
||||||
char sc_file[VNDNLEN]; /* file we're covering */
|
char sc_file[VNDNLEN]; /* file we're covering */
|
||||||
int sc_flags; /* flags */
|
int sc_flags; /* flags */
|
||||||
|
uint16_t sc_type; /* d_type we are emulating */
|
||||||
size_t sc_size; /* size of vnd in sectors */
|
size_t sc_size; /* size of vnd in sectors */
|
||||||
size_t sc_secsize; /* sector size in bytes */
|
size_t sc_secsize; /* sector size in bytes */
|
||||||
size_t sc_nsectors; /* # of sectors per track */
|
size_t sc_nsectors; /* # of sectors per track */
|
||||||
|
@ -224,7 +225,7 @@ vndgetdisklabel(dev_t dev, struct vnd_softc *sc, struct disklabel *lp,
|
||||||
lp->d_ncylinders = sc->sc_size / lp->d_secpercyl;
|
lp->d_ncylinders = sc->sc_size / lp->d_secpercyl;
|
||||||
|
|
||||||
strncpy(lp->d_typename, "vnd device", sizeof(lp->d_typename));
|
strncpy(lp->d_typename, "vnd device", sizeof(lp->d_typename));
|
||||||
lp->d_type = DTYPE_VND;
|
lp->d_type = sc->sc_type;
|
||||||
strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname));
|
strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname));
|
||||||
DL_SETDSIZE(lp, sc->sc_size);
|
DL_SETDSIZE(lp, sc->sc_size);
|
||||||
lp->d_version = 1;
|
lp->d_version = 1;
|
||||||
|
@ -502,6 +503,7 @@ fail:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set geometry for device. */
|
/* Set geometry for device. */
|
||||||
|
sc->sc_type = vio->vnd_type;
|
||||||
sc->sc_secsize = vio->vnd_secsize;
|
sc->sc_secsize = vio->vnd_secsize;
|
||||||
sc->sc_ntracks = vio->vnd_ntracks;
|
sc->sc_ntracks = vio->vnd_ntracks;
|
||||||
sc->sc_nsectors = vio->vnd_nsectors;
|
sc->sc_nsectors = vio->vnd_nsectors;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: vndioctl.h,v 1.11 2019/11/18 22:32:45 jca Exp $ */
|
/* $OpenBSD: vndioctl.h,v 1.12 2023/05/14 18:34:02 krw Exp $ */
|
||||||
/* $NetBSD: vndioctl.h,v 1.5 1995/01/25 04:46:30 cgd Exp $ */
|
/* $NetBSD: vndioctl.h,v 1.5 1995/01/25 04:46:30 cgd Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -48,13 +48,14 @@
|
||||||
* Ioctl definitions for file (vnode) disk pseudo-device.
|
* Ioctl definitions for file (vnode) disk pseudo-device.
|
||||||
*/
|
*/
|
||||||
struct vnd_ioctl {
|
struct vnd_ioctl {
|
||||||
char *vnd_file; /* pathname of file to mount */
|
char *vnd_file; /* pathname of file to mount */
|
||||||
size_t vnd_secsize; /* sector size in bytes */
|
size_t vnd_secsize; /* sector size in bytes */
|
||||||
size_t vnd_nsectors; /* number of sectors in a track */
|
size_t vnd_nsectors; /* number of sectors in a track */
|
||||||
size_t vnd_ntracks; /* number of tracks per cylinder (i.e. heads) */
|
size_t vnd_ntracks; /* number of tracks per cylinder */
|
||||||
off_t vnd_size; /* (returned) size of disk */
|
off_t vnd_size; /* (returned) size of disk */
|
||||||
u_char *vnd_key;
|
u_char *vnd_key;
|
||||||
int vnd_keylen;
|
int vnd_keylen;
|
||||||
|
uint16_t vnd_type; /* DTYPE being emulated */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue