Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / common / secret.h
1 #ifndef CEPH_SECRET_H
2 #define CEPH_SECRET_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 int read_secret_from_file(const char *filename, char *secret, size_t max_len);
9
10 /*
11  * Attempts to add the secret to the kernel, but falls back to
12  * the old secret= option if the kernel is too old.
13  */
14 int get_secret_option(const char *secret, const char *key_name,
15                       char *secret_option, size_t secret_option_len);
16
17 int set_kernel_secret(const char *secret, const char *key_name);
18
19 int is_kernel_secret(const char *key_name);
20
21 #ifdef __cplusplus
22 }
23 #endif
24
25 #endif