Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
4ccda2cd
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4ccda2cd
编写于
3月 12, 2008
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SUNRPC: Clean up rpcauth_bindcred()
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
af093835
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
20 deletion
+23
-20
include/linux/sunrpc/auth.h
include/linux/sunrpc/auth.h
+1
-3
net/sunrpc/auth.c
net/sunrpc/auth.c
+18
-10
net/sunrpc/sched.c
net/sunrpc/sched.c
+4
-7
未找到文件。
include/linux/sunrpc/auth.h
浏览文件 @
4ccda2cd
...
...
@@ -135,9 +135,7 @@ void rpcauth_release(struct rpc_auth *);
struct
rpc_cred
*
rpcauth_lookup_credcache
(
struct
rpc_auth
*
,
struct
auth_cred
*
,
int
);
void
rpcauth_init_cred
(
struct
rpc_cred
*
,
const
struct
auth_cred
*
,
struct
rpc_auth
*
,
const
struct
rpc_credops
*
);
struct
rpc_cred
*
rpcauth_lookupcred
(
struct
rpc_auth
*
,
int
);
void
rpcauth_bindcred
(
struct
rpc_task
*
);
void
rpcauth_bind_root_cred
(
struct
rpc_task
*
);
void
rpcauth_holdcred
(
struct
rpc_task
*
);
void
rpcauth_bindcred
(
struct
rpc_task
*
,
struct
rpc_cred
*
,
int
);
void
put_rpccred
(
struct
rpc_cred
*
);
void
rpcauth_unbindcred
(
struct
rpc_task
*
);
__be32
*
rpcauth_marshcred
(
struct
rpc_task
*
,
__be32
*
);
...
...
net/sunrpc/auth.c
浏览文件 @
4ccda2cd
...
...
@@ -375,7 +375,15 @@ rpcauth_init_cred(struct rpc_cred *cred, const struct auth_cred *acred,
}
EXPORT_SYMBOL_GPL
(
rpcauth_init_cred
);
void
static
void
rpcauth_generic_bind_cred
(
struct
rpc_task
*
task
,
struct
rpc_cred
*
cred
)
{
task
->
tk_msg
.
rpc_cred
=
get_rpccred
(
cred
);
dprintk
(
"RPC: %5u holding %s cred %p
\n
"
,
task
->
tk_pid
,
cred
->
cr_auth
->
au_ops
->
au_name
,
cred
);
}
static
void
rpcauth_bind_root_cred
(
struct
rpc_task
*
task
)
{
struct
rpc_auth
*
auth
=
task
->
tk_client
->
cl_auth
;
...
...
@@ -394,8 +402,8 @@ rpcauth_bind_root_cred(struct rpc_task *task)
task
->
tk_status
=
PTR_ERR
(
ret
);
}
void
rpcauth_bindcred
(
struct
rpc_task
*
task
)
static
void
rpcauth_bind
_new_
cred
(
struct
rpc_task
*
task
)
{
struct
rpc_auth
*
auth
=
task
->
tk_client
->
cl_auth
;
struct
rpc_cred
*
ret
;
...
...
@@ -410,14 +418,14 @@ rpcauth_bindcred(struct rpc_task *task)
}
void
rpcauth_
holdcred
(
struct
rpc_task
*
task
)
rpcauth_
bindcred
(
struct
rpc_task
*
task
,
struct
rpc_cred
*
cred
,
int
flags
)
{
struct
rpc_cred
*
cred
=
task
->
tk_msg
.
rpc_cred
;
if
(
cred
!=
NULL
)
{
get_rpccred
(
cred
);
dprintk
(
"RPC: %5u holding %s cred %p
\n
"
,
task
->
tk_pid
,
cred
->
cr_auth
->
au_ops
->
au_name
,
cred
);
}
if
(
cred
!=
NULL
)
rpcauth_generic_bind_cred
(
task
,
cred
);
else
if
(
flags
&
RPC_TASK_ROOTCREDS
)
rpcauth_bind_root_cred
(
task
);
else
rpcauth_bind_new_cred
(
task
);
}
void
...
...
net/sunrpc/sched.c
浏览文件 @
4ccda2cd
...
...
@@ -817,14 +817,11 @@ static void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *ta
task
->
tk_action
=
rpc_prepare_task
;
if
(
task_setup_data
->
rpc_message
!=
NULL
)
{
memcpy
(
&
task
->
tk_msg
,
task_setup_data
->
rpc_message
,
sizeof
(
task
->
tk_msg
));
task
->
tk_msg
.
rpc_proc
=
task_setup_data
->
rpc_message
->
rpc_proc
;
task
->
tk_msg
.
rpc_argp
=
task_setup_data
->
rpc_message
->
rpc_argp
;
task
->
tk_msg
.
rpc_resp
=
task_setup_data
->
rpc_message
->
rpc_resp
;
/* Bind the user cred */
if
(
task
->
tk_msg
.
rpc_cred
!=
NULL
)
rpcauth_holdcred
(
task
);
else
if
(
!
(
task_setup_data
->
flags
&
RPC_TASK_ROOTCREDS
))
rpcauth_bindcred
(
task
);
else
rpcauth_bind_root_cred
(
task
);
rpcauth_bindcred
(
task
,
task_setup_data
->
rpc_message
->
rpc_cred
,
task_setup_data
->
flags
);
if
(
task
->
tk_action
==
NULL
)
rpc_call_start
(
task
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录