diff options
-rw-r--r-- | usr.sbin/amd/amd/amq_subr.c | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/usr.sbin/amd/amd/amq_subr.c b/usr.sbin/amd/amd/amq_subr.c index 1355f22b201..ba4c3deef2e 100644 --- a/usr.sbin/amd/amd/amq_subr.c +++ b/usr.sbin/amd/amd/amq_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)amq_subr.c 8.1 (Berkeley) 6/6/93 - * $Id: amq_subr.c,v 1.3 1997/02/16 00:04:25 deraadt Exp $ + * $Id: amq_subr.c,v 1.4 1999/08/26 14:57:19 millert Exp $ */ /* @@ -173,6 +173,11 @@ extern qelem mfhead; return (amq_mount_info_list *) &mfhead; /* XXX */ } +#if 0 +/* + * amd does not allocate a seperate socket to distinguish local + * connects so this "security" check is useless. + */ static int ok_security(rqstp) struct svc_req *rqstp; { @@ -201,24 +206,14 @@ struct svc_req *rqstp; char *cp; plog(XLOG_INFO, "amq requested mount of %s", s); -#if 0 + /* - * Minimalist security check. + * Minimalist (read useless) security check. */ if (!ok_security(rqstp)) { rc = EACCES; return &rc; } -#else - /* - * Better security check. amd does not allocate a seperate - * socket to distinguish local connects; so the above security - * check is useless - */ - rc = EACCES; - return &rc; -#endif - /* * Find end of key @@ -245,6 +240,24 @@ struct svc_req *rqstp; return 0; return &rc; } +#else +/* + * Disable "amq -M" functionality since it is inherently insecure. + */ +int * +amqproc_mount_1(argp, rqstp) +voidp argp; +struct svc_req *rqstp; +{ + static int rc; + char *s = *(amq_string *) argp; + + plog(XLOG_ERROR, "amq requested mount of %s, but code is disabled", s); + + rc = EACCES; + return &rc; +} +#endif amq_string * amqproc_getvers_1(argp, rqstp) |