Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Conflicts: net/sunrpc/auth_gss/gss_krb5_crypto.c net/sunrpc/auth_gss/gss_spkm3_token.c net/sunrpc/clnt.c Merge with mainline and fix conflicts.
This commit is contained in:
@@ -192,7 +192,7 @@ struct nlm_host *
|
||||
nlmsvc_lookup_host(struct svc_rqst *rqstp,
|
||||
const char *hostname, int hostname_len)
|
||||
{
|
||||
return nlm_lookup_host(1, &rqstp->rq_addr,
|
||||
return nlm_lookup_host(1, svc_addr_in(rqstp),
|
||||
rqstp->rq_prot, rqstp->rq_vers,
|
||||
hostname, hostname_len);
|
||||
}
|
||||
|
@@ -141,6 +141,7 @@ lockd(struct svc_rqst *rqstp)
|
||||
*/
|
||||
while ((nlmsvc_users || !signalled()) && nlmsvc_pid == current->pid) {
|
||||
long timeout = MAX_SCHEDULE_TIMEOUT;
|
||||
char buf[RPC_MAX_ADDRBUFLEN];
|
||||
|
||||
if (signalled()) {
|
||||
flush_signals(current);
|
||||
@@ -175,11 +176,10 @@ lockd(struct svc_rqst *rqstp)
|
||||
break;
|
||||
}
|
||||
|
||||
dprintk("lockd: request from %08x\n",
|
||||
(unsigned)ntohl(rqstp->rq_addr.sin_addr.s_addr));
|
||||
dprintk("lockd: request from %s\n",
|
||||
svc_print_addr(rqstp, buf, sizeof(buf)));
|
||||
|
||||
svc_process(rqstp);
|
||||
|
||||
}
|
||||
|
||||
flush_signals(current);
|
||||
@@ -223,23 +223,29 @@ static int find_socket(struct svc_serv *serv, int proto)
|
||||
return found;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make any sockets that are needed but not present.
|
||||
* If nlm_udpport or nlm_tcpport were set as module
|
||||
* options, make those sockets unconditionally
|
||||
*/
|
||||
static int make_socks(struct svc_serv *serv, int proto)
|
||||
{
|
||||
/* Make any sockets that are needed but not present.
|
||||
* If nlm_udpport or nlm_tcpport were set as module
|
||||
* options, make those sockets unconditionally
|
||||
*/
|
||||
static int warned;
|
||||
static int warned;
|
||||
int err = 0;
|
||||
|
||||
if (proto == IPPROTO_UDP || nlm_udpport)
|
||||
if (!find_socket(serv, IPPROTO_UDP))
|
||||
err = svc_makesock(serv, IPPROTO_UDP, nlm_udpport);
|
||||
if (err == 0 && (proto == IPPROTO_TCP || nlm_tcpport))
|
||||
err = svc_makesock(serv, IPPROTO_UDP, nlm_udpport,
|
||||
SVC_SOCK_DEFAULTS);
|
||||
if (err >= 0 && (proto == IPPROTO_TCP || nlm_tcpport))
|
||||
if (!find_socket(serv, IPPROTO_TCP))
|
||||
err= svc_makesock(serv, IPPROTO_TCP, nlm_tcpport);
|
||||
if (!err)
|
||||
err = svc_makesock(serv, IPPROTO_TCP, nlm_tcpport,
|
||||
SVC_SOCK_DEFAULTS);
|
||||
|
||||
if (err >= 0) {
|
||||
warned = 0;
|
||||
else if (warned++ == 0)
|
||||
err = 0;
|
||||
} else if (warned++ == 0)
|
||||
printk(KERN_WARNING
|
||||
"lockd_up: makesock failed, error=%d\n", err);
|
||||
return err;
|
||||
|
@@ -224,7 +224,7 @@ nlm4svc_proc_granted(struct svc_rqst *rqstp, struct nlm_args *argp,
|
||||
resp->cookie = argp->cookie;
|
||||
|
||||
dprintk("lockd: GRANTED called\n");
|
||||
resp->status = nlmclnt_grant(&rqstp->rq_addr, &argp->lock);
|
||||
resp->status = nlmclnt_grant(svc_addr_in(rqstp), &argp->lock);
|
||||
dprintk("lockd: GRANTED status %d\n", ntohl(resp->status));
|
||||
return rpc_success;
|
||||
}
|
||||
@@ -421,15 +421,16 @@ static __be32
|
||||
nlm4svc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
|
||||
void *resp)
|
||||
{
|
||||
struct sockaddr_in saddr = rqstp->rq_addr;
|
||||
struct sockaddr_in saddr;
|
||||
|
||||
memcpy(&saddr, svc_addr_in(rqstp), sizeof(saddr));
|
||||
|
||||
dprintk("lockd: SM_NOTIFY called\n");
|
||||
if (saddr.sin_addr.s_addr != htonl(INADDR_LOOPBACK)
|
||||
|| ntohs(saddr.sin_port) >= 1024) {
|
||||
printk(KERN_WARNING
|
||||
"lockd: rejected NSM callback from %08x:%d\n",
|
||||
ntohl(rqstp->rq_addr.sin_addr.s_addr),
|
||||
ntohs(rqstp->rq_addr.sin_port));
|
||||
char buf[RPC_MAX_ADDRBUFLEN];
|
||||
printk(KERN_WARNING "lockd: rejected NSM callback from %s\n",
|
||||
svc_print_addr(rqstp, buf, sizeof(buf)));
|
||||
return rpc_system_err;
|
||||
}
|
||||
|
||||
|
@@ -253,7 +253,7 @@ nlmsvc_proc_granted(struct svc_rqst *rqstp, struct nlm_args *argp,
|
||||
resp->cookie = argp->cookie;
|
||||
|
||||
dprintk("lockd: GRANTED called\n");
|
||||
resp->status = nlmclnt_grant(&rqstp->rq_addr, &argp->lock);
|
||||
resp->status = nlmclnt_grant(svc_addr_in(rqstp), &argp->lock);
|
||||
dprintk("lockd: GRANTED status %d\n", ntohl(resp->status));
|
||||
return rpc_success;
|
||||
}
|
||||
@@ -452,15 +452,16 @@ static __be32
|
||||
nlmsvc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
|
||||
void *resp)
|
||||
{
|
||||
struct sockaddr_in saddr = rqstp->rq_addr;
|
||||
struct sockaddr_in saddr;
|
||||
|
||||
memcpy(&saddr, svc_addr_in(rqstp), sizeof(saddr));
|
||||
|
||||
dprintk("lockd: SM_NOTIFY called\n");
|
||||
if (saddr.sin_addr.s_addr != htonl(INADDR_LOOPBACK)
|
||||
|| ntohs(saddr.sin_port) >= 1024) {
|
||||
printk(KERN_WARNING
|
||||
"lockd: rejected NSM callback from %08x:%d\n",
|
||||
ntohl(rqstp->rq_addr.sin_addr.s_addr),
|
||||
ntohs(rqstp->rq_addr.sin_port));
|
||||
char buf[RPC_MAX_ADDRBUFLEN];
|
||||
printk(KERN_WARNING "lockd: rejected NSM callback from %s\n",
|
||||
svc_print_addr(rqstp, buf, sizeof(buf)));
|
||||
return rpc_system_err;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user