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
Kirill Smelkov
linux
Commits
559c1e00
Commit
559c1e00
authored
May 14, 2010
by
Sage Weil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceph: include auth method in error messages
Signed-off-by:
Sage Weil
<
sage@newdream.net
>
parent
f26e681d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
fs/ceph/auth.c
fs/ceph/auth.c
+5
-4
fs/ceph/auth.h
fs/ceph/auth.h
+2
-0
fs/ceph/auth_none.c
fs/ceph/auth_none.c
+1
-0
fs/ceph/auth_x.c
fs/ceph/auth_x.c
+1
-0
No files found.
fs/ceph/auth.c
View file @
559c1e00
...
@@ -150,7 +150,8 @@ int ceph_build_auth_request(struct ceph_auth_client *ac,
...
@@ -150,7 +150,8 @@ int ceph_build_auth_request(struct ceph_auth_client *ac,
ret
=
ac
->
ops
->
build_request
(
ac
,
p
+
sizeof
(
u32
),
end
);
ret
=
ac
->
ops
->
build_request
(
ac
,
p
+
sizeof
(
u32
),
end
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
pr_err
(
"error %d building request
\n
"
,
ret
);
pr_err
(
"error %d building auth method %s request
\n
"
,
ret
,
ac
->
ops
->
name
);
return
ret
;
return
ret
;
}
}
dout
(
" built request %d bytes
\n
"
,
ret
);
dout
(
" built request %d bytes
\n
"
,
ret
);
...
@@ -216,8 +217,8 @@ int ceph_handle_auth_reply(struct ceph_auth_client *ac,
...
@@ -216,8 +217,8 @@ int ceph_handle_auth_reply(struct ceph_auth_client *ac,
if
(
ac
->
protocol
!=
protocol
)
{
if
(
ac
->
protocol
!=
protocol
)
{
ret
=
ceph_auth_init_protocol
(
ac
,
protocol
);
ret
=
ceph_auth_init_protocol
(
ac
,
protocol
);
if
(
ret
)
{
if
(
ret
)
{
pr_err
(
"error %d on auth
protocol %d
init
\n
"
,
pr_err
(
"error %d on auth
method %s
init
\n
"
,
ret
,
protocol
);
ret
,
ac
->
ops
->
name
);
goto
out
;
goto
out
;
}
}
}
}
...
@@ -229,7 +230,7 @@ int ceph_handle_auth_reply(struct ceph_auth_client *ac,
...
@@ -229,7 +230,7 @@ int ceph_handle_auth_reply(struct ceph_auth_client *ac,
if
(
ret
==
-
EAGAIN
)
{
if
(
ret
==
-
EAGAIN
)
{
return
ceph_build_auth_request
(
ac
,
reply_buf
,
reply_len
);
return
ceph_build_auth_request
(
ac
,
reply_buf
,
reply_len
);
}
else
if
(
ret
)
{
}
else
if
(
ret
)
{
pr_err
(
"auth
entication error %d
\n
"
,
ret
);
pr_err
(
"auth
method '%s' error %d
\n
"
,
ac
->
ops
->
name
,
ret
);
return
ret
;
return
ret
;
}
}
return
0
;
return
0
;
...
...
fs/ceph/auth.h
View file @
559c1e00
...
@@ -15,6 +15,8 @@ struct ceph_auth_client;
...
@@ -15,6 +15,8 @@ struct ceph_auth_client;
struct
ceph_authorizer
;
struct
ceph_authorizer
;
struct
ceph_auth_client_ops
{
struct
ceph_auth_client_ops
{
const
char
*
name
;
/*
/*
* true if we are authenticated and can connect to
* true if we are authenticated and can connect to
* services.
* services.
...
...
fs/ceph/auth_none.c
View file @
559c1e00
...
@@ -94,6 +94,7 @@ static void ceph_auth_none_destroy_authorizer(struct ceph_auth_client *ac,
...
@@ -94,6 +94,7 @@ static void ceph_auth_none_destroy_authorizer(struct ceph_auth_client *ac,
}
}
static
const
struct
ceph_auth_client_ops
ceph_auth_none_ops
=
{
static
const
struct
ceph_auth_client_ops
ceph_auth_none_ops
=
{
.
name
=
"none"
,
.
reset
=
reset
,
.
reset
=
reset
,
.
destroy
=
destroy
,
.
destroy
=
destroy
,
.
is_authenticated
=
is_authenticated
,
.
is_authenticated
=
is_authenticated
,
...
...
fs/ceph/auth_x.c
View file @
559c1e00
...
@@ -618,6 +618,7 @@ static void ceph_x_invalidate_authorizer(struct ceph_auth_client *ac,
...
@@ -618,6 +618,7 @@ static void ceph_x_invalidate_authorizer(struct ceph_auth_client *ac,
static
const
struct
ceph_auth_client_ops
ceph_x_ops
=
{
static
const
struct
ceph_auth_client_ops
ceph_x_ops
=
{
.
name
=
"x"
,
.
is_authenticated
=
ceph_x_is_authenticated
,
.
is_authenticated
=
ceph_x_is_authenticated
,
.
build_request
=
ceph_x_build_request
,
.
build_request
=
ceph_x_build_request
,
.
handle_reply
=
ceph_x_handle_reply
,
.
handle_reply
=
ceph_x_handle_reply
,
...
...
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