[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-3062-g0da9d0d
Volker Lendecke
vlendec at samba.org
Wed Jul 2 12:18:52 GMT 2008
The branch, v3-3-test has been updated
via 0da9d0d0f9662d8bd2f370f764d5a875e11b3068 (commit)
via 954556b527aa652f9a46f0d48834e92befb3c5f9 (commit)
via daa171552dc00d9602a05ba199c9a3ff24c802f5 (commit)
via fe58926283b51910d8587e32bb11aa681b9a27d3 (commit)
from c8d1bbfddce41cd6bf37dd0a622ef3437a24b492 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 0da9d0d0f9662d8bd2f370f764d5a875e11b3068
Author: Volker Lendecke <vl at samba.org>
Date: Wed Jul 2 14:06:49 2008 +0200
Fix nonempty whitespace only lines
commit 954556b527aa652f9a46f0d48834e92befb3c5f9
Author: Volker Lendecke <vl at samba.org>
Date: Wed Jul 2 14:06:09 2008 +0200
Fix indentation
commit daa171552dc00d9602a05ba199c9a3ff24c802f5
Author: Volker Lendecke <vl at samba.org>
Date: Wed Jul 2 14:04:52 2008 +0200
Fix a debug msg, this was probably a leftover from gencache
commit fe58926283b51910d8587e32bb11aa681b9a27d3
Author: Volker Lendecke <vl at samba.org>
Date: Wed Jul 2 14:03:25 2008 +0200
Fix typo
-----------------------------------------------------------------------
Summary of changes:
source/winbindd/idmap_cache.c | 66 ++++++++++++++++++++--------------------
1 files changed, 33 insertions(+), 33 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/winbindd/idmap_cache.c b/source/winbindd/idmap_cache.c
index f7e1d4e..b724ba0 100644
--- a/source/winbindd/idmap_cache.c
+++ b/source/winbindd/idmap_cache.c
@@ -119,7 +119,6 @@ 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;
@@ -259,11 +258,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;
@@ -271,21 +270,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;
@@ -301,7 +300,7 @@ failed:
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
-/* search the cahce for the SID an return a mapping if found *
+/* search the cache for the SID an return a mapping if found *
*
* 4 cases are possible
*
@@ -328,7 +327,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;
@@ -343,7 +342,8 @@ NTSTATUS idmap_cache_map_sid(struct idmap_cache_ctx *cache, struct id_map *id)
t = strtol((const char *)databuf.dptr, &endptr, 10);
if ((endptr == NULL) || (*endptr != '/')) {
- DEBUG(2, ("Invalid gencache data format: %s\n", (const char *)databuf.dptr));
+ DEBUG(2, ("Invalid idmap cache data format: %s\n",
+ (const char *)databuf.dptr));
/* remove the entry */
tdb_delete_bystring(cache->tdb, sidkey);
ret = NT_STATUS_NONE_MAPPED;
@@ -375,7 +375,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;
@@ -395,22 +395,22 @@ NTSTATUS idmap_cache_map_sid(struct idmap_cache_ctx *cache, struct id_map *id)
/* Check for valid or expired cache hits */
- if (t <= now) {
+ if (t <= now) {
/* We're expired. Return not mapped */
- ret = NT_STATUS_NONE_MAPPED;
- } else {
- /* this is not mapped as it was a negative cache hit */
- id->status = ID_UNMAPPED;
- ret = NT_STATUS_OK;
- }
-
+ ret = NT_STATUS_NONE_MAPPED;
+ } else {
+ /* this is not mapped as it was a negative cache hit */
+ id->status = ID_UNMAPPED;
+ ret = NT_STATUS_OK;
+ }
+
done:
SAFE_FREE(databuf.dptr);
talloc_free(sidkey);
return ret;
}
-/* search the cahce for the ID an return a mapping if found *
+/* search the cache for the ID an return a mapping if found *
*
* 4 cases are possible
*
@@ -437,7 +437,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;
@@ -452,7 +452,8 @@ NTSTATUS idmap_cache_map_id(struct idmap_cache_ctx *cache, struct id_map *id)
t = strtol((const char *)databuf.dptr, &endptr, 10);
if ((endptr == NULL) || (*endptr != '/')) {
- DEBUG(2, ("Invalid gencache data format: %s\n", (const char *)databuf.dptr));
+ DEBUG(2, ("Invalid idmap cache data format: %s\n",
+ (const char *)databuf.dptr));
/* remove the entry */
tdb_delete_bystring(cache->tdb, idkey);
ret = NT_STATUS_NONE_MAPPED;
@@ -461,7 +462,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)));
@@ -492,7 +493,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 */
@@ -500,20 +501,19 @@ 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;
}
/* Process the negative cache hit */
- if (t <= now) {
+ if (t <= now) {
/* We're expired. Return not mapped */
- ret = NT_STATUS_NONE_MAPPED;
- } else {
+ ret = NT_STATUS_NONE_MAPPED;
+ } else {
/* this is not mapped is it was a negative cache hit */
- id->status = ID_UNMAPPED;
- ret = NT_STATUS_OK;
- }
+ id->status = ID_UNMAPPED;
+ ret = NT_STATUS_OK;
+ }
done:
SAFE_FREE(databuf.dptr);
--
Samba Shared Repository
More information about the samba-cvs
mailing list