summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-10-04 09:09:09 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-10-04 09:09:54 +0200
commitb9961862aa035bd0c17fc1378a3b10b5f13c5c47 (patch)
tree7f612cfe6d64a4e645455d845db27e6fd5713ac9
parent6d88b40c11dad0afb9cc7d851baa66503d044973 (diff)
downloadcifs_idmap_sss-b9961862aa035bd0c17fc1378a3b10b5f13c5c47.tar.gz
cifs_idmap_sss-b9961862aa035bd0c17fc1378a3b10b5f13c5c47.tar.bz2
cifs_idmap_sss-b9961862aa035bd0c17fc1378a3b10b5f13c5c47.zip
Fix indentation
-rw-r--r--cifs_idmap_sss.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/cifs_idmap_sss.c b/cifs_idmap_sss.c
index d1c6b0a..57eb4a9 100644
--- a/cifs_idmap_sss.c
+++ b/cifs_idmap_sss.c
@@ -43,8 +43,8 @@
#ifdef DEBUG
#include <syslog.h>
#define debug(str, ...) \
- syslog(0, "%s: " str "\n", \
- __FUNCTION__, ##__VA_ARGS__ )
+ syslog(0, "%s: " str "\n", \
+ __FUNCTION__, ##__VA_ARGS__)
#else
#define debug(...) do { } while(0)
#endif
@@ -56,16 +56,16 @@ struct sssd_ctx {
#define ctx_set_error(ctx, error) \
do { \
- *ctx->errmsg = error; \
+ *ctx->errmsg = error; \
debug("%s", error ? error : ""); \
} while (0);
-
+
int
cifs_idmap_init_plugin(void **handle, const char **errmsg)
{
struct sssd_ctx *ctx;
enum idmap_error_code err;
-
+
ctx = malloc(sizeof *ctx);
if (!ctx) {
*errmsg = "Failed to allocate context";
@@ -119,7 +119,7 @@ int cifs_idmap_sid_to_str(void *handle, const struct cifs_sid *sid,
if (strcmp(str_sid, WORLD_SID) == 0) {
*name = strdup("\\Everyone");
- if (!*name) {
+ if (!*name) {
ctx_set_error(ctx, strerror(ENOMEM));
return -ENOMEM;
}
@@ -155,7 +155,7 @@ int cifs_idmap_str_to_sid(void *handle, const char *name,
if (strncmp("S-", name, 2) == 0) {
debug("%s: name is sid string representation", __FUNCTION__);
- str_sid = strdup(name);
+ str_sid = strdup(name);
} else {
err = sss_nss_getsidbyname(name, &str_sid, &id_type);
if (err != 0) {
@@ -203,8 +203,8 @@ int cifs_idmap_sids_to_ids(void *handle, const struct cifs_sid *sid,
debug("num: %zd", num);
if (num > UINT_MAX) {
- ctx_set_error(ctx, "num is too large.");
- return -EINVAL;
+ ctx_set_error(ctx, "num is too large.");
+ return -EINVAL;
}
for (i = 0; i < num; ++i) {
@@ -217,7 +217,7 @@ int cifs_idmap_sids_to_ids(void *handle, const struct cifs_sid *sid,
ctx_set_error(ctx, idmap_error_string(idmap_err));
continue;
}
-
+
err = sss_nss_getidbysid(str_sid, (uint32_t *)&cuxid[i].id.uid, &id_type);
if (err != 0) {
@@ -233,10 +233,10 @@ int cifs_idmap_sids_to_ids(void *handle, const struct cifs_sid *sid,
/* FIXME: Make this generic and handle all possible ids */
continue;
}
- debug("setting uid of %s to %d", str_sid, cuxid[i].id.uid);
+ debug("setting uid of %s to %d", str_sid, cuxid[i].id.uid);
}
- debug("str_sid: %s, id: %d", str_sid, cuxid[i].id.uid);
-
+ debug("str_sid: %s, id: %d", str_sid, cuxid[i].id.uid);
+
success = 0;
switch (id_type) {
@@ -271,8 +271,8 @@ int cifs_idmap_ids_to_sids(void *handle, const struct cifs_uxid *cuxid,
debug("num ids: %zd", num);
if (num > UINT_MAX) {
- ctx_set_error(ctx, "num is too large.");
- return -EINVAL;
+ ctx_set_error(ctx, "num is too large.");
+ return -EINVAL;
}
for (i = 0; i < num; ++i) {
@@ -287,7 +287,7 @@ int cifs_idmap_ids_to_sids(void *handle, const struct cifs_uxid *cuxid,
sid[i].revision = 0;
continue;
}
-
+
idmap_err = sss_idmap_sid_to_bin_sid(ctx->idmap, str_sid, &bin_sid, &length);
free(str_sid);
if (idmap_err != IDMAP_SUCCESS) {
@@ -304,7 +304,7 @@ int cifs_idmap_ids_to_sids(void *handle, const struct cifs_uxid *cuxid,
memcpy(&sid[i], bin_sid, sizeof(sid[i]));
free(bin_sid);
-
+
success = 0;
}