summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-11 17:45:31 +0200
committerVolker Lendecke <vl@samba.org>2008-07-11 17:53:25 +0200
commitbe187b787ffa0db5207bf158dd7af55b86f0c253 (patch)
treebea90bfab1f496a447c4e53fc4590dfebf80ba06 /source3
parent979496d5c1186140b6e0aafa5f51713f9110b064 (diff)
downloadsamba-be187b787ffa0db5207bf158dd7af55b86f0c253.tar.gz
samba-be187b787ffa0db5207bf158dd7af55b86f0c253.tar.bz2
samba-be187b787ffa0db5207bf158dd7af55b86f0c253.zip
Revert "Fix nonempty whitespace only lines"
This reverts commit 0da9d0d0f9662d8bd2f370f764d5a875e11b3068. (This used to be commit b2f7bd6a05afcbba076f78d0caeaf154854db7de)
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/idmap_cache.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/source3/winbindd/idmap_cache.c b/source3/winbindd/idmap_cache.c
index b724ba0c59..a3207663e4 100644
--- a/source3/winbindd/idmap_cache.c
+++ b/source3/winbindd/idmap_cache.c
@@ -119,6 +119,7 @@ NTSTATUS idmap_cache_set(struct idmap_cache_ctx *cache, const struct id_map *id)
{
return NT_STATUS_OK;
}
+
ret = idmap_cache_build_sidkey(cache, &sidkey, id);
if (!NT_STATUS_IS_OK(ret)) return ret;
@@ -258,11 +259,11 @@ static NTSTATUS idmap_cache_fill_map(struct id_map *id, const char *value)
/* see if it is a sid */
if ( ! strncmp("IDMAP/SID/", value, 10)) {
-
+
if ( ! string_to_sid(id->sid, &value[10])) {
goto failed;
}
-
+
id->status = ID_MAPPED;
return NT_STATUS_OK;
@@ -270,21 +271,21 @@ static NTSTATUS idmap_cache_fill_map(struct id_map *id, const char *value)
/* not a SID see if it is an UID or a GID */
if ( ! strncmp("IDMAP/UID/", value, 10)) {
-
+
/* a uid */
id->xid.type = ID_TYPE_UID;
-
+
} else if ( ! strncmp("IDMAP/GID/", value, 10)) {
-
+
/* a gid */
id->xid.type = ID_TYPE_GID;
-
+
} else {
-
+
/* a completely bogus value bail out */
goto failed;
}
-
+
id->xid.id = strtol(&value[10], &rem, 0);
if (*rem != '\0') {
goto failed;
@@ -327,7 +328,7 @@ NTSTATUS idmap_cache_map_sid(struct idmap_cache_ctx *cache, struct id_map *id)
/* make sure it is marked as not mapped by default */
id->status = ID_UNKNOWN;
-
+
ret = idmap_cache_build_sidkey(cache, &sidkey, id);
if (!NT_STATUS_IS_OK(ret)) return ret;
@@ -375,7 +376,7 @@ NTSTATUS idmap_cache_map_sid(struct idmap_cache_ctx *cache, struct id_map *id)
DEBUG(10,("idmap_cache_map_sid: idmap is offline\n"));
goto done;
}
-
+
/* We're expired, set an error code
for upper layer */
ret = NT_STATUS_SYNCHRONIZATION_REQUIRED;
@@ -437,7 +438,7 @@ NTSTATUS idmap_cache_map_id(struct idmap_cache_ctx *cache, struct id_map *id)
/* make sure it is marked as unknown by default */
id->status = ID_UNKNOWN;
-
+
ret = idmap_cache_build_idkey(cache, &idkey, id);
if (!NT_STATUS_IS_OK(ret)) return ret;
@@ -462,7 +463,7 @@ NTSTATUS idmap_cache_map_id(struct idmap_cache_ctx *cache, struct id_map *id)
/* check it is not negative */
if (strcmp("IDMAP/NEGATIVE", endptr+1) != 0) {
-
+
DEBUG(10, ("Returning %s cache entry: key = %s, value = %s, "
"timeout = %s", t > now ? "valid" :
"expired", idkey, endptr+1, ctime(&t)));
@@ -493,7 +494,7 @@ NTSTATUS idmap_cache_map_id(struct idmap_cache_ctx *cache, struct id_map *id)
goto done;
}
-
+
/* Was a negative cache hit */
/* Ignore the negative cache when offline */
@@ -501,6 +502,7 @@ NTSTATUS idmap_cache_map_id(struct idmap_cache_ctx *cache, struct id_map *id)
if ( IS_DOMAIN_OFFLINE(our_domain) ) {
DEBUG(10,("idmap_cache_map_sid: idmap is offline\n"));
ret = NT_STATUS_NONE_MAPPED;
+
goto done;
}