summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-29 01:05:17 +0100
committerMichael Adam <obnox@samba.org>2008-03-29 02:10:41 +0100
commit2487f0c88c0ecf04921e5484ed1fc983762a86c9 (patch)
tree7fb1bc3748bdfdec588f519d337ea0fd80262927 /source3/winbindd
parent43fdd1748c8e7d0432f5f960687df74870df60de (diff)
downloadsamba-2487f0c88c0ecf04921e5484ed1fc983762a86c9.tar.gz
samba-2487f0c88c0ecf04921e5484ed1fc983762a86c9.tar.bz2
samba-2487f0c88c0ecf04921e5484ed1fc983762a86c9.zip
winbindd_cache: add missing validation function for pwinfo cache entry
Michael (This used to be commit 6d3fc63bfab06346fa57719e8747397873a3c46d)
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_cache.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index a8a98e5bc8..0f8bd49d06 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -3209,6 +3209,29 @@ static int validate_de(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf,
return 0;
}
+static int validate_pwinfo(TALLOC_CTX *mem_ctx, const char *keystr,
+ TDB_DATA dbuf, struct tdb_validation_status *state)
+{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf, state);
+
+ if (!centry) {
+ return 1;
+ }
+
+ (void)centry_string(centry, mem_ctx);
+ (void)centry_string(centry, mem_ctx);
+ (void)centry_string(centry, mem_ctx);
+ (void)centry_uint32(centry);
+
+ centry_free(centry);
+
+ if (!(state->success)) {
+ return 1;
+ }
+ DEBUG(10,("validate_pwinfo: %s ok\n", keystr));
+ return 0;
+}
+
static int validate_trustdoms(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf,
struct tdb_validation_status *state)
{
@@ -3307,6 +3330,7 @@ struct key_val_struct {
{"GM/", validate_gm},
{"DR/", validate_dr},
{"DE/", validate_de},
+ {"NSS/PWINFO/", validate_pwinfo},
{"TRUSTDOMS/", validate_trustdoms},
{"TRUSTDOMCACHE/", validate_trustdomcache},
{"WINBINDD_OFFLINE", validate_offline},