Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 312464 Details for
Bug 456401
[RFE] prevent RPC services from grabbing port of other known services
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed patch for glibc/sunrpc
glibc-sunrpc-resvports.patch (text/plain), 1.40 KB, created by
Kamil Dudka
on 2008-07-23 11:31:26 UTC
(
hide
)
Description:
proposed patch for glibc/sunrpc
Filename:
MIME Type:
Creator:
Kamil Dudka
Created:
2008-07-23 11:31:26 UTC
Size:
1.40 KB
patch
obsolete
>diff -ruN glibc-20080703T1203.orig/sunrpc/bindrsvprt.c glibc-20080703T1203/sunrpc/bindrsvprt.c >--- glibc-20080703T1203.orig/sunrpc/bindrsvprt.c 2008-01-21 02:35:17.000000000 +0100 >+++ glibc-20080703T1203/sunrpc/bindrsvprt.c 2008-07-23 12:34:29.000000000 +0200 >@@ -36,6 +36,7 @@ > #include <sys/types.h> > #include <sys/socket.h> > #include <netinet/in.h> >+#include <netdb.h> > > /* > * Bind a socket to a privileged IP port >@@ -53,6 +54,11 @@ > #define NPORTS (ENDPORT - STARTPORT + 1) > static short startport = STARTPORT; > >+#define MAXALIASES 35 >+#define SBUFSIZE (BUFSIZ + 1 + (sizeof(char *) * MAXALIASES)) >+ char *servbuf; >+ struct servent serv, *result; >+ > if (sin == (struct sockaddr_in *) 0) > { > sin = &myaddr; >@@ -75,12 +81,24 @@ > > int nports = ENDPORT - startport + 1; > int endport = ENDPORT; >+ >+ servbuf = malloc(SBUFSIZE); >+ if (NULL == servbuf) >+ { >+ __set_errno(ENOMEM); >+ return -1; >+ } >+ > again: > for (i = 0; i < nports; ++i) > { > sin->sin_port = htons (port++); > if (port > endport) > port = startport; >+ __getservbyport_r(sin->sin_port, NULL, &serv, >+ servbuf, SBUFSIZE, &result); >+ if (result) >+ continue; > res = __bind (sd, sin, sizeof (struct sockaddr_in)); > if (res >= 0 || errno != EADDRINUSE) > break; >@@ -95,6 +113,7 @@ > goto again; > } > >+ free(servbuf); > return res; > } > libc_hidden_def (bindresvport)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 456401
: 312464