#include "ceph_debug.h"
#include <linux/module.h>
+#include <linux/slab.h>
#include <linux/err.h>
+#include <linux/slab.h>
#include "types.h"
#include "auth_none.h"
+#include "auth_x.h"
#include "decode.h"
#include "super.h"
* get protocol handler
*/
static u32 supported_protocols[] = {
- CEPH_AUTH_NONE
+ CEPH_AUTH_NONE,
+ CEPH_AUTH_CEPHX
};
int ceph_auth_init_protocol(struct ceph_auth_client *ac, int protocol)
switch (protocol) {
case CEPH_AUTH_NONE:
return ceph_auth_none_init(ac);
+ case CEPH_AUTH_CEPHX:
+ return ceph_x_init(ac);
default:
return -ENOENT;
}
lenp = p;
p += sizeof(u32);
+ ceph_decode_need(&p, end, 1 + sizeof(u32), bad);
+ ceph_encode_8(&p, 1);
num = ARRAY_SIZE(supported_protocols);
ceph_encode_32(&p, num);
+ ceph_decode_need(&p, end, num * sizeof(u32), bad);
for (i = 0; i < num; i++)
ceph_encode_32(&p, supported_protocols[i]);