Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
9162bb31
Commit
9162bb31
authored
Feb 07, 2004
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RPCSEC_GSS: Fix yet more memory leaks.
parent
3e5d779e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/auth_gss/auth_gss.c
+8
-3
No files found.
net/sunrpc/auth_gss/auth_gss.c
View file @
9162bb31
...
...
@@ -720,6 +720,7 @@ gss_marshal(struct rpc_task *task, u32 *p, int ruid)
goto
out_put_ctx
;
}
p
=
xdr_encode_netobj
(
p
,
&
bufout
);
gss_put_ctx
(
ctx
);
kfree
(
bufout
.
data
);
return
p
;
out_put_ctx:
...
...
@@ -758,13 +759,13 @@ gss_validate(struct rpc_task *task, u32 *p)
flav
=
ntohl
(
*
p
++
);
if
((
len
=
ntohl
(
*
p
++
))
>
RPC_MAX_AUTH_SIZE
)
{
printk
(
"RPC: giant verf size: %ld
\n
"
,
(
unsigned
long
)
len
);
return
NULL
;
goto
out_bad
;
}
dprintk
(
"RPC: gss_validate: verifier flavor %d, len %d
\n
"
,
flav
,
len
);
if
(
flav
!=
RPC_AUTH_GSS
)
{
printk
(
"RPC: bad verf flavor: %ld
\n
"
,
(
unsigned
long
)
flav
);
return
NULL
;
goto
out_bad
;
}
seq
=
htonl
(
task
->
tk_gss_seqno
);
bufin
.
data
=
(
u8
*
)
&
seq
;
...
...
@@ -773,10 +774,14 @@ gss_validate(struct rpc_task *task, u32 *p)
bufout
.
len
=
len
;
if
(
gss_verify_mic
(
ctx
->
gc_gss_ctx
,
&
bufin
,
&
bufout
,
&
qop_state
)
!=
0
)
return
NULL
;
goto
out_bad
;
task
->
tk_auth
->
au_rslack
=
XDR_QUADLEN
(
len
)
+
2
;
dprintk
(
"RPC: GSS gss_validate: gss_verify_mic succeeded.
\n
"
);
gss_put_ctx
(
ctx
);
return
p
+
XDR_QUADLEN
(
len
);
out_bad:
gss_put_ctx
(
ctx
);
return
NULL
;
}
static
struct
rpc_authops
authgss_ops
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment