ypset should only be permitted from a reserved port.

from Tor Egge <tegge@pvv.unit.no>
This commit is contained in:
deraadt 1993-11-15 08:20:05 +00:00
parent 1259031077
commit 16f75ff463
2 changed files with 8 additions and 2 deletions

View File

@ -28,7 +28,7 @@
*/
#ifndef LINT
static char rcsid[] = "$Id: ypbind.c,v 1.3 1993/09/05 16:10:01 deraadt Exp $";
static char rcsid[] = "$Id: ypbind.c,v 1.4 1993/11/15 08:20:05 deraadt Exp $";
#endif
#include <sys/param.h>
@ -197,6 +197,9 @@ CLIENT *clnt;
return (void *)NULL;
}
if(ntohs(fromsin->sin_port) >= IPPORT_RESERVED)
return (void &)&res;
if(argp->ypsetdom_vers != YPVERS)
return (void *)&res;

View File

@ -28,7 +28,7 @@
*/
#ifndef LINT
static char rcsid[] = "$Id: ypbind.c,v 1.3 1993/09/05 16:10:01 deraadt Exp $";
static char rcsid[] = "$Id: ypbind.c,v 1.4 1993/11/15 08:20:05 deraadt Exp $";
#endif
#include <sys/param.h>
@ -197,6 +197,9 @@ CLIENT *clnt;
return (void *)NULL;
}
if(ntohs(fromsin->sin_port) >= IPPORT_RESERVED)
return (void &)&res;
if(argp->ypsetdom_vers != YPVERS)
return (void *)&res;