Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38388
b: refs/heads/master
c: bc5fea4
h: refs/heads/master
v: v3
  • Loading branch information
Olaf Kirch authored and Linus Torvalds committed Oct 4, 2006
1 parent 008becb commit 2081024
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ade060ee51b9b6cf18d580405dc9ab90067f69f
refs/heads/master: bc5fea4299b8bda5f73c6f79dc35d388caf8bced
1 change: 1 addition & 0 deletions trunk/fs/nfsd/nfs2acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,5 @@ struct svc_version nfsd_acl_version2 = {
.vs_proc = nfsd_acl_procedures2,
.vs_dispatch = nfsd_dispatch,
.vs_xdrsize = NFS3_SVC_XDRSIZE,
.vs_hidden = 1,
};
1 change: 1 addition & 0 deletions trunk/fs/nfsd/nfs3acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,5 +263,6 @@ struct svc_version nfsd_acl_version3 = {
.vs_proc = nfsd_acl_procedures3,
.vs_dispatch = nfsd_dispatch,
.vs_xdrsize = NFS3_SVC_XDRSIZE,
.vs_hidden = 1,
};

3 changes: 3 additions & 0 deletions trunk/include/linux/sunrpc/svc.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ struct svc_version {
struct svc_procedure * vs_proc; /* per-procedure info */
u32 vs_xdrsize; /* xdrsize needed for this version */

unsigned int vs_hidden : 1; /* Don't register with portmapper.
* Only used for nfsacl so far. */

/* Override dispatch function (e.g. when caching replies).
* A return value of 0 means drop the request.
* vs_dispatch == NULL means use default dispatcher.
Expand Down
37 changes: 23 additions & 14 deletions trunk/net/sunrpc/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,23 +644,32 @@ svc_register(struct svc_serv *serv, int proto, unsigned short port)
unsigned long flags;
int i, error = 0, dummy;

progp = serv->sv_program;

dprintk("RPC: svc_register(%s, %s, %d)\n",
progp->pg_name, proto == IPPROTO_UDP? "udp" : "tcp", port);

if (!port)
clear_thread_flag(TIF_SIGPENDING);

for (i = 0; i < progp->pg_nvers; i++) {
if (progp->pg_vers[i] == NULL)
continue;
error = rpc_register(progp->pg_prog, i, proto, port, &dummy);
if (error < 0)
break;
if (port && !dummy) {
error = -EACCES;
break;
for (progp = serv->sv_program; progp; progp = progp->pg_next) {
for (i = 0; i < progp->pg_nvers; i++) {
if (progp->pg_vers[i] == NULL)
continue;

dprintk("RPC: svc_register(%s, %s, %d, %d)%s\n",
progp->pg_name,
proto == IPPROTO_UDP? "udp" : "tcp",
port,
i,
progp->pg_vers[i]->vs_hidden?
" (but not telling portmap)" : "");

if (progp->pg_vers[i]->vs_hidden)
continue;

error = rpc_register(progp->pg_prog, i, proto, port, &dummy);
if (error < 0)
break;
if (port && !dummy) {
error = -EACCES;
break;
}
}
}

Expand Down

0 comments on commit 2081024

Please sign in to comment.