Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198060
b: refs/heads/master
c: 559c1e0
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed May 17, 2010
1 parent 87a45ab commit e434ec5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 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: f26e681d52fcc4778d8c604ef047487ca9f3df95
refs/heads/master: 559c1e0073ae779d60e1c673cda837f3e4295302
9 changes: 5 additions & 4 deletions trunk/fs/ceph/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ int ceph_build_auth_request(struct ceph_auth_client *ac,

ret = ac->ops->build_request(ac, p + sizeof(u32), end);
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;
}
dout(" built request %d bytes\n", ret);
Expand Down Expand Up @@ -216,8 +217,8 @@ int ceph_handle_auth_reply(struct ceph_auth_client *ac,
if (ac->protocol != protocol) {
ret = ceph_auth_init_protocol(ac, protocol);
if (ret) {
pr_err("error %d on auth protocol %d init\n",
ret, protocol);
pr_err("error %d on auth method %s init\n",
ret, ac->ops->name);
goto out;
}
}
Expand All @@ -229,7 +230,7 @@ int ceph_handle_auth_reply(struct ceph_auth_client *ac,
if (ret == -EAGAIN) {
return ceph_build_auth_request(ac, reply_buf, reply_len);
} else if (ret) {
pr_err("authentication error %d\n", ret);
pr_err("auth method '%s' error %d\n", ac->ops->name, ret);
return ret;
}
return 0;
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/ceph/auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ struct ceph_auth_client;
struct ceph_authorizer;

struct ceph_auth_client_ops {
const char *name;

/*
* true if we are authenticated and can connect to
* services.
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ceph/auth_none.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
.name = "none",
.reset = reset,
.destroy = destroy,
.is_authenticated = is_authenticated,
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ceph/auth_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
.name = "x",
.is_authenticated = ceph_x_is_authenticated,
.build_request = ceph_x_build_request,
.handle_reply = ceph_x_handle_reply,
Expand Down

0 comments on commit e434ec5

Please sign in to comment.